ism3d.xyhelper.maskmoment.momfuncs.prunemask¶
-
ism3d.xyhelper.maskmoment.momfuncs.
prunemask
(maskarray, minarea=0, minch=2, byregion=True)[source]¶ Apply area and velocity width criteria on mask regions.
- Parameters
maskarray (~numpy.ndarray) – The 3-D mask array with 1s for valid pixels and 0s otherwise.
minarea (int, optional) – Minimum velocity-integrated area in pixel units. Default: 0
minch (int, optional) – Minimum velocity width in channel units. Default: 2
byregion (boolean, optional) – Whether to enforce min velocity width on whole region, rather than by pixel Default: True
- Returns
maskarray – A copy of the input maskarray with regions failing the tests removed.
- Return type
~numpy.ndarray