healpy.dist2holes#
- healpy.dist2holes(m, maxdist=3.141592653589793, hole_min_size=None, hole_min_surf_arcmin2=None)#
Computes the distance (in radians) from pixel center to center of closest invalid pixel up to a maximal distance.
- Parameters:
- marray-like, shape (Npix,)
Input mask in RING ordering where
True(or non-zero entries) mark masked pixels andFalse(or zero) mark valid pixels.- maxdistfloat, optional
The maximal distance in radians. Pixel farther from this distance are not taken into account (default: pi).
- hole_min_sizeint, optional
Minimum connected hole size, expressed as a number of pixels, to retain. Holes smaller than this threshold are filled before the distance calculation. Defaults to
None(no size-based filtering).- hole_min_surf_arcmin2float, optional
Minimum hole area, expressed in square arcminutes, to retain. Holes with a smaller area than this threshold are filled before the distance calculation. Defaults to
None(no area-based filtering). The filtering uses HEALPix neighbour connectivity in RING ordering.
- Returns:
- distancesout map of distances (in radians) in RING scheme as numpy arrays