remove_cosmic_rays#
- irispy.utils.cosmic_rays.remove_cosmic_rays(
- cube,
- *,
- method: str = 'rsliding',
- sigma: float | None = None,
- max_iters: int | None = None,
- method_kwargs: Mapping[str, Any] | None = None,
Remove cosmic rays from a cube and return a cleaned cube.
- Parameters:
cube (irispy.sji.SJICube or irispy.spectrograph.SpectrogramCube) – Cube object to clean.
method (
{"rsliding", "astroscrappy"}, optional) – Cosmic ray removal backend."rsliding"is the default and operates on the full array."astroscrappy"is applied frame-by-frame over the last two axes.sigma (
float, optional) – Shared clipping threshold override. This maps tosigmaforrslidingandsigclipforastroscrappy.max_iters (
int, optional) – Shared iteration-count override. This maps tomax_itersforrslidingandniterforastroscrappy.method_kwargs (
dict, optional) – Additional keyword arguments passed to the selected backend.
- Returns:
A new cube with cleaned data and copied metadata/coordinates.
- Return type: