High-Level Data Reduction Library 1.6.0a5
High-Level data reduction routines for ESO pipelines
Loading...
Searching...
No Matches
hdrl_spectrum_shift.h File Reference
#include "hdrl_spectrum.h"
#include <cpl.h>
Include dependency graph for hdrl_spectrum_shift.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

CPL_BEGIN_DECLS hdrl_xcorrelation_resulthdrl_spectrum1D_compute_shift_xcorrelation (const hdrl_spectrum1D *s1, const hdrl_spectrum1D *s2, const cpl_size half_win, const cpl_boolean normalize)
 The function computes the shift between the two spectra.
 
hdrl_parameterhdrl_spectrum1D_shift_fit_parameter_create (const hdrl_data_t wguess, const hdrl_data_t range_wmin, const hdrl_data_t range_wmax, const hdrl_data_t fit_wmin, const hdrl_data_t fit_wmax, const hdrl_data_t fit_half_win)
 The function create a hdrl_spectrum1D_shift_parameter to be used in hdrl_spectrum1D_compute_shift_fit.
 
hdrl_data_t hdrl_spectrum1D_compute_shift_fit (const hdrl_spectrum1D *obs, const hdrl_parameter *par)
 The function compute the shift due to radial velocity. If wguess is the reference line and wfound is its position in the obs spectrum, the function returns (wfound - wguess) / wguess. The algorithm generate a smoothed fit of the spectrum, between [range_wmin, range_wmax] but the wavelengths between [fit_wim, fit_wmax] are ignored when fitting. obs is then divided by the fitted spectrum. The ratio is then smoothed again via fitting inside the window [wguess - fit_half_win, wguess + fit_half_win]. The wavelength corresponding to the minimum value is wfound.