ctapipe is not stable yet, so expect large and rapid changes to structure and functionality as we explore various design choices before the 1.0 release.

number_of_islands#

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

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

Parameters:
geomCameraGeometry

Camera geometry information, needs to be the full camrea geometry, not already masked with mask

maskndarray

input mask (array of booleans) of pixels surviving the cleaning

Returns:
n_islandsint

Total number of clusters

island_labelsndarray

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