pixel_resolution_to_nside¶

astropy_healpix.
pixel_resolution_to_nside
(resolution, round='nearest')[source]¶ Find closest HEALPix nside for a given angular resolution.
This function is the inverse of
nside_to_pixel_resolution
, for the default rounding scheme ofround='nearest'
.If you choose
round='up'
, you’ll get HEALPix pixels that have at least the requested resolution (usually a bit better due to rounding).Pixel resolution is defined as square root of pixel area.
 Parameters
 resolution
Quantity
Angular resolution
 round{‘up’, ‘nearest’, ‘down’}
Which way to round
 resolution
 Returns
 nsideint
The number of pixels on the side of one of the 12 ‘toplevel’ HEALPix tiles. Always a power of 2.
Examples
>>> from astropy import units as u >>> from astropy_healpix import pixel_resolution_to_nside >>> pixel_resolution_to_nside(13 * u.arcmin) 256 >>> pixel_resolution_to_nside(13 * u.arcmin, round='up') 512