dilate#

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

Add one row of neighbors to the true values of a pixel mask and return the new mask.

This can be used to include extra rows of pixels in a mask that was pre-computed, e.g. via tailcuts_clean.

Parameters:
geomctapipe.instrument.CameraGeometry

Camera geometry information

masknp.ndarray

input mask (array of booleans) to be dilated