filter_cloudmask
- typhon.cloudmask.filter_cloudmask(cloudmask, threshold=1, connectivity=1)[source]
Filter a given cloudmask for small cloud objects defined by their pixel number.
- Parameters:
cloudmask (ndarray) – 2d binary cloud mask (optional with NaNs).
threshold (int) – minimum pixel number of objects remaining in cloudmask.
connectivity (int) – Maximum number of orthogonal hops to consider a pixel/voxel as a neighbor (see
skimage.measure.label()
).
- Returns:
filtered cloudmask without NaNs.
- Return type:
ndarray