ism3d.xyhelper.maskmoment.momfuncs.maskguard¶
-
ism3d.xyhelper.maskmoment.momfuncs.
maskguard
(maskarray, niter=1, xyonly=False, vonly=False)[source]¶ Pad a mask by specified number of pixels in all three dimensions.
- Parameters
maskarray (~numpy.ndarray) – The 3-D mask array with 1s for valid pixels and 0s otherwise.
niter (int, optional) – Number of iterations for expanding mask by binary dilation. Default: 1
xyonly (boolean, optional) – Whether to expand only in the two sky coordinates Default: False
vonly (boolean, optional) – Whether to expand only in the spectral coordinate Default: False (ignored if xyonly==True)
- Returns
maskarray – A copy of the input maskarray after padding.
- Return type
~numpy.ndarray