Edit cookbook

Table of contents

  1. Modify columns
  2. Import system list
  3. Import telluric model
  4. Extract
  5. Mask
  6. Toggle log axes

Modify columns

🚧

Import system list

Method CookbookEdit.import_systs
Parameters
  • source: Source session
  • mode: Mode (replace or append)
JSON template
{
  "cookbook": "cb",
  "recipe": "import_systs",
  "params": {
    "source": "0",
    "mode": "'replace'"
  }
}    

Import a system list into the currently selected session.

This recipe imports a list of absorption systems from an open session session into the current one. Depending on mode, the list will either replace or be appended to an existing list of systems in the current session.

Import telluric model

Method CookbookEdit.import_telluric
Parameters
  • source: Source session
  • col: Telluric model column
  • merge_cont: Merge telluric model into continuum
JSON template
{
  "cookbook": "cb",
  "recipe": "import_telluric",
  "params": {
    "source": "0",
    "col": "'telluric_model'",
    "merge_cont": "true"
  }
}    

Import a telluric model into the currently selected session and optionally merge it into the continuum.

This recipe imports a telluric model from an open session session into the spectrum of the current session. The telluric model must be contained in a column col with the same length of the spectrum. If merge_cont is True, the model with be merged with the continuum of the spectrum and it will be used to normalize the flux when fitting absorption lines.

Extract

🚧

Mask

Method CookbookEdit.mask
Parameters
  • shift: Shift to the barycentric frame (km/s)
  • tell: Mask telluric lines
  • sky: Mask sky lines
  • cond: Condition
JSON template
{
  "cookbook": "cb",
  "recipe": "mask",
  "params": {
    "shift": "0",
    "tell": "true",
    "sky": "true",
    "cond": "''"
  }
}    

Mask telluric lines, sky lines, or spectral regions defined by a condition.

The user can mask telluric absorption lines and sky emission lines using tell and sky respectively, and using shift to specify by how much these lines have to be shifted with respect to the barycentric reference frame in which the spectrum is shown (this is the value of the barycentric correction frequently indicated in the spectrum header, expressed in km/s). The user can also mask other spectral regions with condition: in this case, the condition must be expressed in terms of one of the spectrum table columns (e.g. x>500 to mask all wavelengths greater than 500 nm, y<0.1 to mask all flux values less than 0.1 in the current flux units, etc.).

When a mask is applied, a new column is created (telluric, sky, or mask, respectively) and filled with 1 outside the masked regions and with 0 inside. Masking is destructive: where the mask column is 0, the flux values (column y) are changed into NaNs. This behaviour may be improved in a later version of the code.

Toggle log axes

🚧