High-Level Data Reduction Library 1.6.0
High-Level data reduction routines for ESO pipelines
Loading...
Searching...
No Matches
Hdrl_correlation

Functions

hdrl_xcorrelation_resulthdrl_xcorrelation_result_wrap (cpl_array *x_corr, const cpl_size max_idx, const cpl_size half_window)
 Constructor for hdrl_xcorrelation_result.
 
void hdrl_xcorrelation_result_delete (hdrl_xcorrelation_result *self)
 Destructor for hdrl_xcorrelation_result.
 
cpl_size hdrl_xcorrelation_result_get_peak_pixel (const hdrl_xcorrelation_result *self)
 Get the index where the cross correlation reaches its maximum.
 
double hdrl_xcorrelation_result_get_peak_subpixel (const hdrl_xcorrelation_result *self)
 Get the index where the cross correlation reaches its maximum, with sub-pixel precision.
 
cpl_size hdrl_xcorrelation_result_get_half_window (const hdrl_xcorrelation_result *self)
 Get the half_window used to calculate the cross-correlation.
 
double hdrl_xcorrelation_result_get_sigma (const hdrl_xcorrelation_result *self)
 Get the estimated standard deviation of the correlation.
 
const cpl_array * hdrl_xcorrelation_result_get_correlation (const hdrl_xcorrelation_result *self)
 Getter for the cross correlation.
 
hdrl_xcorrelation_resulthdrl_compute_xcorrelation (const cpl_array *arr1, const cpl_array *arr2, const cpl_size half_window, const cpl_boolean normalize)
 Calculate cross-correlation.
 
hdrl_xcorrelation_resulthdrl_compute_offset_gaussian (const cpl_array *arr1, const cpl_array *arr2, const cpl_size half_win, const cpl_boolean normalize, const double bin, const double wrange)
 Calculate gaussian fit on cross-correlation, does a second fitting for refinement.
 
hdrl_xcorrelation_resulthdrl_compute_offset_gaussian_internal (const cpl_array *arr1, const cpl_array *arr2, const cpl_size half_win, const cpl_boolean normalize, const double bin, const double wrange)
 Calculate gaussian fit on cross-correlation.
 

Detailed Description

Function Documentation

◆ hdrl_compute_offset_gaussian()

hdrl_xcorrelation_result * hdrl_compute_offset_gaussian ( const cpl_array *  arr1,
const cpl_array *  arr2,
const cpl_size  half_win,
const cpl_boolean  normalize,
const double  bin,
const double  wrange 
)

Calculate gaussian fit on cross-correlation, does a second fitting for refinement.

Parameters
arr1First array
arr2Second array
half_winhalf search window where the correlation is calculated
normalizeCPL_TRUE normalize correlation in mean and rms
binwavelength bin
wrangehalf window wavelength range where the fit is going to be done
Returns
gaussian fit for cross correlation.

◆ hdrl_compute_offset_gaussian_internal()

hdrl_xcorrelation_result * hdrl_compute_offset_gaussian_internal ( const cpl_array *  arr1,
const cpl_array *  arr2,
const cpl_size  half_win,
const cpl_boolean  normalize,
const double  bin,
const double  wrange 
)

Calculate gaussian fit on cross-correlation.

Parameters
arr1First array
arr2Second array
half_winhalf search window where the correlation is calculated
normalizeCPL_TRUE normalize correlation in mean and rms
binwavelength bin
wrangehalf window wavelength range where the fit is going to be done
Returns
gaussian fit for cross correlation.

◆ hdrl_compute_xcorrelation()

hdrl_xcorrelation_result * hdrl_compute_xcorrelation ( const cpl_array *  arr1,
const cpl_array *  arr2,
const cpl_size  half_window,
const cpl_boolean  normalize 
)

Calculate cross-correlation.

Parameters
arr1First array
arr2Second array
half_windowhalf search window where the correlation is calculated
normalizeCPL_TRUE normalize correlation in mean and rms
Returns
cross correlation and index where the peak is. NULL in case of error.
Note
: elements marked as invalid in arr1 or arr2 will be treated as they were out-of-boudary pixels.

◆ hdrl_xcorrelation_result_delete()

void hdrl_xcorrelation_result_delete ( hdrl_xcorrelation_result self)

Destructor for hdrl_xcorrelation_result.

Parameters
selfhdrl_xcorrelation_result to be deleted

◆ hdrl_xcorrelation_result_get_correlation()

const cpl_array * hdrl_xcorrelation_result_get_correlation ( const hdrl_xcorrelation_result self)

Getter for the cross correlation.

Parameters
selfhdrl_xcorrelation_result the getter will extract the data from
Returns
the cross correlation

◆ hdrl_xcorrelation_result_get_half_window()

cpl_size hdrl_xcorrelation_result_get_half_window ( const hdrl_xcorrelation_result self)

Get the half_window used to calculate the cross-correlation.

Parameters
selfhdrl_xcorrelation_result the getter will extract the data from
Returns
the half_window used to calculate the cross-correlation.

◆ hdrl_xcorrelation_result_get_peak_pixel()

cpl_size hdrl_xcorrelation_result_get_peak_pixel ( const hdrl_xcorrelation_result self)

Get the index where the cross correlation reaches its maximum.

Parameters
selfhdrl_xcorrelation_result the getter will extract the data from
Returns
the index where the cross correlation reaches its maximum

◆ hdrl_xcorrelation_result_get_peak_subpixel()

double hdrl_xcorrelation_result_get_peak_subpixel ( const hdrl_xcorrelation_result self)

Get the index where the cross correlation reaches its maximum, with sub-pixel precision.

Parameters
selfhdrl_xcorrelation_result the getter will extract the data from
Returns
the index where the cross correlation reaches its maximum, with sub-pixel precision

◆ hdrl_xcorrelation_result_get_sigma()

double hdrl_xcorrelation_result_get_sigma ( const hdrl_xcorrelation_result self)

Get the estimated standard deviation of the correlation.

Parameters
selfhdrl_xcorrelation_result the getter will extract the data from
Returns
the estimated standard deviation of the correlation

◆ hdrl_xcorrelation_result_wrap()

hdrl_xcorrelation_result * hdrl_xcorrelation_result_wrap ( cpl_array *  x_corr,
const cpl_size  max_idx,
const cpl_size  half_window 
)

Constructor for hdrl_xcorrelation_result.

Parameters
x_corrCross correlation. x_corr becomes owned by the returned value, do not free x_corr after the wrapping.
max_idxIndex where the cross correlation reaches its maximum
half_windowHalf window used for the cross-correlation calculation
Returns
the constructed object. NULL in case of error. Errors are triggered if data are not self consistent, e.g. if max_idx is greated than the length of x_corr.