Functions | |
| cpl_error_code | irplib_polynomial_fit_2d_dispersion (cpl_polynomial *self, const cpl_image *imgwave, int fitdeg, double *presid) |
| Fit a 2D-dispersion from an image of wavelengths. | |
| cpl_error_code | irplib_polynomial_find_1d_from_correlation (cpl_polynomial *self, int maxdeg, const cpl_vector *obs, void *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, void *, int), double pixtol, double pixstep, int hsize, int maxite, double *pxc) |
| Modify self by maximizing the cross-correlation. | |
| cpl_error_code | irplib_vector_fill_line_spectrum (cpl_vector *self, const cpl_polynomial *disp, void *lsslamp, int hsize) |
| Generate a 1D spectrum from a model and a dispersion relation. | |
| cpl_error_code | irplib_plot_spectrum_and_model (const cpl_vector *self, const cpl_polynomial *disp1d, void *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, void *, int)) |
| Plot a 1D spectrum and one from a model. | |
| cpl_error_code | irplib_polynomial_shift_1d_from_correlation (cpl_polynomial *self, const cpl_vector *obs, void *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, void *, int), int hsize, cpl_boolean doplot) |
| Shift self by the amount that maximizes the cross-correlation. | |
| cpl_error_code | irplib_vector_fill_line_spectrum_model (cpl_vector *self, cpl_vector *linepix, const cpl_polynomial *disp, const cpl_bivector *lines, double wslit, double wfwhm, double xtrunc, int hsize) |
| Generate a 1D spectrum from (arc) lines and a dispersion relation. | |
| double | irplib_erf_antideriv (double x, double sigma) |
| The antiderivative of erx(x/sigma/sqrt(2)) with respect to x. | |
Variables | |
| cpl_polynomial * | irplib_multimin::disp1d |
| cpl_vector * | irplib_multimin::spectrum |
| void * | irplib_multimin::param |
| cpl_error_code(* | irplib_multimin::filler )(cpl_vector *, const cpl_polynomial *, void *, int) |
| cpl_vector * | irplib_multimin::vxc |
| double | irplib_multimin::xc |
| int | irplib_multimin::maxxc |
| double | irplib_multimin::mxc |
| cpl_polynomial * | irplib_multimin::mdisp |
| int | irplib_multimin::ishift |
| cpl_error_code irplib_polynomial_fit_2d_dispersion | ( | cpl_polynomial * | self, | |
| const cpl_image * | imgwave, | |||
| int | fitdeg, | |||
| double * | presid | |||
| ) |
Fit a 2D-dispersion from an image of wavelengths.
| self | 2D-polynomial to hold fit | |
| imgwave | Image map of wavelengths, any pixeltype | |
| fitdeg | Degree of fit | |
| presid | On success, points to fitting residual |
Definition at line 113 of file irplib_wavecal.c.
| cpl_error_code irplib_polynomial_find_1d_from_correlation | ( | cpl_polynomial * | self, | |
| int | maxdeg, | |||
| const cpl_vector * | obs, | |||
| void * | model, | |||
| cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, void *, int) | filler, | |||
| double | pixtol, | |||
| double | pixstep, | |||
| int | hsize, | |||
| int | maxite, | |||
| double * | pxc | |||
| ) |
Modify self by maximizing the cross-correlation.
| self | 1D-Dispersion relation to modify, at least of degree 1 | |
| maxdeg | Maximize the cross-correlation by modifying maxdeg degree | |
| obs | The observed spectrum to correlate against | |
| model | The model of the lines/OTF etc. | |
| filler | The function to fill the model spectrum | |
| pixtol | The (positive) dispersion tolerance, e.g. 1e-6 | |
| pixstep | The step length used in the maximization, e.g. 0.5 [pixel] | |
| hsize | Half the search-distance to ensure a global-maximum, hsize >= 0 | |
| maxite | Maximum number of iterations, e.g. 100 * maxdeg | |
| pxc | On sucess, *pxc is the cross-correlation |
Definition at line 215 of file irplib_wavecal.c.
| cpl_error_code irplib_vector_fill_line_spectrum | ( | cpl_vector * | self, | |
| const cpl_polynomial * | disp, | |||
| void * | lsslamp, | |||
| int | hsize | |||
| ) |
Generate a 1D spectrum from a model and a dispersion relation.
| self | Vector to fill with spectrum | |
| disp | 1D-Dispersion relation, at least of degree 1 | |
| lsslamp | Pointer to irplib_line_spectrum_model struct | |
| hsize | The 1st intensity in self will be disp(1-hsize), hsize >= 0 |
double wslit; // Slit Width double wfwhm; // FWHM of transfer function double xtrunc; // Truncate transfer function beyond xtrunc, xtrunc > 0 const cpl_bivector * lines; // Catalogue of intensities, with // increasing X-vector elements cpl_vector * linepix; // NULL, or temporary work-space of size // equal to the lines bivector // - should be uninitialized to zero unsigned cost; // Will be incremented for each call
The units of the X-values of the lines is assumed to be the same as that of disp, the units of wslit, wfwhm and xtrunc are assumed to be the same as the input unit of disp(), the units of self will be that of the Y-values of the lines.
Definition at line 418 of file irplib_wavecal.c.
References irplib_vector_fill_line_spectrum_model().
| cpl_error_code irplib_plot_spectrum_and_model | ( | const cpl_vector * | self, | |
| const cpl_polynomial * | disp1d, | |||
| void * | model, | |||
| cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, void *, int) | filler | |||
| ) |
Plot a 1D spectrum and one from a model.
| self | Vector with observed spectrum | |
| disp1d | 1D-Dispersion relation, at least of degree 1 | |
| model | Pointer to model parameters | |
| filler | The function to fill the model spectrum |
Definition at line 456 of file irplib_wavecal.c.
| cpl_error_code irplib_polynomial_shift_1d_from_correlation | ( | cpl_polynomial * | self, | |
| const cpl_vector * | obs, | |||
| void * | model, | |||
| cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, void *, int) | filler, | |||
| int | hsize, | |||
| cpl_boolean | doplot | |||
| ) |
Shift self by the amount that maximizes the cross-correlation.
| self | 1D-Dispersion relation to shift, at least of degree 1 | |
| obs | The observed spectrum to correlate against | |
| model | Pointer to model parameters | |
| filler | The function to fill the model spectrum | |
| hsize | Half the search-distance, hsize > 0 [pixel] | |
| doplot | Plot the cross-correlation as a function of pixel shift |
Definition at line 534 of file irplib_wavecal.c.
| cpl_error_code irplib_vector_fill_line_spectrum_model | ( | cpl_vector * | self, | |
| cpl_vector * | linepix, | |||
| const cpl_polynomial * | disp, | |||
| const cpl_bivector * | lines, | |||
| double | wslit, | |||
| double | wfwhm, | |||
| double | xtrunc, | |||
| int | hsize | |||
| ) |
Generate a 1D spectrum from (arc) lines and a dispersion relation.
| self | Vector to fill with spectrum | |
| linepix | Vector to update with best guess of line pixel position | |
| disp | 1D-Dispersion relation, at least of degree 1 | |
| lines | Catalogue of lines, with increasing wavelengths | |
| wslit | Positive width of the slit | |
| wfwhm | Positive FWHM of the transfer function | |
| xtrunc | Truncate the line profile beyond distance xtrunc, xtrunc > 0 | |
| hsize | The 1st intensity in self will be disp(1-hsize), hsize >= 0 |
Definition at line 636 of file irplib_wavecal.c.
References irplib_erf_antideriv().
Referenced by irplib_vector_fill_line_spectrum().
| double irplib_erf_antideriv | ( | double | x, | |
| double | sigma | |||
| ) |
The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.
| x | x | |
| sigma | sigma |
Definition at line 806 of file irplib_wavecal.c.
Referenced by irplib_vector_fill_line_spectrum_model().
1.5.8