resample_flux_conserving¶
Resample onto a new wavelength grid while preserving integrated flux.
| Category | Resampling |
| Backend | specutils - wraps the domain-standard specutils implementation |
| Version | 1.0.1 |
| Reads | ctx.spectrum (a Spectrum1D) |
| Writes | spectrum |
Specify the new grid either with a fixed step (Å) or with a fixed number of points. Samples outside the input wavelength range come back as NaN. The flux_unit label is only used to build the specutils object: 'ADU' / 'adu' map to astropy's adu, 'counts' / 'count' to count, any label astropy does not recognise ('transmission', 'response', …) is treated as dimensionless, and the output keeps the input label verbatim (v1.0.1 — v1.0.0 failed for every unrecognised label, including the kernel default 'ADU').
Parameters¶
| Parameter | Default | Required | Description |
|---|---|---|---|
wavelength_min |
None |
- | Lower bound of the new grid (Å); null keeps the input minimum. |
wavelength_max |
None |
- | Upper bound of the new grid (Å); null keeps the input maximum. |
step |
None |
- | Constant sampling step (Å). Mutually exclusive with n_points. |
n_points |
None |
- | Number of samples in the new grid. Mutually exclusive with step. |
Use it¶
References¶
- specutils.manipulation.FluxConservingResampler
- Carnall 2017, arXiv:1705.05165 — SpectRes (the conservation idea)
Related algorithms¶
resample_linear- Resample a spectrum onto a uniform wavelength grid by linear interpolation.