ctapipe.image.number_of_islands(geom, mask)[source]

Search a given pixel mask for connected clusters. This can be used to seperate between gamma and hadronic showers.

geom: `~ctapipe.instrument.CameraGeometry`

Camera geometry information

mask: ndarray

input mask (array of booleans)

n_islands: int

Total number of clusters

island_labels: ndarray

Contains cluster membership of each pixel. Dimension equals input geometry. Entries range from 0 (not in the pixel mask) to n_islands.