bright_cleaning#
- ctapipe.image.cleaning.bright_cleaning(image, threshold, fraction, n_pixels=3)[source]#
Clean an image by removing pixels below a fraction of the mean charge in the
n_pixels
brightest pixels.No pixels are removed instead if the mean charge of the brightest pixels are below a certain threshold.
- Parameters:
- imagenp.ndarray
pixel charges
- thresholdfloat
Minimum average charge in the
n_pixels
brightest pixels to apply cleaning- fractionfloat
Pixels below fraction * (average charge in the
n_pixels
brightest pixels) will be removed from the cleaned image- n_pixelsint
Consider this number of the brightest pixels to calculate the mean charge
- Returns:
- A boolean mask of selected pixels.