|
CR2RE Pipeline Reference Manual 1.6.7
|
Functions | |
| int | cr2res_slit_curv_compute_order_trace (const hdrl_image *img, const cpl_table *trace_wave, const int order, const int trace, const int height, const int window, const cpl_size change_degree, const int slit_degree, cpl_polynomial **slit_poly_a, cpl_polynomial **slit_poly_b, cpl_polynomial **slit_poly_c) |
| Get the slit curvature directly from the image. | |
| hdrl_image * | cr2res_slit_curv_gen_map (const cpl_table *trace_wave, int order, int trace_id, int spacing_pixels, int full_trace) |
| Compute the slit_curv map from the trace_wave table. | |
| cpl_polynomial * | cr2res_slit_curv_build_poly (cpl_polynomial *slit_poly_a, cpl_polynomial *slit_poly_b, cpl_polynomial *slit_poly_c, cpl_size x) |
| Create the slit curvature polynomial for x position. | |
| cpl_polynomial * cr2res_slit_curv_build_poly | ( | cpl_polynomial * | slit_poly_a, |
| cpl_polynomial * | slit_poly_b, | ||
| cpl_polynomial * | slit_poly_c, | ||
| cpl_size | x | ||
| ) |
Create the slit curvature polynomial for x position.
| slit_poly_a | Polynomial for the a coefficient |
| slit_poly_b | Polynomial for the b coefficient |
| slit_poly_c | Polynomial for the c coefficient |
| x | The x position (1->2048) |
Definition at line 557 of file cr2res_slit_curv.c.
Referenced by cr2res_slit_curv_gen_map().
| int cr2res_slit_curv_compute_order_trace | ( | const hdrl_image * | img, |
| const cpl_table * | trace_wave, | ||
| const int | order, | ||
| const int | trace, | ||
| const int | height, | ||
| const int | window, | ||
| const cpl_size | change_degree, | ||
| const int | slit_degree, | ||
| cpl_polynomial ** | slit_poly_a, | ||
| cpl_polynomial ** | slit_poly_b, | ||
| cpl_polynomial ** | slit_poly_c | ||
| ) |
Get the slit curvature directly from the image.
| img | The input image |
| trace_wave | The trace wave, with the order tracing |
| order | The order to determine the curvature for |
| trace | The trace to determine the curvature for |
To determine the curvature we perform several steps. First, find all peaks in the spectrum. Next for each peak, fit a Gaussian with a shifted peak (as a function of the vertical offset y) to the image. The shift of the peak determines the curvature. Finally fit the curvature coefficients to all peaks along the order.
All coefficients are given in the global reference frame The transformation to the local frame is given by: a(x) += - x + yc * b(x) + yc * yc * c(x) b(x) += 2 * yc * c(x)
Definition at line 133 of file cr2res_slit_curv.c.
References cr2res_etalon_find_peaks(), cr2res_extract_sum_vert(), cr2res_image_cut_rectify(), cr2res_trace_get_ycen(), hdrl_image_delete(), hdrl_image_get_image_const(), and hdrl_image_new().
| hdrl_image * cr2res_slit_curv_gen_map | ( | const cpl_table * | trace_wave, |
| int | order, | ||
| int | trace_id, | ||
| int | spacing_pixels, | ||
| int | full_trace | ||
| ) |
Compute the slit_curv map from the trace_wave table.
| trace_wave | The trace wave table |
| order | The order number or -1 for all |
| trace_id | The trace_id number or -1 for all |
| spacing_pixels | The space in pixels between the traces |
| full_trace | Draw on the full detector or only in the trace |
The returned image must be deallocated with hdrl_image_delete()
Definition at line 429 of file cr2res_slit_curv.c.
References cr2res_convert_array_to_poly(), cr2res_slit_curv_build_poly(), hdrl_image_get_image(), and hdrl_image_new().