High-Level Data Reduction Library: hdrl_response.h Source File

High-Level Data Reduction Library 1.6.0 High-Level data reduction routines for ESO pipelines

Loading...
Searching...
No Matches
hdrl_response.h
Go to the documentation of this file.
1/* $Id: hdrl_spectrum_response.h,v 0.1 2017-04-25 09:02:08 msalmist Exp $
2 *
3 * This file is part of the HDRL
4 * Copyright (C) 2017 European Southern Observatory
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21/*
22 * $Author: msalmist $
23 * $Date: 2017-04-25 09:02:08 $
24 * $Revision: 0.1 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifndef HDRL_RESPONSE_H_
29#define HDRL_RESPONSE_H_
30
31/*-----------------------------------------------------------------------------
32 Includes
33 -----------------------------------------------------------------------------*/
34
35#include <cpl.h>
36#include "hdrl_spectrum.h"
37#include "hdrl_spectrumlist.h"
38#include "hdrl_spectrum_shift.h"
39
40CPL_BEGIN_DECLS
41
42/*-----------------------------------------------------------------------------
43 Functions
44 -----------------------------------------------------------------------------*/
45 hdrl_parameter *
46 hdrl_response_telluric_evaluation_parameter_create(
47 const hdrl_spectrum1Dlist * telluric_models,
48 hdrl_data_t w_step,
49 cpl_size half_win,
50 cpl_boolean normalize,
51 cpl_boolean shift_in_log_scale,
52 const cpl_bivector * quality_areas,
53 const cpl_bivector * fit_areas,
54 hdrl_data_t lmin,
55 hdrl_data_t lmax);
56
57 hdrl_parameter *
58 hdrl_response_fit_parameter_create(
59 const cpl_size radius, const cpl_array * fit_points,
60 const hdrl_data_t wrange, const cpl_bivector * high_abs_regions);
61
62 typedef struct{
63
64 hdrl_spectrum1D * final_response;
65 hdrl_spectrum1D * selected_response;
66 hdrl_spectrum1D * raw_response;
67
68 hdrl_spectrum1D * corrected_observed_spectrum;
69 cpl_size best_telluric_model_idx;
70 hdrl_data_t telluric_shift;
71 hdrl_data_t avg_diff_from_1;
72 hdrl_data_t stddev;
73
74 hdrl_data_t doppler_shift;
75
76}hdrl_response_result;
77
78 const hdrl_spectrum1D *
79 hdrl_response_result_get_final_response(const hdrl_response_result * res);
80 const hdrl_spectrum1D *
81 hdrl_response_result_get_selected_response(const hdrl_response_result * res);
82 const hdrl_spectrum1D *
83 hdrl_response_result_get_raw_response(const hdrl_response_result * res);
84 const hdrl_spectrum1D *
85 hdrl_response_result_get_corrected_obs_spectrum(const hdrl_response_result * res);
86cpl_size
87 hdrl_response_result_get_best_telluric_model_idx(const hdrl_response_result * res);
88 hdrl_data_t
89 hdrl_response_result_get_avg_diff_from_1(const hdrl_response_result * res);
90 hdrl_data_t
91 hdrl_response_result_get_stddev(const hdrl_response_result * res);
92 hdrl_data_t
93 hdrl_response_result_get_telluric_shift(const hdrl_response_result * res);
94 hdrl_data_t
95 hdrl_response_result_get_doppler_shift(const hdrl_response_result * res);
96
97 void
98 hdrl_response_result_delete(hdrl_response_result *);
99
100 hdrl_response_result *
101 hdrl_response_compute(
102 const hdrl_spectrum1D * obs_s,
103 const hdrl_spectrum1D * ref_s,
104 const hdrl_spectrum1D * E_x,
105 const hdrl_parameter * telluric_par,
106 const hdrl_parameter * velocity_par,
107 const hdrl_parameter * calc_par,
108 const hdrl_parameter * fit_par);
109
110
111#if defined HDRL_USE_PRIVATE
112
113 hdrl_spectrum1D *
114 hdrl_response_evaluate_telluric_models(
115 const hdrl_spectrum1D * obs_s,
116 const hdrl_parameter * ev,
117 hdrl_data_t * telluric_shift,
118 hdrl_data_t * mean_minus_1, hdrl_data_t * stddev,
119 cpl_size * best_model_index);
120
121 hdrl_spectrum1D *
122 hdrl_response_evaluate_telluric_model(const hdrl_spectrum1D * obs_s_arg,
123 const hdrl_spectrum1D * telluric_s_arg,
124 const hdrl_data_t w_step,
125 const cpl_size half_win,
126 const cpl_boolean normalize,
127 const cpl_boolean shift_in_log_scale,
128 const cpl_bivector * quality_areas,
129 const cpl_bivector * fit_areas,
130 const hdrl_data_t lmin, const hdrl_data_t lmax,
131 double * mean_minus_1, double * stddev,
132 double * telluric_shift);
133#endif
134
135CPL_END_DECLS
136
137#endif /* HDRL_RESPONSE_H_ */
hdrl_data_t
double hdrl_data_t
Definition hdrl_types.h:62
hdrl_spectrumlist.h
hdrl_spectrum.h
hdrl_spectrum_shift.h
hdrl_parameter
struct _hdrl_parameter_ hdrl_parameter
Definition hdrl_parameter.h:27
hdrl_response_result_get_stddev
hdrl_data_t hdrl_response_result_get_stddev(const hdrl_response_result *res)
Getter of the standard deviation of the ratio between the corrected observed spectrum and its smoothe...
Definition hdrl_response.c:706
hdrl_response_result_get_final_response
const hdrl_spectrum1D * hdrl_response_result_get_final_response(const hdrl_response_result *res)
Getter for the final response contained inside the hdrl_response_result.
Definition hdrl_response.c:586
hdrl_response_result_get_selected_response
const hdrl_spectrum1D * hdrl_response_result_get_selected_response(const hdrl_response_result *res)
Getter for the selected response contained inside the hdrl_response_result.
Definition hdrl_response.c:606
hdrl_response_fit_parameter_create
hdrl_parameter * hdrl_response_fit_parameter_create(const cpl_size radius, const cpl_array *fit_points, const hdrl_data_t wrange, const cpl_bivector *high_abs_regions)
ctor for the hdrl_parameter for the final interpolation of the response
Definition hdrl_response.c:403
hdrl_response_result_get_best_telluric_model_idx
cpl_size hdrl_response_result_get_best_telluric_model_idx(const hdrl_response_result *res)
Getter of the index of the telluric model used for telluric correction contained in hdrl_response_res...
Definition hdrl_response.c:662
hdrl_response_result_get_doppler_shift
hdrl_data_t hdrl_response_result_get_doppler_shift(const hdrl_response_result *res)
Getter of the doppler shift used to correct the model.
Definition hdrl_response.c:744
hdrl_response_evaluate_telluric_model
hdrl_spectrum1D * hdrl_response_evaluate_telluric_model(const hdrl_spectrum1D *obs_s_arg, const hdrl_spectrum1D *telluric_s_arg, const hdrl_data_t w_step, const cpl_size half_win, const cpl_boolean normalize, const cpl_boolean shift_in_log_scale, const cpl_bivector *quality_areas, const cpl_bivector *fit_areas, const hdrl_data_t lmin, const hdrl_data_t lmax, double *mean_minus_1, double *stddev, double *telluric_shift)
Definition hdrl_response.c:888
hdrl_response_result_delete
void hdrl_response_result_delete(hdrl_response_result *)
Destructor for hdrl_response_result.
Definition hdrl_response.c:757
hdrl_response_evaluate_telluric_models
hdrl_spectrum1D * hdrl_response_evaluate_telluric_models(const hdrl_spectrum1D *obs_s, const hdrl_parameter *ev, hdrl_data_t *telluric_shift, hdrl_data_t *mean_minus_1, hdrl_data_t *stddev, cpl_size *best_model_index)
Definition hdrl_response.c:776
hdrl_response_compute
hdrl_response_result * hdrl_response_compute(const hdrl_spectrum1D *obs_s, const hdrl_spectrum1D *ref_s, const hdrl_spectrum1D *E_x, const hdrl_parameter *telluric_par, const hdrl_parameter *velocity_par, const hdrl_parameter *calc_par, const hdrl_parameter *fit_par)
Computation of the response.
Definition hdrl_response.c:459
hdrl_response_telluric_evaluation_parameter_create
CPL_BEGIN_DECLS hdrl_parameter * hdrl_response_telluric_evaluation_parameter_create(const hdrl_spectrum1Dlist *telluric_models, hdrl_data_t w_step, cpl_size half_win, cpl_boolean normalize, cpl_boolean shift_in_log_scale, const cpl_bivector *quality_areas, const cpl_bivector *fit_areas, hdrl_data_t lmin, hdrl_data_t lmax)
ctor for the hdrl_parameter for the telluric evaluation
Definition hdrl_response.c:347
hdrl_response_result_get_raw_response
const hdrl_spectrum1D * hdrl_response_result_get_raw_response(const hdrl_response_result *res)
Getter for the raw response contained inside the hdrl_response_result.
Definition hdrl_response.c:625
hdrl_response_result_get_avg_diff_from_1
hdrl_data_t hdrl_response_result_get_avg_diff_from_1(const hdrl_response_result *res)
Getter of the value |mean - 1|, where mean is the average of the ratio between the corrected observed...
Definition hdrl_response.c:684
hdrl_response_result_get_telluric_shift
hdrl_data_t hdrl_response_result_get_telluric_shift(const hdrl_response_result *res)
Getter of the shift applied to the telluric model.
Definition hdrl_response.c:726
hdrl_response_result_get_corrected_obs_spectrum
const hdrl_spectrum1D * hdrl_response_result_get_corrected_obs_spectrum(const hdrl_response_result *res)
Getter for the corrected observed spectrum contained in hdrl_response_result.
Definition hdrl_response.c:643
hdrl_response_result
Definition hdrl_response.h:62
hdrl_response_result::telluric_shift
hdrl_data_t telluric_shift
Definition hdrl_response.h:70
hdrl_response_result::doppler_shift
hdrl_data_t doppler_shift
Definition hdrl_response.h:74
hdrl_response_result::corrected_observed_spectrum
hdrl_spectrum1D * corrected_observed_spectrum
Definition hdrl_response.h:68
hdrl_response_result::best_telluric_model_idx
cpl_size best_telluric_model_idx
Definition hdrl_response.h:69
hdrl_response_result::avg_diff_from_1
hdrl_data_t avg_diff_from_1
Definition hdrl_response.h:71
hdrl_response_result::selected_response
hdrl_spectrum1D * selected_response
Definition hdrl_response.h:65
hdrl_response_result::raw_response
hdrl_spectrum1D * raw_response
Definition hdrl_response.h:66
hdrl_response_result::final_response
hdrl_spectrum1D * final_response
Definition hdrl_response.h:64
hdrl_response_result::stddev
hdrl_data_t stddev
Definition hdrl_response.h:72
hdrl_spectrum1D
Definition hdrl_spectrum_defs.h:44
hdrl_spectrum1Dlist
Definition hdrl_spectrumlist.h:44