Give the nside parameter for the given number of pixels.
Parameters : | npix : int
|
---|---|
Returns : | nside : int
|
Notes
Raise a ValueError exception if number of pixel does not correspond to the number of pixel of an healpix map.
Examples
>>> import healpy as hp
>>> hp.npix2nside(768)
8
>>> np.all([hp.npix2nside(12 * nside**2) == nside for nside in [2**n for n in range(12)]])
True
>>> hp.npix2nside(1000)
Traceback (most recent call last):
...
ValueError: Wrong pixel number (it is not 12*nside**2)