healpy.pixelfunc.maptype

healpy.pixelfunc.maptype(m)

Describe the type of the map (valid, single, sequence of maps). Checks : the number of maps, that all maps have same length and that this length is a valid map size (using isnpixok()).

Parameters :

m : sequence

the map to get info from

Returns :

info : int

-1 if the given object is not a valid map, 0 if it is a single map, info > 0 if it is a sequence of maps (info is then the number of maps)

Examples

>>> import healpy as hp
>>> hp.pixelfunc.maptype(np.arange(12))
0
>>> hp.pixelfunc.maptype(2)
-1
>>> hp.pixelfunc.maptype([np.arange(12), np.arange(12)])
2
>>> hp.pixelfunc.maptype([np.arange(12), np.arange(768)])
-1

Project Versions

Previous topic

healpy.pixelfunc.get_nside

Next topic

healpy.pixelfunc.ud_grade

This Page