healpy.pixelfunc.ma¶
- healpy.pixelfunc.ma(m, badval=-1.6375e+30, rtol=1e-05, atol=1e-08, copy=True)¶
Return map as a masked array, with
badval
pixels masked.- 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
- copybool, optional
If
True
, a copy of the input map is made.
- Returns:
- a masked array with the same shape as the input map,
- masked where input map is close to badval.
Examples
>>> import healpy as hp >>> m = np.arange(12.) >>> m[3] = hp.UNSEEN >>> hp.ma(m) masked_array(data = [0.0 1.0 2.0 -- 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0], mask = [False False False True False False False False False False False False], fill_value = -1.6375e+30)