magpie.randoms.randoms_sphere
- magpie.randoms.randoms_sphere(size[, r_min=0., r_max=1., phi_min=0., phi_max=2*np.pi, theta_min=0., theta_max=np.pi])
Random points inside a sphere (default will give randoms within a unit sphere). You can specify the inner and outer radii to get randoms in a shell and the region on the sky.
- Coordinate convention:
phi lies in the range [0, 2pi]
theta lies in the rang [0, pi].
- Parameters
- sizeint
Number of randoms to generate.
- r_minfloat
Minimum radius.
- r_maxfloat
Maximum radius.
- phi_minfloat
Minimum longitude in radians.
- phi_maxfloat
Maximum longitude in radians.
- theta_minfloat
Minimum latitude in radians.
- theta_maxfloat
Maximum longitude in radians.
- Returns
- rarray
Random r.
- phiarray
Random phi.
- thetaarray
Random theta.