stats_without_lines

sitelle.utils.stats_without_lines(spec, cube_axis, lines, v_min, v_max)

Computes statistics on a spectrum when region around lines are excluded. We translate a velocity range into a position range around the lines, and remove these regions to compute the mean, median and standard deviation of the spectrum.

Parameters:
  • spec (1D ndarray) – Input spectrum
  • cube_axis (1D ndarray) – Wavenumber axis ([cm-1]) on which the spectrum is evaluated
  • lines (list of str) – Names of the lines to exclude
  • v_min (float) – Minimum velocity at which we expect the line to be present
  • v_max (float) – Maximum velocity at which we expect the line to be present
Returns:

  • mean (float)
  • median (float)
  • std (float)