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

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

Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
hdrl_spectrum.h File Reference
`#include "hdrl_image.h"`
`#include "hdrl_correlation.h"`
`#include "hdrl_spectrum_defs.h"`
`#include <cpl.h>`
Include dependency graph for hdrl_spectrum.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | hdrl_spectrum1D_wavelength

## Typedefs
typedef hdrl_value(* | calculate_analytic_spectrum_point) (hdrl_data_t lambda)

## Functions
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
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 for every wavelengths).
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 esimate the error. Please refer to the documentation of the function estimate_noise_DER_SNR().
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
hdrl_spectrum1D * | hdrl_spectrum1D_duplicate (const hdrl_spectrum1D *self)
| hdrl_spectrum1D copy constructor
void | hdrl_spectrum1D_delete (hdrl_spectrum1D **p_self)
| hdrl_spectrum1D destructor
cpl_size | hdrl_spectrum1D_get_size (const hdrl_spectrum1D *self)
| hdrl_spectrum1D getter for size
const hdrl_image * | hdrl_spectrum1D_get_flux (const hdrl_spectrum1D *self)
| hdrl_spectrum1D getter flux
hdrl_spectrum1D_wavelength | hdrl_spectrum1D_get_wavelength (const hdrl_spectrum1D *self)
| hdrl_spectrum1D getter for wavelengths
hdrl_spectrum1D_wave_scale | hdrl_spectrum1D_get_scale (const hdrl_spectrum1D *self)
| hdrl_spectrum1D getter for scale
hdrl_value | hdrl_spectrum1D_get_flux_value (const hdrl_spectrum1D *self, int idx, int *rej)
| hdrl_spectrum1D getter for a flux value
hdrl_data_t | hdrl_spectrum1D_get_wavelength_value (const hdrl_spectrum1D *self, int idx, int *rej)
| hdrl_spectrum1D getter for a wavelength value
cpl_boolean | hdrl_spectrum1D_are_spectra_compatible (const hdrl_spectrum1D_wavelength *s1, const hdrl_spectrum1D_wavelength *s2)
| checks if two spectrum wavelengths are equal.
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.
hdrl_spectrum1D * | hdrl_spectrum1D_div_spectrum_create (const hdrl_spectrum1D *num, const hdrl_spectrum1D *den)
| divide one spectrum by another spectrum
hdrl_spectrum1D * | hdrl_spectrum1D_mul_spectrum_create (const hdrl_spectrum1D *f1, const hdrl_spectrum1D *f2)
| multiply one spectrum by another spectrum
hdrl_spectrum1D * | hdrl_spectrum1D_add_spectrum_create (const hdrl_spectrum1D *f1, const hdrl_spectrum1D *f2)
| sum one spectrum to another spectrum
hdrl_spectrum1D * | hdrl_spectrum1D_sub_spectrum_create (const hdrl_spectrum1D *f1, const hdrl_spectrum1D *f2)
| subtract two spectra
cpl_error_code | hdrl_spectrum1D_div_spectrum (hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
| divide one spectrum by another spectrum
cpl_error_code | hdrl_spectrum1D_mul_spectrum (hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
| multiply one spectrum by another spectrum
cpl_error_code | hdrl_spectrum1D_add_spectrum (hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
| sum two spectra
cpl_error_code | hdrl_spectrum1D_sub_spectrum (hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
| subtract two spectra
hdrl_spectrum1D * | hdrl_spectrum1D_div_scalar_create (const hdrl_spectrum1D *self, hdrl_value scalar_operator)
| divide a spectrum by a scalar
hdrl_spectrum1D * | hdrl_spectrum1D_mul_scalar_create (const hdrl_spectrum1D *self, hdrl_value scalar_operator)
| multiply a spectrum by a scalar
hdrl_spectrum1D * | hdrl_spectrum1D_add_scalar_create (const hdrl_spectrum1D *self, hdrl_value scalar_operator)
| add a scalar to a spectrum
hdrl_spectrum1D * | hdrl_spectrum1D_sub_scalar_create (const hdrl_spectrum1D *self, hdrl_value scalar_operator)
| subtract a scalar from a spectrum
hdrl_spectrum1D * | hdrl_spectrum1D_pow_scalar_create (const hdrl_spectrum1D *self, hdrl_value scalar_operator)
| subtract a scalar from a spectrum
hdrl_spectrum1D * | hdrl_spectrum1D_exp_scalar_create (const hdrl_spectrum1D *self, hdrl_value scalar_operator)
| subtract a scalar from a spectrum
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
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
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
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
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
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
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 expressed in linear units. the self parameter is modified
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 expressed in linear units. Self is unchanged and the function returns a newly allocated spectrum.
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 modified
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.
cpl_error_code | hdrl_spectrum1D_wavelength_convert_to_linear (hdrl_spectrum1D *self)
| converts the wavelength scale to linear.
hdrl_spectrum1D * | hdrl_spectrum1D_wavelength_convert_to_linear_create (const hdrl_spectrum1D *self)
| converts the wavelength scale to linear.
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.
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. If self is already in log, the function is equivalent to a duplication.
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 wavelength belongs to the interval [min_lambda, max_lambda].
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 marked as bad.
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.
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
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.

## Typedef Documentation

## ◆ calculate_analytic_spectrum_point

typedef hdrl_value(* calculate_analytic_spectrum_point) (hdrl_data_t lambda)