X-shooter Pipeline Reference Manual 3.8.15
xsh_molecfit_correct.h
Go to the documentation of this file.
1/*
2 * This file is part of the ESO X-Shooter Pipeline
3 * Copyright (C) 2001-2018 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef XSH_MOLECFIT_CORRECT_H
21#define XSH_MOLECFIT_CORRECT_H
22/*----------------------------------------------------------------------------*/
26/*----------------------------------------------------------------------------*/
27
28/* Include both telluriccorr *and* our extra wrapper codes, since
29 we deliberately don't want to have them (pre-included) in telluriccorr.h
30 to ensure telluriccorr is still comptabile with molecfit_correct
31*/
32
33#include <string.h>
34#include <math.h>
35
36#include <cpl.h>
37
38//#include <telluriccorr.h>
39#include "mf_wrap.h"
40#include "mf_wrap_config.h"
41#include "mf_wrap_config_corr.h"
42#include "mf_spectrum.h"
43#include "xsh_molecfit_utils.h"
44
45/*----------------------------------------------------------------------------*/
49/*----------------------------------------------------------------------------*/
50
51/*----------------------------------------------------------------------------*/
55/*----------------------------------------------------------------------------*/
56
57
58/*#define XSHOOTER_INPUT_DATA_FLUX_COLUMN "Flux"
59
60//descriptions for the input parameters...
61//by default grab the DESC already defined in molecfit_config or telluriccorr
62//in case we want to define our own xshooter specific help
63#define XSH_MOLECFIT_PARAMETER_LIST_DESC MOLECFIT_PARAMETER_LIST_DESC
64#define XSH_MOLECFIT_PARAMETER_FIT_DESC MOLECFIT_PARAMETER_FIT_DESC
65#define XSH_MOLECFIT_PARAMETER_RELATIVE_VALUE_DESC MOLECFIT_PARAMETER_RELATIVE_VALUE_DESC
66#define XSH_MOLECFIT_PARAMETER_WAVE_RANGE_INCLUDE_DESC MOLECFIT_PARAMETER_WAVE_RANGE_INCLUDE_DESC
67#define XSH_MOLECFIT_PARAMETER_WAVE_RANGE_EXCLUDE_DESC MOLECFIT_PARAMETER_WAVE_RANGE_EXCLUDE_DESC
68#define XSH_MOLECFIT_PARAMETER_PIXEL_RANGE_EXCLUDE_DESC MOLECFIT_PARAMETER_PIXEL_RANGE_EXCLUDE_DESC
69#define XSH_MF_PARAMETERS_COLUMN_LAMBDA_DESC MF_PARAMETERS_COLUMN_LAMBDA_DESC
70#define XSH_MF_PARAMETERS_COLUMN_FLUX_DESC MF_PARAMETERS_COLUMN_FLUX_DESC
71#define XSH_MF_PARAMETERS_COLUMN_DFLUX_DESC MF_PARAMETERS_COLUMN_DFLUX_DESC
72#define XSH_MF_PARAMETERS_DEFAULT_ERROR_DESC MF_PARAMETERS_DEFAULT_ERROR_DESC
73#define XSH_MF_PARAMETERS_FTOL_DESC MF_PARAMETERS_FTOL_DESC
74#define XSH_MF_PARAMETERS_XTOL_DESC MF_PARAMETERS_XTOL_DESC
75#define XSH_MF_PARAMETERS_FIT_CONTINUUM_DESC MF_PARAMETERS_FIT_CONTINUUM_DESC
76#define XSH_MF_PARAMETERS_CONTINUUM_N_DESC MF_PARAMETERS_CONTINUUM_N_DESC
77#define XSH_MF_PARAMETERS_FIT_WLC_DESC MF_PARAMETERS_FIT_WLC_DESC
78#define XSH_MF_PARAMETERS_WLC_N_DESC MF_PARAMETERS_WLC_N_DESC
79#define XSH_MF_PARAMETERS_WLC_CONST_DESC MF_PARAMETERS_WLC_CONST_DESC
80#define XSH_MF_PARAMETERS_FIT_RES_BOX_DESC MF_PARAMETERS_FIT_RES_BOX_DESC
81#define XSH_MF_PARAMETERS_FIT_GAUSS_DESC MF_PARAMETERS_FIT_GAUSS_DESC
82#define XSH_MF_PARAMETERS_RES_GAUSS_DESC MF_PARAMETERS_RES_GAUSS_DESC
83#define XSH_MF_PARAMETERS_FIT_LORENTZ_DESC MF_PARAMETERS_FIT_LORENTZ_DESC
84#define XSH_MF_PARAMETERS_RES_LORENTZ_DESC MF_PARAMETERS_RES_LORENTZ_DESC
85#define XSH_MF_PARAMETERS_KERN_MODE_DESC MF_PARAMETERS_KERN_MODE_DESC
86#define XSH_MF_PARAMETERS_KERN_FAC_DESC MF_PARAMETERS_KERN_FAC_DESC
87#define XSH_MF_PARAMETERS_VAR_KERN_DESC MF_PARAMETERS_VAR_KERN_DESC
88#define XSH_MOLECFIT_PARAMETER_USE_INPUT_KERNEL_DESC MOLECFIT_PARAMETER_USE_INPUT_KERNEL_DESC
89#define XSH_MF_PARAMETERS_FIT_TELESCOPE_BACK_DESC MF_PARAMETERS_FIT_TELESCOPE_BACK_DESC
90#define XSH_MF_PARAMETERS_TELESCOPE_BACK_CONST_DESC MF_PARAMETERS_TELESCOPE_BACK_CONST_DESC
91#define XSH_MF_PARAMETERS_PWV_DESC MF_PARAMETERS_PWV_DESC
92
93
94*/
95
96/*----------------------------------------------------------------------------*/
100/*----------------------------------------------------------------------------*/
101
102/*----------------------------------------------------------------------------*/
106/*----------------------------------------------------------------------------*/
107
108/*----------------------------------------------------------------------------*/
112/*----------------------------------------------------------------------------*/
113
114
115/*----------------------------------------------------------------------------*/
119/*----------------------------------------------------------------------------*/
120cpl_error_code xsh_molecfit_correct_config(cpl_frameset *frameset, const cpl_parameterlist *parlist, cpl_parameterlist* ilist, cpl_parameterlist* iframelist);
121int xsh_molecfit_correct(cpl_frameset *frameset, const cpl_parameterlist *parlist);
122//char* xsh_corr_basename(const char* string);
123/*cpl_error_code xsh_molecfit_model_config(cpl_frameset *frameset,
124 const cpl_parameterlist *parlist,
125 cpl_parameterlist* ilist,
126 cpl_parameterlist* iframelist);
127
128cpl_error_code xsh_molecfit_model_spec_header_calcs(const char* fname,const char* arm, cpl_parameterlist* ilist);
129
130cpl_error_code xsh_molecfit_model_spec_data_calcs(mf_wrap_fits* data, const char* is_idp, cpl_parameterlist* ilist,mf_wrap_model_parameter* parameters);
131
132cpl_error_code xsh_molecfit_setup_frameset(cpl_frameset* frameset,cpl_parameterlist* list,const char* arm,const char* input_name);
133*/
134
135#endif /*XSH_MOLECFIT_CORRECT_H*/
int xsh_molecfit_correct(cpl_frameset *frameset, const cpl_parameterlist *parlist)
cpl_error_code xsh_molecfit_correct_config(cpl_frameset *frameset, const cpl_parameterlist *parlist, cpl_parameterlist *ilist, cpl_parameterlist *iframelist)