neighbor_distance
- typhon.cloudmask.neighbor_distance(cloudmask, connectivity=1)[source]
Calculate nearest neighbor distance for each cloud.
Note
Distance is given in pixels.
See also
scipy.spatial.cKDTree
:Used to calculate nearest neighbor distances.
- Parameters:
cloudmask (ndarray) – 2d binary cloud mask.
connectivity (int) – Maximum number of orthogonal hops to consider a pixel/voxel as a neighbor (see
skimage.measure.label()
).
- Returns:
Nearest neighbor distances in pixels.
- Return type:
ndarray