|
CR2RE Pipeline Reference Manual 1.6.2
|
Functions | |
| cpl_vector * | cr2res_etalon_get_local_maxima (const cpl_vector *in, cpl_vector **left_edges, cpl_vector **right_edges) |
| Find local maxima in a 1D array. This function finds all local maxima in a 1D array and returns the indices for their edges and midpoints (rounded down for even plateau sizes). | |
| cpl_vector * | cr2res_etalon_select_by_peak_distance (const cpl_vector *peaks, const cpl_vector *peak_heights, float distance) |
| Selects the highest peaks that are atleast distance pixel apart. | |
| cpl_vector * | cr2res_etalon_find_peaks (const cpl_vector *in, double height, double distance) |
| Detect peaks from a 1d periodic signal and store their positions. | |
| cpl_polynomial * | cr2res_etalon_wave_2d (cpl_bivector **spectra, cpl_bivector **spectra_err, cpl_polynomial **wavesol_init, cpl_array **wavesol_init_err, int *orders, int *traces_nb, int ninputs, cpl_size degree_x, cpl_size degree_y, int zp_order, int display, cpl_array **wavelength_error, cpl_table **line_diagnostics) |
| Create the 2d wavecal fit using etalon peaks. | |
| cpl_vector * cr2res_etalon_find_peaks | ( | const cpl_vector * | in, |
| double | height, | ||
| double | distance | ||
| ) |
Detect peaks from a 1d periodic signal and store their positions.
| in | The 1d signal as a vector |
| height | The minimum height of each peak |
| distance | The minimum distance between peaks |
Loosely based on scipy.signal.find_peaks
Definition at line 466 of file cr2res_etalon.c.
References cr2res_etalon_get_local_maxima(), and cr2res_etalon_select_by_peak_distance().
Referenced by cr2res_etalon_wave_2d(), and cr2res_slit_curv_compute_order_trace().
| cpl_vector * cr2res_etalon_get_local_maxima | ( | const cpl_vector * | in, |
| cpl_vector ** | left_edges, | ||
| cpl_vector ** | right_edges | ||
| ) |
Find local maxima in a 1D array. This function finds all local maxima in a 1D array and returns the indices for their edges and midpoints (rounded down for even plateau sizes).
| in | The 1d signal as a vector |
| left_edges | [out] left edge positions of the peaks |
| right_edges | [out] right edge positions of the peaks |
The left_edge and right_edge vectors need to be deleted afterwards Note that the edges here refer to points with exactly the same value, not the width of the gaussian peak
Definition at line 278 of file cr2res_etalon.c.
Referenced by cr2res_etalon_find_peaks().
| cpl_vector * cr2res_etalon_select_by_peak_distance | ( | const cpl_vector * | peaks, |
| const cpl_vector * | peak_heights, | ||
| float | distance | ||
| ) |
Selects the highest peaks that are atleast distance pixel apart.
| peaks | The 1d signal as a vector |
| peak_heights | The heights (priority) of each peak |
| distance | The minimum distance between peaks to keep |
Definition at line 369 of file cr2res_etalon.c.
Referenced by cr2res_etalon_find_peaks().
| cpl_polynomial * cr2res_etalon_wave_2d | ( | cpl_bivector ** | spectra, |
| cpl_bivector ** | spectra_err, | ||
| cpl_polynomial ** | wavesol_init, | ||
| cpl_array ** | wavesol_init_err, | ||
| int * | orders, | ||
| int * | traces_nb, | ||
| int | ninputs, | ||
| cpl_size | degree_x, | ||
| cpl_size | degree_y, | ||
| int | zp_order, | ||
| int | display, | ||
| cpl_array ** | wavelength_error, | ||
| cpl_table ** | line_diagnostics | ||
| ) |
Create the 2d wavecal fit using etalon peaks.
| spectra | List of extracted spectra |
| spectra_err | List of extracted spectra errors |
| wavesol_init | List of Initial wavelength solutions |
| wavesol_init_err | List of Initial wavelength error (can be NULL) |
| orders | List of orders of the various spectra |
| ninputs | Number of entries in the previous parameters |
| degree_x | The polynomial degree in x |
| degree_y | The polynomial degree in y |
Definition at line 741 of file cr2res_etalon.c.
References cr2res_dfs_create_lines_diagnostics_table(), cr2res_etalon_find_peaks(), and cr2res_wave_poly_2d_to_1d().
Referenced by cr2res_wave_apply().