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

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

Loading...
Searching...
No Matches
hdrl_spectrum.h
Go to the documentation of this file.
1/* $Id: hdrl_spectrum.h,v 0.1 2017-02-28 16:20:00 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-02-28 16:20:00 $
24 * $Revision: 0.1 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifndef HDRL_SPECTRUM_H
29#define HDRL_SPECTRUM_H
30
31/*-----------------------------------------------------------------------------
32 Includes
33 -----------------------------------------------------------------------------*/
34
35#include "hdrl_image.h"
36#include "hdrl_correlation.h"
37#include "hdrl_spectrum_defs.h"
38
39#include <cpl.h>
40
41CPL_BEGIN_DECLS
42
43#if defined HDRL_USE_EXPERIMENTAL || defined HDRL_USE_PRIVATE
44
45cpl_boolean
46 hdrl_spectrum1D_is_uniformly_sampled(const hdrl_spectrum1D * self, double * bin);
47
48 void hdrl_spectrum1D_save(const hdrl_spectrum1D * s, const char * fname);
49
50#endif
51
52/*-----------------------------------------------------------------------------
53 Functions - Constructors
54 -----------------------------------------------------------------------------*/
55 hdrl_spectrum1D * hdrl_spectrum1D_create(const cpl_image * arg_flux,
56 const cpl_image * arg_flux_e,
57 const cpl_array * wavelength,
58 hdrl_spectrum1D_wave_scale wave_scale);
59
60 hdrl_spectrum1D * hdrl_spectrum1D_create_error_free
61 (const cpl_image * arg_flux,
62 const cpl_array * wavelength,
63 hdrl_spectrum1D_wave_scale scale);
64
65 hdrl_spectrum1D * hdrl_spectrum1D_create_error_DER_SNR
66 (const cpl_image * arg_flux,
67 cpl_size half_window,
68 const cpl_array * wavelength,
69 hdrl_spectrum1D_wave_scale scale);
70
71 typedef hdrl_value (* calculate_analytic_spectrum_point) (hdrl_data_t lambda);
72
73 hdrl_spectrum1D * hdrl_spectrum1D_create_analytic(
74 calculate_analytic_spectrum_point func,
75 const cpl_array * wavelength,
76 hdrl_spectrum1D_wave_scale scale);
77
78 hdrl_spectrum1D * hdrl_spectrum1D_duplicate(const hdrl_spectrum1D* self);
79
80 void hdrl_spectrum1D_delete(hdrl_spectrum1D ** p_self);
81
82
83/*-----------------------------------------------------------------------------
84 Functions - Getter operations
85 -----------------------------------------------------------------------------*/
86
87cpl_size hdrl_spectrum1D_get_size(const hdrl_spectrum1D * self);
88
89 const hdrl_image*
90 hdrl_spectrum1D_get_flux(const hdrl_spectrum1D * self);
91
92
93 typedef struct{
94 const cpl_array * wavelength;
95 const cpl_mask * bpm;
96 hdrl_spectrum1D_wave_scale scale;
97}hdrl_spectrum1D_wavelength;
98
99 hdrl_spectrum1D_wavelength
100 hdrl_spectrum1D_get_wavelength(const hdrl_spectrum1D * self);
101
102 hdrl_spectrum1D_wave_scale
103 hdrl_spectrum1D_get_scale(const hdrl_spectrum1D * self);
104
105
106 hdrl_value
107 hdrl_spectrum1D_get_flux_value(const hdrl_spectrum1D * self, int idx, int* rej);
108
109 hdrl_data_t
110 hdrl_spectrum1D_get_wavelength_value(const hdrl_spectrum1D * self, int idx, int* rej);
111
112
113/*-----------------------------------------------------------------------------
114 Functions - Vectorial flux operations
115 -----------------------------------------------------------------------------*/
116
117cpl_boolean
118 hdrl_spectrum1D_are_spectra_compatible(const hdrl_spectrum1D_wavelength* s1,
119 const hdrl_spectrum1D_wavelength* s2);
120cpl_boolean
121 hdrl_spectrum1D_are_wavelengths_compatible(const cpl_array* w1,
122 const cpl_array* w2);
123 hdrl_spectrum1D *
124 hdrl_spectrum1D_div_spectrum_create(const hdrl_spectrum1D * num,
125 const hdrl_spectrum1D * den);
126
127 hdrl_spectrum1D *
128 hdrl_spectrum1D_mul_spectrum_create(const hdrl_spectrum1D * f1,
129 const hdrl_spectrum1D * f2);
130
131 hdrl_spectrum1D *
132 hdrl_spectrum1D_add_spectrum_create(const hdrl_spectrum1D * f1,
133 const hdrl_spectrum1D * f2);
134
135 hdrl_spectrum1D *
136 hdrl_spectrum1D_sub_spectrum_create(const hdrl_spectrum1D * f1,
137 const hdrl_spectrum1D * f2);
138
139
140cpl_error_code hdrl_spectrum1D_div_spectrum( hdrl_spectrum1D * self,
141 const hdrl_spectrum1D * other);
142
143cpl_error_code hdrl_spectrum1D_mul_spectrum( hdrl_spectrum1D * self,
144 const hdrl_spectrum1D * other);
145
146cpl_error_code hdrl_spectrum1D_add_spectrum( hdrl_spectrum1D * self,
147 const hdrl_spectrum1D * other);
148
149cpl_error_code hdrl_spectrum1D_sub_spectrum( hdrl_spectrum1D * self,
150 const hdrl_spectrum1D * other);
151
152/*-----------------------------------------------------------------------------
153 Functions - Scalar flux operations
154 -----------------------------------------------------------------------------*/
155
156 hdrl_spectrum1D *
157 hdrl_spectrum1D_div_scalar_create(const hdrl_spectrum1D * self,
158 hdrl_value scalar_operator);
159
160 hdrl_spectrum1D *
161 hdrl_spectrum1D_mul_scalar_create(const hdrl_spectrum1D * self,
162 hdrl_value scalar_operator);
163
164 hdrl_spectrum1D *
165 hdrl_spectrum1D_add_scalar_create(const hdrl_spectrum1D * self,
166 hdrl_value scalar_operator);
167
168 hdrl_spectrum1D *
169 hdrl_spectrum1D_sub_scalar_create(const hdrl_spectrum1D * self,
170 hdrl_value scalar_operator);
171
172 hdrl_spectrum1D *
173 hdrl_spectrum1D_pow_scalar_create(const hdrl_spectrum1D * self,
174 hdrl_value scalar_operator);
175
176 hdrl_spectrum1D *
177 hdrl_spectrum1D_exp_scalar_create(const hdrl_spectrum1D * self,
178 hdrl_value scalar_operator);
179
180cpl_error_code hdrl_spectrum1D_div_scalar(hdrl_spectrum1D * self,
181 hdrl_value scalar_operator);
182
183cpl_error_code hdrl_spectrum1D_mul_scalar(hdrl_spectrum1D * self,
184 hdrl_value scalar_operator);
185
186cpl_error_code hdrl_spectrum1D_add_scalar(hdrl_spectrum1D * self,
187 hdrl_value scalar_operator);
188
189cpl_error_code hdrl_spectrum1D_sub_scalar(hdrl_spectrum1D * self,
190 hdrl_value scalar_operator);
191
192cpl_error_code hdrl_spectrum1D_pow_scalar(hdrl_spectrum1D * self,
193 hdrl_value scalar_operator);
194
195cpl_error_code hdrl_spectrum1D_exp_scalar(hdrl_spectrum1D * self,
196 hdrl_value scalar_operator);
197
198/*-----------------------------------------------------------------------------
199 Functions - Wavelength operations
200 -----------------------------------------------------------------------------*/
201
202cpl_error_code hdrl_spectrum1D_wavelength_mult_scalar_linear(hdrl_spectrum1D * self,
203 hdrl_data_t scale_linear);
204
205 hdrl_spectrum1D *
206 hdrl_spectrum1D_wavelength_mult_scalar_linear_create(const hdrl_spectrum1D * self,
207 hdrl_data_t scale_linear);
208
209
210cpl_error_code hdrl_spectrum1D_wavelength_shift(hdrl_spectrum1D * self,
211 hdrl_data_t shift);
212
213 hdrl_spectrum1D *
214 hdrl_spectrum1D_wavelength_shift_create(const hdrl_spectrum1D * self,
215 hdrl_data_t shift);
216
217
218cpl_error_code hdrl_spectrum1D_wavelength_convert_to_linear(hdrl_spectrum1D * self);
219
220 hdrl_spectrum1D *
221 hdrl_spectrum1D_wavelength_convert_to_linear_create(const hdrl_spectrum1D * self);
222
223cpl_error_code hdrl_spectrum1D_wavelength_convert_to_log(hdrl_spectrum1D * self);
224
225
226 hdrl_spectrum1D *
227 hdrl_spectrum1D_wavelength_convert_to_log_create(const hdrl_spectrum1D * self);
228
229/*-----------------------------------------------------------------------------
230 Functions - Selectors
231 -----------------------------------------------------------------------------*/
232
233 hdrl_spectrum1D *
234 hdrl_spectrum1D_select_wavelengths(const hdrl_spectrum1D * self,
235 const cpl_bivector * windows, const cpl_boolean is_internal);
236
237 hdrl_spectrum1D *
238 hdrl_spectrum1D_reject_pixels(const hdrl_spectrum1D * self,
239 const cpl_array * bad_samples);
240
241
242/*-----------------------------------------------------------------------------
243 Functions - Table conversions
244 -----------------------------------------------------------------------------*/
245
246cpl_table * hdrl_spectrum1D_convert_to_table
247(const hdrl_spectrum1D * self, const char * flux_col_name,
248 const char* wavelength_col_name, const char * flux_e_col_name,
249 const char * flux_bpm_col_name);
250
251 hdrl_spectrum1D * hdrl_spectrum1D_convert_from_table
252(const cpl_table * self, const char * flux_col_name,
253 const char* wavelength_col_name, const char * flux_e_col_name,
254 const char * flux_bpm_col_name, hdrl_spectrum1D_wave_scale scale);
255
256cpl_error_code hdrl_spectrum1D_append_to_table
257(const hdrl_spectrum1D * self, cpl_table * dest,
258 const char * flux_col_name, const char* wavelength_col_name,
259 const char * flux_e_col_name, const char * flux_bpm_col_name);
260
261
262CPL_END_DECLS
263
264#endif
hdrl_data_t
double hdrl_data_t
Definition hdrl_types.h:62
hdrl_image.h
hdrl_correlation.h
calculate_analytic_spectrum_point
hdrl_value(* calculate_analytic_spectrum_point)(hdrl_data_t lambda)
Definition hdrl_spectrum.h:71
hdrl_spectrum_defs.h
hdrl_spectrum1D_wave_scale
hdrl_spectrum1D_wave_scale
Definition hdrl_spectrum_defs.h:38
scale
const hdrl_spectrum1D_wave_scale scale
Definition hdrl_response-test.c:41
hdrl_spectrum1D_pow_scalar_create
hdrl_spectrum1D * hdrl_spectrum1D_pow_scalar_create(const hdrl_spectrum1D *self, hdrl_value scalar_operator)
subtract a scalar from a spectrum
Definition hdrl_spectrum.c:649
hdrl_spectrum1D_get_flux
const hdrl_image * hdrl_spectrum1D_get_flux(const hdrl_spectrum1D *self)
hdrl_spectrum1D getter flux
Definition hdrl_spectrum.c:357
hdrl_spectrum1D_mul_scalar
cpl_error_code hdrl_spectrum1D_mul_scalar(hdrl_spectrum1D *self, hdrl_value scalar_operator)
computes the elementwise multiplication of a spectrum by a scalar, the self parameter is modified
Definition hdrl_spectrum.c:695
hdrl_spectrum1D_wavelength_mult_scalar_linear
cpl_error_code hdrl_spectrum1D_wavelength_mult_scalar_linear(hdrl_spectrum1D *self, hdrl_data_t scale_linear)
computes the elementwise multiplication of the scalar for the wavelength. The scalar is assumed to be...
Definition hdrl_spectrum.c:767
hdrl_spectrum1D_wavelength_convert_to_linear
cpl_error_code hdrl_spectrum1D_wavelength_convert_to_linear(hdrl_spectrum1D *self)
converts the wavelength scale to linear.
Definition hdrl_spectrum.c:859
hdrl_spectrum1D_sub_spectrum_create
hdrl_spectrum1D * hdrl_spectrum1D_sub_spectrum_create(const hdrl_spectrum1D *f1, const hdrl_spectrum1D *f2)
subtract two spectra
Definition hdrl_spectrum.c:515
hdrl_spectrum1D_wavelength_shift
cpl_error_code hdrl_spectrum1D_wavelength_shift(hdrl_spectrum1D *self, hdrl_data_t shift)
computes the elementwise shift of the wavelength by the shift parameter. The self parameter is modifi...
Definition hdrl_spectrum.c:816
hdrl_spectrum1D_div_spectrum
cpl_error_code hdrl_spectrum1D_div_spectrum(hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
divide one spectrum by another spectrum
Definition hdrl_spectrum.c:528
hdrl_spectrum1D_pow_scalar
cpl_error_code hdrl_spectrum1D_pow_scalar(hdrl_spectrum1D *self, hdrl_value scalar_operator)
computes the elementwise power of the flux to the scalar, the self parameter is modified
Definition hdrl_spectrum.c:737
hdrl_spectrum1D_mul_spectrum_create
hdrl_spectrum1D * hdrl_spectrum1D_mul_spectrum_create(const hdrl_spectrum1D *f1, const hdrl_spectrum1D *f2)
multiply one spectrum by another spectrum
Definition hdrl_spectrum.c:482
hdrl_spectrum1D_duplicate
hdrl_spectrum1D * hdrl_spectrum1D_duplicate(const hdrl_spectrum1D *self)
hdrl_spectrum1D copy constructor
Definition hdrl_spectrum.c:302
hdrl_spectrum1D_get_size
cpl_size hdrl_spectrum1D_get_size(const hdrl_spectrum1D *self)
hdrl_spectrum1D getter for size
Definition hdrl_spectrum.c:343
hdrl_spectrum1D_delete
void hdrl_spectrum1D_delete(hdrl_spectrum1D **p_self)
hdrl_spectrum1D destructor
Definition hdrl_spectrum.c:322
hdrl_spectrum1D_save
void hdrl_spectrum1D_save(const hdrl_spectrum1D *s, const char *fname)
Definition hdrl_spectrum.c:1246
hdrl_spectrum1D_mul_spectrum
cpl_error_code hdrl_spectrum1D_mul_spectrum(hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
multiply one spectrum by another spectrum
Definition hdrl_spectrum.c:540
hdrl_spectrum1D_wavelength_convert_to_log
cpl_error_code hdrl_spectrum1D_wavelength_convert_to_log(hdrl_spectrum1D *self)
converts the wavelength scale to log. If the spectrum is already in log scale nothing is done.
Definition hdrl_spectrum.c:898
hdrl_spectrum1D_div_spectrum_create
hdrl_spectrum1D * hdrl_spectrum1D_div_spectrum_create(const hdrl_spectrum1D *num, const hdrl_spectrum1D *den)
divide one spectrum by another spectrum
Definition hdrl_spectrum.c:466
hdrl_spectrum1D_exp_scalar
cpl_error_code hdrl_spectrum1D_exp_scalar(hdrl_spectrum1D *self, hdrl_value scalar_operator)
computes the elementwise power of the scalar to the flux, the self parameter is modified
Definition hdrl_spectrum.c:751
hdrl_spectrum1D_mul_scalar_create
hdrl_spectrum1D * hdrl_spectrum1D_mul_scalar_create(const hdrl_spectrum1D *self, hdrl_value scalar_operator)
multiply a spectrum by a scalar
Definition hdrl_spectrum.c:598
hdrl_spectrum1D_sub_spectrum
cpl_error_code hdrl_spectrum1D_sub_spectrum(hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
subtract two spectra
Definition hdrl_spectrum.c:565
hdrl_spectrum1D_wavelength_shift_create
hdrl_spectrum1D * hdrl_spectrum1D_wavelength_shift_create(const hdrl_spectrum1D *self, hdrl_data_t shift)
computes the elementwise shift of the wavelength by the shift parameter.
Definition hdrl_spectrum.c:835
hdrl_spectrum1D_div_scalar_create
hdrl_spectrum1D * hdrl_spectrum1D_div_scalar_create(const hdrl_spectrum1D *self, hdrl_value scalar_operator)
divide a spectrum by a scalar
Definition hdrl_spectrum.c:581
hdrl_spectrum1D_create_error_DER_SNR
hdrl_spectrum1D * hdrl_spectrum1D_create_error_DER_SNR(const cpl_image *arg_flux, cpl_size half_window, const cpl_array *wavelength, hdrl_spectrum1D_wave_scale scale)
hdrl_spectrum1D constructor when no error information is available, in this case we use DER_SNR to es...
Definition hdrl_spectrum.c:251
hdrl_spectrum1D_convert_from_table
hdrl_spectrum1D * hdrl_spectrum1D_convert_from_table(const cpl_table *self, const char *flux_col_name, const char *wavelength_col_name, const char *flux_e_col_name, const char *flux_bpm_col_name, hdrl_spectrum1D_wave_scale scale)
convert a table to a spectrum
Definition hdrl_spectrum.c:1200
hdrl_spectrum1D_wavelength_convert_to_log_create
hdrl_spectrum1D * hdrl_spectrum1D_wavelength_convert_to_log_create(const hdrl_spectrum1D *self)
converts the wavelength scale to log. It returns a modified version of self. self is not modified....
Definition hdrl_spectrum.c:921
hdrl_spectrum1D_are_wavelengths_compatible
cpl_boolean hdrl_spectrum1D_are_wavelengths_compatible(const cpl_array *w1, const cpl_array *w2)
checks if two wavelengths array are defined on the same wavelengths.
Definition hdrl_spectrum.c:1262
hdrl_spectrum1D_sub_scalar
cpl_error_code hdrl_spectrum1D_sub_scalar(hdrl_spectrum1D *self, hdrl_value scalar_operator)
computes the elementwise subtraction of a spectrum by a scalar, the self parameter is modified
Definition hdrl_spectrum.c:723
hdrl_spectrum1D_is_uniformly_sampled
cpl_boolean hdrl_spectrum1D_is_uniformly_sampled(const hdrl_spectrum1D *self, double *bin)
checks if the spectrum is defined on uniformly sampled wavelengths.
Definition hdrl_spectrum.c:1317
hdrl_spectrum1D_create
CPL_BEGIN_DECLS hdrl_spectrum1D * hdrl_spectrum1D_create(const cpl_image *arg_flux, const cpl_image *arg_flux_e, const cpl_array *wavelength, hdrl_spectrum1D_wave_scale wave_scale)
hdrl_spectrum1D default constructor
Definition hdrl_spectrum.c:117
hdrl_spectrum1D_add_scalar
cpl_error_code hdrl_spectrum1D_add_scalar(hdrl_spectrum1D *self, hdrl_value scalar_operator)
computes the elementwise addition of a spectrum by a scalar, the self parameter is modified
Definition hdrl_spectrum.c:709
hdrl_spectrum1D_add_spectrum
cpl_error_code hdrl_spectrum1D_add_spectrum(hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
sum two spectra
Definition hdrl_spectrum.c:552
hdrl_spectrum1D_exp_scalar_create
hdrl_spectrum1D * hdrl_spectrum1D_exp_scalar_create(const hdrl_spectrum1D *self, hdrl_value scalar_operator)
subtract a scalar from a spectrum
Definition hdrl_spectrum.c:666
hdrl_spectrum1D_sub_scalar_create
hdrl_spectrum1D * hdrl_spectrum1D_sub_scalar_create(const hdrl_spectrum1D *self, hdrl_value scalar_operator)
subtract a scalar from a spectrum
Definition hdrl_spectrum.c:632
hdrl_spectrum1D_wavelength_mult_scalar_linear_create
hdrl_spectrum1D * hdrl_spectrum1D_wavelength_mult_scalar_linear_create(const hdrl_spectrum1D *self, hdrl_data_t scale_linear)
computes the elementwise multiplication of the scalar for the wavelength. The scalar is assumed to be...
Definition hdrl_spectrum.c:793
hdrl_spectrum1D_get_scale
hdrl_spectrum1D_wave_scale hdrl_spectrum1D_get_scale(const hdrl_spectrum1D *self)
hdrl_spectrum1D getter for scale
Definition hdrl_spectrum.c:400
hdrl_spectrum1D_get_wavelength
hdrl_spectrum1D_wavelength hdrl_spectrum1D_get_wavelength(const hdrl_spectrum1D *self)
hdrl_spectrum1D getter for wavelengths
Definition hdrl_spectrum.c:372
hdrl_spectrum1D_create_error_free
hdrl_spectrum1D * hdrl_spectrum1D_create_error_free(const cpl_image *arg_flux, const cpl_array *wavelength, hdrl_spectrum1D_wave_scale scale)
hdrl_spectrum1D constructor in the case of error-free spectrum (i.e. the error on the flux is zero fo...
Definition hdrl_spectrum.c:205
hdrl_spectrum1D_add_scalar_create
hdrl_spectrum1D * hdrl_spectrum1D_add_scalar_create(const hdrl_spectrum1D *self, hdrl_value scalar_operator)
add a scalar to a spectrum
Definition hdrl_spectrum.c:615
hdrl_spectrum1D_get_wavelength_value
hdrl_data_t hdrl_spectrum1D_get_wavelength_value(const hdrl_spectrum1D *self, int idx, int *rej)
hdrl_spectrum1D getter for a wavelength value
Definition hdrl_spectrum.c:434
hdrl_spectrum1D_create_analytic
hdrl_spectrum1D * hdrl_spectrum1D_create_analytic(calculate_analytic_spectrum_point func, const cpl_array *wavelength, hdrl_spectrum1D_wave_scale scale)
hdrl_spectrum1D constructor in the case of a spectrum defined by an analytical function
Definition hdrl_spectrum.c:160
hdrl_spectrum1D_append_to_table
cpl_error_code hdrl_spectrum1D_append_to_table(const hdrl_spectrum1D *self, cpl_table *dest, const char *flux_col_name, const char *wavelength_col_name, const char *flux_e_col_name, const char *flux_bpm_col_name)
append a spectrum to a table.
Definition hdrl_spectrum.c:1115
hdrl_spectrum1D_wavelength_convert_to_linear_create
hdrl_spectrum1D * hdrl_spectrum1D_wavelength_convert_to_linear_create(const hdrl_spectrum1D *self)
converts the wavelength scale to linear.
Definition hdrl_spectrum.c:880
hdrl_spectrum1D_convert_to_table
cpl_table * hdrl_spectrum1D_convert_to_table(const hdrl_spectrum1D *self, const char *flux_col_name, const char *wavelength_col_name, const char *flux_e_col_name, const char *flux_bpm_col_name)
converts a spectrum in a table.
Definition hdrl_spectrum.c:1073
hdrl_spectrum1D_select_wavelengths
hdrl_spectrum1D * hdrl_spectrum1D_select_wavelengths(const hdrl_spectrum1D *self, const cpl_bivector *windows, const cpl_boolean is_internal)
the function selects or discards flux values according to whether the value of the corresponding wave...
Definition hdrl_spectrum.c:954
hdrl_spectrum1D_add_spectrum_create
hdrl_spectrum1D * hdrl_spectrum1D_add_spectrum_create(const hdrl_spectrum1D *f1, const hdrl_spectrum1D *f2)
sum one spectrum to another spectrum
Definition hdrl_spectrum.c:498
hdrl_spectrum1D_div_scalar
cpl_error_code hdrl_spectrum1D_div_scalar(hdrl_spectrum1D *self, hdrl_value scalar_operator)
computes the elementwise division of a spectrum by a scalar, the self parameter is modified
Definition hdrl_spectrum.c:680
hdrl_spectrum1D_are_spectra_compatible
cpl_boolean hdrl_spectrum1D_are_spectra_compatible(const hdrl_spectrum1D_wavelength *s1, const hdrl_spectrum1D_wavelength *s2)
checks if two spectrum wavelengths are equal.
Definition hdrl_spectrum.c:1293
hdrl_spectrum1D_reject_pixels
hdrl_spectrum1D * hdrl_spectrum1D_reject_pixels(const hdrl_spectrum1D *self, const cpl_array *bad_samples)
For every i-th element in bad_samples having value CPL_TRUE, the i-th pixel in the 1D spectrum is mar...
Definition hdrl_spectrum.c:1026
hdrl_spectrum1D_get_flux_value
hdrl_value hdrl_spectrum1D_get_flux_value(const hdrl_spectrum1D *self, int idx, int *rej)
hdrl_spectrum1D getter for a flux value
Definition hdrl_spectrum.c:416
_hdrl_image_
Definition hdrl_image_defs.h:40
hdrl_spectrum1D_wavelength
Definition hdrl_spectrum.h:93
hdrl_spectrum1D_wavelength::scale
hdrl_spectrum1D_wave_scale scale
Definition hdrl_spectrum.h:96
hdrl_spectrum1D_wavelength::bpm
const cpl_mask * bpm
Definition hdrl_spectrum.h:95
hdrl_spectrum1D_wavelength::wavelength
const cpl_array * wavelength
Definition hdrl_spectrum.h:94
hdrl_spectrum1D
Definition hdrl_spectrum_defs.h:44
hdrl_value
Definition hdrl_types.h:77