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

Synthetic cookbook

Table of contents

  1. Synthetic spectrum from structures
  2. Synthetic spectrum from systems
  3. Synthetic spectrum from random systems

Synthetic spectrum from structures

Method CookbookSynthetic.spec_from_struct
Parameters
  • x: Expression for wavelength-like array
  • y: Expression for flux-like array
  • dy: Expression for the error on y
JSON template
{
  "cookbook": "cb",
  "recipe": "spec_from_struct",
  "params": {
    "x": "'0,spec,x'",
    "y": "'0,spec,y'",
    "dy": "'0,spec,y'"
  }
}    

Create a synthetic spectrum from existing structures (a wavelenght-like array and a flux-like array). The structure expressions must be parsable by AST, with columns described by a string with the session number, the structure tag (spec, lines, systs), and the column name separated by a comma (e.g. 0,spec,x, meaning “column x of spectrum from session 0”). A gaussian noise is added to the spectrum to match a given signal-to-noise ratio. A new session is created with the synthetic spectrum.

Synthetic spectrum from systems

Method CookbookSynthetic.spec_from_systs
Parameters
  • x: Expression for wavelength-like array
  • dy: Expression for the error on y
  • sess: Number of the session with the systems
  • resol: Resolution
JSON template
{
  "cookbook": "cb",
  "recipe": "spec_from_systs",
  "params": {
    "x": "'0,spec,x'",
    "dy": "'0,spec,dy'",
    "sess": "'0'",
    "resol": "null"
  }
}    

Create a synthetic spectrum from a list of systems taken from an existing session.

Synthetic spectrum from random systems

Method CookbookSynthetic.spec_from_systs_random
Parameters
  • n: Number of systems
  • series: Series of transitions
  • z_min: Minimum redshift
  • z_max: Maximum redshift
  • z_seed: Seed for random sampling in [z_min, z_max]
  • logN_min: Minimum (logarithmic) column density
  • logN_max: Maximum (logarithmic) column density
  • logN_seed: Seed for random sampling in [logN_min, logN_max]
  • b_min: Minimum Doppler broadening
  • b_max: Maximum Doppler broadening
  • b_seed: Seed for random sampling in [b_min, b_max]
  • resol: Resolution
  • snr: Signal-to-noise ratio
  • append: Append systems to existing system list
JSON template
{
  "cookbook": "cb",
  "recipe": "spec_from_systs_random",
  "params": {
    "n": "n",
    "series": "'Ly-a'",
    "z_min": "0",
    "z_max": "6",
    "z_seed": "null",
    "logN_min": "10",
    "logN_max": "18",
    "logN_seed": "null",
    "b_min": "1.0",
    "b_max": "100.0",
    "b_seed": "null",
    "resol": "null",
    "snr": "null",
    "append": "true"
  }
}    

Create a synthetic spectrum from a list of systems with random redshifts, column density, and Doppler broadening.