|
ERIS Pipeline Reference Manual 1.8.15
|
#include <sc_basic.h>Go to the source code of this file.
Data Structures | |
| struct | _scxydata_ |
| typedef struct _scxydata_ | scxydata |
| cpl_error_code | sc_fwhmest (double *fwhm, double *rms, cpl_table *spec, cpl_table *lines, const cpl_parameterlist *parlist) |
| int | sc_fwhmest_gaussfunc (int n_data, int n_pars, double *p, double *deviates, double **derivs, void *pdata) |
Header for continuum interpolation and subtraction routine
Definition in file sc_fwhmest.h.
| typedef struct _scxydata_ scxydata |
Structure for y(x) fitting
| x | independent variable of model |
| y | measured "y" values |
| y_err | measurement uncertainty in y |
| cpl_error_code sc_fwhmest | ( | double * | fwhm, |
| double * | rms, | ||
| cpl_table * | spec, | ||
| cpl_table * | lines, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Estimate FWHM using isolated lines in spectrum.
This routine estimates the FWHM of the lines in a spectrum based on a set of identified isolated lines. Isolated lines are marked in the line list. Firstly, the FWHM is approximated by the value in the line list. Afterwards, fitting the data with a Gaussian is attempted. If the fitting is successful, this value is preferred over the initial estimate.
The input spectrum has to be a CPL table containing (at least) the following columns:
lambda lflux class
The column "class" is expected to contain the following values: 0 = Continuum 1 = Line pixel 2 = Line peak 3 = Isolated line peak
INPUT:
| spec | spectrum |
| lines | line list |
| parlist | general CPL parameter list |
OUTPUT:
| fwhm | FWHM |
| rms | RMS error for the FWHM estimate |
ERRORS:
Definition at line 49 of file sc_fwhmest.c.
References sc_basic_clipmean(), sc_fwhmest_gaussfunc(), and SC_MAXLEN.
Referenced by sc_skycorr_subcont().
| int sc_fwhmest_gaussfunc | ( | int | n_data, |
| int | n_pars, | ||
| double * | p, | ||
| double * | deviates, | ||
| double ** | derivs, | ||
| void * | pdata | ||
| ) |
User function for CMPFIT. Provides error-weighted differences between a model Gaussian and a measured line profile.
INPUT:
| n_data | number of data points |
| n_pars | number of parameters |
| p | array of fit parameters |
| derivs | derivatives (not used) |
| pdata | private data |
OUTPUT:
| deviates | array of residuals |
ERRORS:
Definition at line 265 of file sc_fwhmest.c.
References sc_basic_gaussfunc().
Referenced by sc_fwhmest().