sample_patch_on_sphere¶
- rubin_sim.utils.sample_patch_on_sphere(phi, theta, delta, size, seed=1)¶
Uniformly distributes samples on a patch on a sphere between phi pm delta, and theta pm delta on a sphere. Uniform distribution implies that the number of points in a patch of sphere is proportional to the area of the patch. Here, the coordinate system is the usual spherical coordinate system but with the azimuthal angle theta going from 90 degrees at the North Pole, to -90 degrees at the South Pole, through 0. at the equator.
This function is not equipped to handle wrap-around the ranges of theta phi and therefore does not work at the poles.
- Parameters:
- Returns:
- phivals, thetavals
np.ndarray
,np.ndarray
tuple of (phivals, thetavals) where phivals and thetavals are arrays of size size in degrees.
- phivals, thetavals