healpy.pixelfunc.mask_bad¶
- healpy.pixelfunc.mask_bad(m, badval=-1.6375e+30, rtol=1e-05, atol=1e-08)¶
Returns a bool array with
True
where m is close to badval.- Parameters:
- ma map (may be a sequence of maps)
- badvalfloat, optional
The value of the pixel considered as bad (
UNSEEN
by default)- rtolfloat, optional
The relative tolerance
- atolfloat, optional
The absolute tolerance
- Returns:
- mask
a bool array with the same shape as the input map,
True
where input map is close to badval, andFalse
elsewhere.
Examples
>>> import healpy as hp >>> import numpy as np >>> m = np.arange(12.) >>> m[3] = hp.UNSEEN >>> hp.mask_bad(m) array([False, False, False, True, False, False, False, False, False, False, False, False], dtype=bool)