Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Flux cookbook

Cookbook of utilities for flux calibration

Table of contents

  1. Scale y axis
  2. Scale y axis by median
  3. Scale y axis by its value at a given point
  4. De-redden spectrum

Scale y axis

Method CookbookFlux.y_scale
Parameters
  • fact: Multiplicative factor
JSON template
{
  "cookbook": "cb",
  "recipe": "y_scale",
  "params": {
    "fact": "1.0"
  }
}    

Scale the y axis by a constant factor.

The y and dy columns of the spectrum and the line list (if present) are multiplied by fact.

The scaling is done in place, without creating a new session.

Scale y axis by median

Method CookbookFlux.y_scale_med
Parameters
JSON template
{
  "cookbook": "cb",
  "recipe": "y_scale_med",
  "params": {
  }
}    

Scale the y axis by its median.

The y and dy columns of the spectrum and the line list (if present) are multiplied by the median of the spectrum y.

The scaling is done in place, without creating a new session.

Scale y axis by its value at a given point

Method CookbookFlux.y_scale_x
Parameters
  • x: x (nm)
JSON template
{
  "cookbook": "cb",
  "recipe": "y_scale_x",
  "params": {
    "x": "x"
  }
}    

Scale the y axis by its value at a given point.

The y and dy columns of the spectrum and the line list (if present) are multiplied by the value of the spectrum y at a given x, computed with numpy.interp.

The scaling is done in place, without creating a new session.

De-redden spectrum

Method CookbookFlux.deredden
Parameters
  • ebv: Color excess
  • rv: Ratio of total selective extinction
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.