npix2nside checks that the given Npix is valid ( Npix= 12Nside2 with Nside a power of 2 in ) and then computes the corresponding resolution parameter Nside.
Nside = npix2nside(49152, ERROR=error) |
Nside will be 64 because 49152 is a valid pixel number (=12*642 and 64 is a power of 2), and error will be 0
Nside = npix2nside(49151, ERROR=error) |
Nside will be -1 and error: 1, because 49151 is not a valid number of HEALPix pixels over the full sky.
Version 3.83, 2024-11-13