Continuum cookbook
This cookbook contains utilities to detect absorption features in the spectrum and remove them, to determine the continuum level before absorption.
Table of contents
Clip flux
Method | CookbookContinuum.clip_flux |
Parameters |
|
JSON template | { "cookbook": "cb", "recipe": "clip_flux", "params": { "zem": "zem", "ran": "'all'", "smooth_len_lya": "5000", "smooth_len_out": "400", "kappa": "2", "template": "false", "fudge": "'auto'", "knots_dist": "2000", "mode": "'update'" } } |
Estimate the continuum by clipping absorbers.
Continuum is estimated by computing a running mean on y
and iteratively rejecting negative outliers, defined by the following condition:
y_\mathrm{running median} - y_\mathrm{outlier} > \kappa\times dy.
The continuum is further adjusted by a fudge
factor which is either provided by the user or computed by minimizing the cumulative residuals in a running window. Finally, the continuum is smoothed with a gaussian filter of length smooth_len
and saved in column cont
of the spectrum.
Decrease kappa
if the continuum follows too much the absorption systems. Decrease smooth_len
if the continuum cuts out the emission lines. The continuum can be manually refined by adding/removing knots on the graph. knots_dist
controls the distance of knots that are placed automatically over the continuum curve.
You can use ran
to limit the continuum estimation to a specific wavelength range. If mode
is update
, the new continuum will be merged with the existing estimate (if present). If mode
is replace
, the existing estimate is deleted.
Fit power law
🚧
Update after de-absorbing
🚧
Correct for Ly-a opacity
🚧