20#ifndef XSH_MOLECFIT_MODEL_H
21#define XSH_MOLECFIT_MODEL_H
40#include "mf_wrap_config.h"
41#include "mf_spectrum.h"
57#define XSHOOTER_INPUT_DATA_FLUX_COLUMN "Flux"
62#define XSH_MOLECFIT_PARAMETER_LIST_DESC "List of molecules to include in the fit (comma separated). If set to 'NULL', the values provided in MOLECULES_XXX will be used, where XXX is UVB, VIS or NIR. If not, the provided list overrides what is specified in the MOLECULES_XXX input. Note: in order to override MOLECULES_XXX, the recipe parameters REL_COL, FIT_MOLEC, and LIST_MOLEC must be all specified and different from 'NULL'."
65#define XSH_MOLECFIT_PARAMETER_FIT_DESC "List of flags (1 and 0), comma separated, that specifies if a molecule has to be fitted (flag=1) or computed (flag=0). If set to 'NULL', the values provided in MOLECULES_XXX will be used, where XXX is UVB, VIS or NIR. If not, the provided list overrides what is specified in the MOLECULES_XXX input. Note: in order to override MOLECULES_XXX, the following recipe parameters rel_col, fit_molec, and list_molec must be all specified and different from 'NULL'."
68#define XSH_MOLECFIT_PARAMETER_RELATIVE_VALUE_DESC "List of relative column densities of the molecules used (comma separated). If set to 'NULL', the values provided in MOLECULES_XXX will be used, where XXX is UVB, VIS or NIR. If not, the provided list overrides what is specified in the MOLECULES_XXX input. Note: in order to override MOLECULES_XXX, the following recipe parameters rel_col, fit_molec, and list_molec must be all specified and different from 'NULL'."
71#define XSH_MOLECFIT_PARAMETER_WAVE_RANGE_INCLUDE_DESC "Comma separated list of values that define the boundaries of the wavelength regions to fit (low_1, upper_1, low_2, upper_2,...,low_n, upper_n), in microns. If set to 'NULL' the values specified in the fits table given by the tag WAVE_INCLUDE_XXX will be used, where XXX is UVB, VIS or NIR. If not, these values override those specified in WAVE_INCLUDE_XXX."
74#define XSH_MOLECFIT_PARAMETER_WAVE_RANGE_EXCLUDE_DESC "Comma separated list of values that define the boundaries of the wavelength regions to exclude in the fit (low_1, upper_1, low_2, upper_2,...,low_n, upper_n), in microns. If set to 'NULL' the values specified in the fits table given by the tag WAVE_EXCLUDE_XXX will be used, where XXX is UVB, VIS or NIR. If not, these values override those specified in WAVE_EXCLUDE_XXX."
77#define XSH_MOLECFIT_PARAMETER_PIXEL_RANGE_EXCLUDE_DESC "Comma separated list of values that define the boundaries of the pixel regions to exclude in the fit (low_1, upper_1, low_2, upper_2,...,low_n, upper_n), in pixel units. If set to 'NULL' the values specified in the fits table given by the tag PIXEL_EXCLUDE_XXX will be used, where XXX is UVB, VIS or NIR. If not, these values override those specified in PIXEL_EXCLUDE_XXX."
80#define XSH_MF_PARAMETERS_COLUMN_LAMBDA_DESC "Name of the column in the input that identifies the wavelength. Note: this parameter is relevant only for inputs in binary table format."
83#define XSH_MF_PARAMETERS_COLUMN_FLUX_DESC "Name of the column in the input that identifies the flux. Note: this parameter is relevant only for inputs in binary table format."
86#define XSH_MF_PARAMETERS_COLUMN_DFLUX_DESC "Name of the column in the input that identifies the flux error. Note: this parameter is relevant only for inputs in binary table format."
89#define XSH_MF_PARAMETERS_DEFAULT_ERROR_DESC "Default error relative to mean for the case that the error column is not provided."
92#define XSH_MF_PARAMETERS_FTOL_DESC "Relative chi2 convergence criterion."
95#define XSH_MF_PARAMETERS_XTOL_DESC "Relative parameter convergence criterion."
98#define XSH_MF_PARAMETERS_FIT_CONTINUUM_DESC "Comma delimited string of flags (1=true, 0=false) for fitting the continuum in specific regions. The number of values must match the number of wavelength ranges to fit. If one single value is given, then it is assumed to be valid for all the wavelength ranges. If set to 'NULL', then the values are taken from the column CONT_POLY_ORDER of the input table WAVE_INCLUDE. If this file is not given, then the default is used."
101#define XSH_MF_PARAMETERS_CONTINUUM_N_DESC "Polynomial order for the continuum model fit to each wavelength region, presented as a comma delimited string. If a single value is given, then it is assumed to be valid for all the wavelength ranges. If set to 'NULL', then the values are taken from the column CONT_POLY_ORDER of the input table WAVE_INCLUDE. If this file is not given, then the default is used."
104#define XSH_MF_PARAMETERS_FIT_WLC_DESC "A list of flags (1 or 0) that specifies which ranges are to be included as a part of the wavelength correction fitting if wavelength fitting has been selected. If a single value is given, then it is assumed to be valid for all the wavelength ranges."
107#define XSH_MF_PARAMETERS_WLC_N_DESC "Degree of the polynomial used to refine the wavelength solution."
110#define XSH_MF_PARAMETERS_WLC_CONST_DESC "Initial term for refinement of the wavelength solution."
113#define XSH_MF_PARAMETERS_FIT_RES_BOX_DESC "Flag that specifies if the instrumental line spread function is fitted by a Boxcar function."
116#define XSH_MF_PARAMETERS_RES_BOX_DESC "Initial value in pixels of the Boxcar function width that fits the instrumental line spread function (only used if --FIT_RES_BOX=TRUE)."
119#define XSH_MF_PARAMETERS_FIT_GAUSS_DESC "Flag that specifies if the instrumental line spread function is fitted by a Gaussian function."
122#define XSH_MF_PARAMETERS_RES_GAUSS_DESC "Inital value in pixels of the FWHM of the Gaussian function that fits the instrumental line spread function (only used if --FIT_RES_GAUSS=TRUE)."
125#define XSH_MF_PARAMETERS_FIT_LORENTZ_DESC "Flag that specifies if the instrumental line spread function is fitted by a Lorentzian function."
128#define XSH_MF_PARAMETERS_RES_LORENTZ_DESC "Initial value in pixels of the FWHM of the Lorentz function that fits the instrumental line spread function (only used if --FIT_RES_LORENTZ=TRUE)."
131#define XSH_MF_PARAMETERS_KERN_MODE_DESC "Flag that indicates whether to use a Voigt approximation instead of the Lorentz or Gauss functions to fit the instrumental line spread function."
134#define XSH_MF_PARAMETERS_KERN_FAC_DESC "Size of the Gaussian/Lorentzian/Voigtian kernel, expressed in units of FWHM."
137#define XSH_MF_PARAMETERS_VAR_KERN_DESC "Flag indicating if the kernel is constant or varies linearly with wavelength (i.e. resolving power is constant)."
140#define XSH_MOLECFIT_PARAMETER_USE_INPUT_KERNEL_DESC "If TRUE, use the kernel library if it is provided."
143#define XSH_MF_PARAMETERS_FIT_TELESCOPE_BACK_DESC "Flag that indicates whether the telescope background should be fitted."
146#define XSH_MF_PARAMETERS_TELESCOPE_BACK_CONST_DESC "Initial value for the telescope background fit."
149#define XSH_MF_PARAMETERS_PWV_DESC "Value in mm of the precipitable water vapour for the input water vapor profile. If set to a positive value, then the merged profile composed of ref_atm, GDAS, and local meteorological data will scaled to this value. If negative, then no scaling is done."
152#define XSH_MF_PARAMETERS_SLIT_WIDTH_DESC "Slit width in arcsec (taken from FITS header if present)."
157#define XSH_MF_LNFL_LINE_DB_DESC "AER version in format aer_v_X.X. For example aer_v_3.8 or aer_v_3.6."
187 const cpl_parameterlist *parlist,
188 cpl_parameterlist* ilist,
189 cpl_parameterlist* iframelist);
cpl_error_code xsh_molecfit_model_spec_header_calcs(const char *fname, const char *arm, cpl_parameterlist *ilist)
cpl_error_code xsh_molecfit_model_spec_data_calcs(mf_wrap_fits *data, const char *is_idp, cpl_parameterlist *ilist, mf_wrap_model_parameter *parameters)
void xsh_molecfit_model_qc(cpl_propertylist *pl, cpl_table *tab)
cpl_error_code xsh_molecfit_setup_frameset(cpl_frameset *frameset, cpl_parameterlist *list, const char *arm, const char *input_name)
cpl_error_code xsh_molecfit_model_config(cpl_frameset *frameset, const cpl_parameterlist *parlist, cpl_parameterlist *ilist, cpl_parameterlist *iframelist)