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

  1. Clip flux
  2. Fit power law
  3. Update after de-absorbing
  4. Correct for Ly-a opacity

Clip flux

Method CookbookContinuum.clip_flux
Parameters
  • zem: Emission redshift
  • ran: Wavelength range (nm, e.g. `[450,500]`; `all` will select all the available range)
  • smooth_len_lya: Smoothing length in the Lyman alpha forest (km/s)
  • smooth_len_out: Smoothing length outside the Lyman alpha forest (km/s)
  • kappa: Number of sigma to reject absorber
  • template: Use a composite spectrum to reduce the Lyman alpha emission peak
  • fudge: Fudge factor to scale the continuum
  • knots_dist: Distance between knots (km/s)
  • mode: Update or replace
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

🚧