Flux cookbook
Cookbook of utilities to manipulate flux
Table of contents
- Re-bin spectrum
- Smooth spectrum
- Rescale spectrum
- De-redden spectrum
- Adjust magnitudes
- Estimate SNR
- Estimate RMS
Re-bin spectrum
| Method | CookbookGeneral.rebin |
| Parameters |
|
| JSON template |
{
"cookbook": "cb",
"recipe": "rebin",
"params": {
"xstart": "null",
"xend": "null",
"dx": "10.0",
"xunit": "km / s",
"norm": "true",
"filling": "nan"
}
} |
Apply a new binning to a spectrum, with a constant bin size.
🚧
Smooth spectrum
🚧
Rescale spectrum
🚧
De-redden spectrum
| Method | CookbookFlux.deredden |
| Parameters |
|
| JSON template |
{
"cookbook": "cb",
"recipe": "deredden",
"params": {
"ebv": "0.03",
"rv": "3.1"
}
} |
Correct the spectrum flux for reddening due to extinction.
The extinction is modeled with the parametrization of O’Donnell (1994), depending on the spectrum color excess \(E(B-V)\) and ratio of total selective extinction \(R(V)=A(V)/E(B-V)\). Column y of the spectrum is updated with de-reddened values.
🚧
Adjust magnitudes
🚧
Estimate SNR
| Method | CookbookGeneral.snr_est |
| Parameters | – |
| JSON template |
{
"cookbook": "cb",
"recipe": "snr_est",
"params": {
}
} |
Estimate the signal-to-noise ratio per pixel.
A snr column is populated with y/dy ratios computed for all spectrum bins.
Estimate RMS
| Method | CookbookGeneral.rms_est |
| Parameters |
|
| JSON template |
{
"cookbook": "cb",
"recipe": "rms_est",
"params": {
"hwindow": "100"
}
} |
Estimate flux error by computing the root-mean-square (RMS) of the flux within a running window.
The RMS is computed over y values and is saved in y_rms. It may be useful to compare the latter with dy to check that the formal error is consistent with the actual dispersion of y values.