pixelfunc – Pixelisation related functions#
conversion from/to sky coordinates#
|
pix2ang : nside,ipix,nest=False,lonlat=False -> theta[rad],phi[rad] (default RING) |
|
pix2vec : nside,ipix,nest=False -> x,y,z (default RING) |
|
ang2pix : nside,theta[rad],phi[rad],nest=False,lonlat=False,latauto=False,latbounce=True -> ipix (default:RING) |
|
vec2pix : nside,x,y,z,nest=False -> ipix (default:RING) |
|
vec2ang: vectors [x, y, z] -> theta[rad], phi[rad] |
|
ang2vec : convert angles to 3D position vector |
|
Return the 8 nearest pixels. |
|
Return the 4 closest pixels on the two rings above and below the location and corresponding weights. |
|
Return the bi-linear interpolation value of map(s) using 4 nearest neighbours. |
conversion between NESTED and RING schemes#
nside/npix/resolution#
|
Give the number of pixels for the given nside. |
|
Give the nside parameter for the given number of pixels. |
|
Give the resolution order for a given nside. |
|
Give the nside parameter for the given resolution order. |
|
Give approximate resolution (pixel size in radian or arcmin) for nside. |
|
Give pixel area given nside in square radians or square degrees. |
|
Maximum angular distance between any pixel center and its corners |
|
Returns |
|
Return |
|
Returns the npix of a given map (implicit or explicit pixelization). |
|
Returns the minimum acceptable nside so that npix <= nside2npix(nside). |
|
Return the nside of the given map. |
|
Describe the type of the map (valid, single, sequence of maps). |
|
Upgrade or degrade resolution of a map (or list of maps). |
Notes on downgrade quality#
For simple resolution changes, ud_grade() remains available and fast. It
is usually the right choice for masks, hit-count maps, and compact
pixel-localized features. For diffuse or band-limited downgrade workflows,
healpy.sphtfunc.harmonic_ud_grade() can preserve the map more faithfully
because it first band-limits the map in spherical-harmonic space before
synthesizing it at the target nside.
See healpy.sphtfunc.harmonic_ud_grade() for the API and the following
tutorial notebooks for worked comparisons:
Masking pixels#
Special value used for masked pixels |
|
|
Returns a bool array with |
|
Returns a bool array with |
|
Return map as a masked array, with |
Map data manipulation#
|
Fit a dipole and a monopole to the map, excluding bad pixels. |
|
Fit a monopole to the map, excluding unseen pixels. |
|
Fit and subtract the dipole and the monopole from the given map m. |
|
Fit and subtract the monopole from the given map m. |
|
Return the bi-linear interpolation value of map(s) using 4 nearest neighbours. |