Flag candidate cosmic-ray hits in a two-dimensional detector exposure using local upper sigma clipping. The function returns a Boolean mask and leaves the exposure intact.
from spikemask_rs import spike_mask
suspected_hits = spike_mask(exposure)Install with python -m pip install spikemask-rs.
See the user guide for examples,
the installation guide for development commands,
and the design notes for the detection rule and choice of defaults.