|
ERIS Pipeline Reference Manual 1.8.15
|
#include <sc_basic.h>Go to the source code of this file.
| cpl_error_code | sc_contsub (cpl_table *spec) |
| cpl_error_code | sc_contsub_identcont (cpl_table *spec, const cpl_table *groups, const cpl_table *linetab, const double fluxlim, const cpl_parameterlist *parlist) |
| int | sc_contsub_check (cpl_table *spec) |
| cpl_error_code | sc_contsub_skipthermir (cpl_table *spec) |
Header for routines related to continuum identification, interpolation, and subtraction
Definition in file sc_contsub.h.
| cpl_error_code sc_contsub | ( | cpl_table * | spec | ) |
Interpolate and subtract continuum from a spectrum.
This routine uses the mask column in spec to identify emission lines and interpolate the flux at their position using the closest continuum points.
The input spectrum has to be a CPL table containing (at least) the following columns:
col #1: lambda col #2: flux col #3: mask
The column "class" is is expected to contain the following values: 0 = Continuum 1 = Line pixel 2 = Line peak 3 = Isolated line peak
On output the spectrum contains two new columns: col #4: cflux col #5: lflux containing the continuum and line fluxes. Col #5, lflux, is the continuum subtracted line flux. The sum of lflux and cflux corresponds to col #2, flux.
INPUT:
| spec | spectrum |
OUTPUT:
| spec | spectrum |
ERRORS:
Definition at line 50 of file sc_contsub.c.
References sc_basic_filtermedian(), and sc_basic_interpollin().
Referenced by sc_skycorr_subcont().
| int sc_contsub_check | ( | cpl_table * | spec | ) |
Checks distribution of continuum pixels over spectral range. If the distribution allows the continuum to be interpolated in a reliable way, a value of 0 is returned. The fraction of continuum pixels and the fraction of the wavelength range covered by continuum pixels is checked.
INPUT:
| spec | CPL table with spectrum |
OUTPUT:
ERRORS:
Definition at line 422 of file sc_contsub.c.
Referenced by sc_skycorr_subcont().
| cpl_error_code sc_contsub_identcont | ( | cpl_table * | spec, |
| const cpl_table * | groups, | ||
| const cpl_table * | linetab, | ||
| const double | fluxlim, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Identifies continuum windows in a spectrum by excluding airglow lines from a list with a peak flux above a threshold which is the product of the input parameter 'fluxlim' and the median peak flux of the lines already identified by a line finder. The remaining continuum pixels are identified by a value of 0 in the 'mask' column of the spectrum table. If there are no identified lines, the mean of the line list fluxes is used instead of the median peak flux of the identified lines.
INPUT:
| spec | CPL table with spectrum |
| groups | CPL table with airglow line information |
| linetab | CPL table with information on detected lines |
| fluxlim | relative lower line peak flux limit |
| parlist | general CPL parameter list |
OUTPUT:
| spec | spectrum with updated line/continuum flag |
ERRORS:
Definition at line 171 of file sc_contsub.c.
References sc_basic_rebin().
Referenced by sc_skycorr_subcont().
| cpl_error_code sc_contsub_skipthermir | ( | cpl_table * | spec | ) |
Identifies all pixels at wavelengths longer than SC_THERMIRLIM as continuum pixels. This measure avoids the scaling of emission lines originating in the lower atmosphere.
INPUT:
| spec | CPL table with spectrum |
OUTPUT:
| spec | spectrum with continuum beyond thermal IR limit |
ERRORS:
Definition at line 497 of file sc_contsub.c.
References SC_THERMIRLIM.
Referenced by sc_skycorr_subcont().