clip_sigma
Remove outlier samples (cosmic rays, hot pixels) by iterative sigma clipping.
|
|
| Category |
Transforms |
| Backend |
scipy - implemented here on top of scipy primitives |
| Version |
1.0.1 |
| Reads |
ctx.spectrum (a Spectrum1D) |
| Writes |
spectrum, metrics.n_clipped |
Parameters
| Parameter |
Default |
Required |
Description |
sigma |
5.0 |
- |
Clipping threshold, in standard deviations of the residual. |
window |
5 |
- |
Median-filter window (samples) used to estimate the local baseline. |
iterations |
3 |
- |
Maximum number of clipping iterations. |
Use it
References
- Bevington & Robinson 2003, Data Reduction and Error Analysis for the Physical Sciences, 3rd ed., McGraw-Hill — Chauvenet's criterion / iterative rejection of samples beyond k·σ of the fit.
- astropy.stats.sigma_clip — iterative σ-clipping about a robust centre (the same iterate-until-no-new-rejection scheme, applied here to the residual from a running median).
- scipy.ndimage.median_filter — local baseline.
combine_spectra_arithmetic - Add, subtract, multiply or divide ctx.spectrum by a reference.
extract_region - Crop a spectrum to the wavelength window [wavelength_min, wavelength_max].
mask_range - Flag every sample inside a wavelength window as masked.