|
ERIS Pipeline Reference Manual 1.9.2
|
Functions | |
| cpl_vector * | eris_ifu_dist_calc_centers_profile (const cpl_vector *profile, cpl_boolean lowerCutLevel) |
| Detect peak positions from a collapsed profile. | |
| cpl_vector * | eris_ifu_dist_estimate_low_slitlet (const cpl_vector *est_centers) |
| Estimate position of missing low slitlet. | |
| cpl_vector * | eris_ifu_dist_calc_centers_fit (const cpl_vector *profile, const cpl_vector *est_centers, cpl_boolean do_fix_cnt) |
| Fit Gaussian profiles to refine center positions. | |
| cpl_error_code | eris_ifu_dist_calc_centers_copy (const cpl_vector *fit_centers, int y_index, double y_value, cpl_table **cen_array) |
| Copy fitted centers to the output table array. | |
| cpl_table ** | eris_ifu_dist_calc_centers (const hdrl_image *fibre_div, const hdrl_image *fibre_on, int productDepth) |
| Calculate slitlet centers across the detector. | |
| int | eris_ifu_distortion_get_narcs (int i, cpl_boolean triple_traces, cpl_boolean cut_off_left, cpl_boolean cut_off_right) |
| Determine number of arc traces to process for a slitlet. | |
| cpl_polynomial ** | eris_ifu_dist_calc_distortion (cpl_table **slit_edges, cpl_table **centers, int productDepth, cpl_boolean cut_off_left, cpl_boolean cut_off_right, cpl_table **minmax_borders, cpl_propertylist ***qc, cpl_propertylist *pl, cpl_frameset *frameset, const cpl_parameterlist *parlist) |
| Calculate distortion polynomials for all slitlets. | |
| cpl_polynomial ** | eris_ifu_dist_calc_distortion_full (cpl_table **slit_edges, cpl_table **centers, int productDepth, cpl_boolean cut_off_left, cpl_boolean cut_off_right) |
| Calculate distortion polynomials (alternative method) | |
| eris_ifu_vector * | eris_ifu_dist_calc_distortion_fitedge (const cpl_table *edge, const char *col_name, const eris_ifu_vector *y, int n_calib, int n_size, int fit_order, int slitlet, cpl_table *dbg_tbl) |
| Fit polynomial to single edge as function of Y. | |
| cpl_error_code | eris_ifu_dist_calc_distortion_fillgrid (cpl_bivector *grid, const eris_ifu_vector *data, cpl_vector *val_to_fit, double x_pos, int n_size, int arc_cnt) |
| Fill grid with distortion mapping data. | |
| cpl_polynomial * | eris_ifu_dist_poly_fit_2d_create (cpl_bivector *xy_pos, const cpl_vector *values, double *msee) |
| Create 2D polynomial fit from grid data. | |
| cpl_error_code | eris_ifu_dist_save_distortion (cpl_polynomial **poly2d, const cpl_table *minmax_borders, const char *fn, cpl_frameset *frameset, const cpl_parameterlist *parlist, cpl_propertylist **qc) |
| Save distortion polynomials to FITS file. | |
| hdrl_image * | eris_ifu_dist_warp_image_full (const hdrl_image *hdrl_img_in, cpl_polynomial **poly_u, int productDepth) |
| Warp full image using distortion polynomials (alternative method) | |
| hdrl_image * | eris_ifu_dist_warp_slitlet (const hdrl_image *imgIn, const cpl_polynomial *poly_u, const cpl_polynomial *poly_v, double l_min, double r_max, int slitletNr) |
| Warp single slitlet. | |
| hdrl_image * | eris_ifu_dist_warp_image (const hdrl_image *imgIn, cpl_polynomial **poly_u, const cpl_table *borders) |
| Warp full detector image by warping each slitlet. | |
| hdrl_image * | eris_ifu_dist_warp_bpm (const hdrl_image *bpmIn, cpl_polynomial **poly_u, const cpl_table *borders, productDepthType productDepth) |
| Warp bad pixel mask using distortion polynomials. | |
| hdrl_imagelist * | eris_ifu_stack_warped (const hdrl_image *imgIn, const int *rowIx) |
| Stack warped image into cube format. | |
| cpl_error_code | eris_ifu_dist_warp_stats (const hdrl_image *hdrlWarpedImg, cpl_propertylist *qc_list, cpl_propertylist *pl, cpl_frameset *frameset, const cpl_parameterlist *parlist) |
| Compute QC statistics on warped image. | |
| cpl_error_code | eris_ifu_image_add_slit (hdrl_image *hdrlImgFull, const hdrl_image *hdrlImgSlit, int offset) |
| Paste slitlet image into full detector image. | |
| cpl_table ** | eris_ifu_dist_calc_slitpos (cpl_image **arcImg, cpl_table **centers_array, cpl_table *valid_arc_lines, int productDepth, cpl_boolean *cut_off_left, cpl_boolean *cut_off_right, const cpl_frameset *frameset, const cpl_parameterlist *parlist) |
| Calculate slitlet edge positions from arc lamp images. | |
| cpl_error_code | eris_ifu_fit_gauss (const cpl_vector *x, const cpl_vector *y, double *x0, double *sigma, double *area, double *offset) |
| Fit Gaussian to find peak center and width. | |
| cpl_vector * | eris_ifu_polyfit_edge (const eris_ifu_vector *x, const eris_ifu_vector *y, int fit_order) |
| Iterative polynomial fitting with outlier rejection. | |
| cpl_error_code | eris_ifu_wavecal_processSof_dist (cpl_frameset *frames, int exposureCorrectionMode, int *arcImgCnt, hdrl_imagelist **arcImages, int **lampStates, ifsBand *band, ifsPreopticsScale *scale, ifsInstrument *instrument, double saturation_threhold, cpl_table **qclog) |
| Process arc lamp images for distortion calibration. | |
| cpl_error_code | eris_ifu_distortion_reduce_lines (cpl_table *tbl, ifsBand band, int nr_cols) |
| Filter valid arc lines by intensity and fit quality. | |
| cpl_error_code | eris_ifu_distortion_reduce_identical_lines (cpl_table *tbl) |
| Remove duplicate or overlapping arc lines. | |
| cpl_table * | eris_ifu_dist_wave (cpl_frameset *fs, cpl_table **centers_fitted, int productDepth, cpl_image ***arcImgs, int *imgCnt, const cpl_parameterlist *parlist, cpl_table **qclog) |
| Perform wavelength calibration to identify valid arc lines. | |
This module provides comprehensive functions for geometric distortion correction in IFU spectrograph data. The distortion correction process involves:
The main workflow includes:
| cpl_table ** eris_ifu_dist_calc_centers | ( | const hdrl_image * | fibre_div, |
| const hdrl_image * | fibre_on, | ||
| int | productDepth | ||
| ) |
Calculate slitlet centers across the detector.
| fibre_div | Divided fiber flat field image |
| fibre_on | Fiber illumination image |
| productDepth | Debug output level (bit flags) |
This is the main function for determining slitlet center positions:
Definition at line 785 of file eris_ifu_distortion_static.c.
References BRK_IF_ERROR, BRK_IF_NULL, CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_ifu_calc_centers_collapse_chunk(), eris_ifu_dist_calc_centers_copy(), eris_ifu_dist_calc_centers_fit(), eris_ifu_dist_calc_centers_profile(), eris_ifu_free_propertylist(), eris_ifu_free_string(), eris_ifu_free_table(), eris_ifu_free_vector(), eris_ifu_save_vector_dbg(), hdrl_image_get_image_const(), and TRY.
| cpl_error_code eris_ifu_dist_calc_centers_copy | ( | const cpl_vector * | fit_centers, |
| int | y_index, | ||
| double | y_value, | ||
| cpl_table ** | cen_array | ||
| ) |
Copy fitted centers to the output table array.
| fit_centers | Vector of fitted center positions |
| y_index | Row index in output tables |
| y_value | Y coordinate value to store |
| cen_array | Array of output tables (one per slitlet) |
This function distributes fitted centers into per-slitlet tables:
Definition at line 586 of file eris_ifu_distortion_static.c.
References BRK_IF_ERROR, BRK_IF_NULL, BRK_WITH_ERROR_MSG, CATCH, CATCH_MSGS, and TRY.
Referenced by eris_ifu_dist_calc_centers().
| cpl_vector * eris_ifu_dist_calc_centers_fit | ( | const cpl_vector * | profile, |
| const cpl_vector * | est_centers, | ||
| cpl_boolean | do_fix_cnt | ||
| ) |
Fit Gaussian profiles to refine center positions.
| profile | The profile in X across the detector |
| est_centers | Estimated center positions from peak detection |
| do_fix_cnt | If TRUE, correct the count to exactly 32 or 96 traces |
This function performs Gaussian fitting to refine center estimates:
Outlier rejection strategy:
Definition at line 371 of file eris_ifu_distortion_static.c.
References BRK_IF_ERROR, BRK_IF_NULL, CATCH, CATCH_MSGS, eris_ifu_dist_estimate_low_slitlet(), eris_ifu_free_ifu_vector(), eris_ifu_free_vector(), eris_ifu_vector_count_non_rejected(), eris_ifu_vector_create(), eris_ifu_vector_extract(), eris_ifu_vector_get(), eris_ifu_vector_get_median(), eris_ifu_vector_get_stdev_median(), eris_ifu_vector_is_rejected(), eris_ifu_vector_reject(), SET_ERROR, and TRY.
Referenced by eris_ifu_dist_calc_centers().
| cpl_vector * eris_ifu_dist_calc_centers_profile | ( | const cpl_vector * | profile, |
| cpl_boolean | lowerCutLevel | ||
| ) |
Detect peak positions from a collapsed profile.
| profile | Input profile vector (collapsed in Y direction) |
| lowerCutLevel | If TRUE, use lower threshold for peak detection |
This function analyzes a horizontal profile and detects peaks by:
Definition at line 73 of file eris_ifu_distortion_static.c.
References BRK_IF_ERROR, BRK_IF_NULL, CATCH, CATCH_MSGS, eris_ifu_free_ifu_vector(), eris_ifu_free_vector(), eris_ifu_vector_create(), eris_ifu_vector_get_mean(), and TRY.
Referenced by eris_ifu_dist_calc_centers().
| cpl_polynomial ** eris_ifu_dist_calc_distortion | ( | cpl_table ** | slit_edges, |
| cpl_table ** | centers, | ||
| int | productDepth, | ||
| cpl_boolean | cut_off_left, | ||
| cpl_boolean | cut_off_right, | ||
| cpl_table ** | minmax_borders, | ||
| cpl_propertylist *** | qc, | ||
| cpl_propertylist * | pl, | ||
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Calculate distortion polynomials for all slitlets.
| slit_edges | Array of tables with detected slit edge positions |
| centers | Array of tables with fitted slitlet centers |
| productDepth | Debug output level |
| cut_off_left | Indicates if leftmost slitlet is cut off |
| cut_off_right | Indicates if rightmost slitlet is cut off |
| minmax_borders | Output: table with min/max border positions per slitlet |
| qc | Output: array of QC property lists (one per slitlet) |
| pl | Property list for FITS headers |
| frameset | Input frameset |
| parlist | Parameter list |
This function computes 2D polynomial distortion maps:
Definition at line 1136 of file eris_ifu_distortion_static.c.
References ASSURE, BRK_IF_ERROR, BRK_IF_NULL, CHECK_ERROR_STATE, eris_ifu_dist_calc_distortion(), eris_ifu_dist_calc_distortion_fitedge(), eris_ifu_distortion_get_narcs(), eris_ifu_free_ifu_vector(), eris_ifu_vector_add(), eris_ifu_vector_duplicate(), eris_ifu_vector_get_mean(), eris_ifu_vector_new_wrap(), eris_ifu_vector_subtract(), and TRY.
Referenced by eris_ifu_dist_calc_distortion().
| cpl_error_code eris_ifu_dist_calc_distortion_fillgrid | ( | cpl_bivector * | grid, |
| const eris_ifu_vector * | data, | ||
| cpl_vector * | val_to_fit, | ||
| double | x_pos, | ||
| int | n_size, | ||
| int | arc_cnt | ||
| ) |
Fill grid with distortion mapping data.
| grid | Output: 2D grid of target coordinates (x, y) |
| data | Input: fitted edge positions |
| val_to_fit | Output: measured X positions to fit |
| x_pos | Target X position for this arc |
| n_size | Number of data points |
| arc_cnt | Arc index (for offset in grid) |
Populates grid and value arrays for 2D polynomial fitting:
Definition at line 2449 of file eris_ifu_distortion_static.c.
| eris_ifu_vector * eris_ifu_dist_calc_distortion_fitedge | ( | const cpl_table * | edge, |
| const char * | col_name, | ||
| const eris_ifu_vector * | y, | ||
| int | n_calib, | ||
| int | n_size, | ||
| int | fit_order, | ||
| int | slitlet, | ||
| cpl_table * | dbg_tbl | ||
| ) |
Fit polynomial to single edge as function of Y.
| edge | Table with edge positions |
| col_name | Column name containing X positions |
| y | Y coordinate vector |
| n_calib | Number of calibration points |
| n_size | Output vector size (number of Y positions) |
| fit_order | Polynomial order (typically 2 or 3) |
| slitlet | Slitlet index for debugging |
| dbg_tbl | Debug table to store polynomial coefficients |
Fits polynomial of form: x(y) = a0 + a1*y + a2*y^2 + ... Returns evaluated positions at regular Y intervals.
Definition at line 2363 of file eris_ifu_distortion_static.c.
Referenced by eris_ifu_dist_calc_distortion().
| cpl_polynomial ** eris_ifu_dist_calc_distortion_full | ( | cpl_table ** | slit_edges, |
| cpl_table ** | centers, | ||
| int | productDepth, | ||
| cpl_boolean | cut_off_left, | ||
| cpl_boolean | cut_off_right | ||
| ) |
Calculate distortion polynomials (alternative method)
| slit_edges | Array of tables with detected slit edge positions |
| centers | Array of tables with fitted slitlet centers |
| productDepth | Debug output level |
| cut_off_left | Indicates if leftmost slitlet is cut off |
| cut_off_right | Indicates if rightmost slitlet is cut off |
Alternative distortion calculation with different polynomial fitting approach. Uses same input data but different target coordinate calculation.
Definition at line 1844 of file eris_ifu_distortion_static.c.
| cpl_table ** eris_ifu_dist_calc_slitpos | ( | cpl_image ** | arcImg, |
| cpl_table ** | centers_array, | ||
| cpl_table * | valid_arc_lines, | ||
| int | productDepth, | ||
| cpl_boolean * | cut_off_left, | ||
| cpl_boolean * | cut_off_right, | ||
| const cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Calculate slitlet edge positions from arc lamp images.
| arcImg | Array of arc lamp images |
| centers_array | Array of tables with fitted slitlet centers |
| valid_arc_lines | Table of valid arc lines (from wavelength calibration) |
| productDepth | Debug output level |
| cut_off_left | Output: TRUE if leftmost slitlet is cut off |
| cut_off_right | Output: TRUE if rightmost slitlet is cut off |
| frameset | Input frameset |
| parlist | Parameter list |
Detects slit edges for each arc line:
Output tables contain columns:
Definition at line 3818 of file eris_ifu_distortion_static.c.
| cpl_vector * eris_ifu_dist_estimate_low_slitlet | ( | const cpl_vector * | est_centers | ) |
Estimate position of missing low slitlet.
| est_centers | Input vector with estimated center positions |
This function handles cases where peak detection misses a slitlet by:
Definition at line 218 of file eris_ifu_distortion_static.c.
References BRK_IF_ERROR, BRK_IF_NULL, CATCH, CATCH_MSGS, eris_ifu_free_vector(), and TRY.
Referenced by eris_ifu_dist_calc_centers_fit().
| cpl_polynomial * eris_ifu_dist_poly_fit_2d_create | ( | cpl_bivector * | xy_pos, |
| const cpl_vector * | values, | ||
| double * | msee | ||
| ) |
Create 2D polynomial fit from grid data.
| xy_pos | 2D grid of (x,y) positions |
| values | Measured values to fit |
| msee | Output: mean squared error estimate (optional, can be NULL) |
Performs 2D polynomial fit with maximum degrees:
The polynomial can be evaluated at any (x,y) to get the fitted value.
Definition at line 2526 of file eris_ifu_distortion_static.c.
| cpl_error_code eris_ifu_dist_save_distortion | ( | cpl_polynomial ** | poly2d, |
| const cpl_table * | minmax_borders, | ||
| const char * | fn, | ||
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parlist, | ||
| cpl_propertylist ** | qc | ||
| ) |
Save distortion polynomials to FITS file.
| poly2d | Array of 2D polynomials (one per slitlet) |
| minmax_borders | Table with min/max border positions |
| fn | Output filename |
| frameset | Input frameset for provenance |
| parlist | Parameter list for provenance |
| qc | Array of QC property lists |
Saves polynomials in FITS table format with:
Definition at line 2611 of file eris_ifu_distortion_static.c.
| hdrl_image * eris_ifu_dist_warp_bpm | ( | const hdrl_image * | bpmIn, |
| cpl_polynomial ** | poly_u, | ||
| const cpl_table * | borders, | ||
| productDepthType | productDepth | ||
| ) |
Warp bad pixel mask using distortion polynomials.
| bpmIn | Input bad pixel mask as HDRL image |
| poly_u | Array of X-distortion polynomials |
| borders | Table with slitlet boundaries |
| productDepth | Debug output level |
Warps bad pixel mask with special handling:
This ensures bad pixels are correctly propagated through geometric transformation.
Definition at line 3119 of file eris_ifu_distortion_static.c.
Referenced by eris_ifu_jitter_build_cube().
| hdrl_image * eris_ifu_dist_warp_image | ( | const hdrl_image * | imgIn, |
| cpl_polynomial ** | poly_u, | ||
| const cpl_table * | borders | ||
| ) |
Warp full detector image by warping each slitlet.
| imgIn | Input HDRL image |
| poly_u | Array of X-distortion polynomials (one per slitlet) |
| borders | Table with l_min/r_max for each slitlet |
Main warping function that:
This approach is more accurate than full-image warping as it handles discontinuities between slitlets properly.
Definition at line 3034 of file eris_ifu_distortion_static.c.
Referenced by eris_ifu_jitter_build_cube().
| hdrl_image * eris_ifu_dist_warp_image_full | ( | const hdrl_image * | hdrl_img_in, |
| cpl_polynomial ** | poly_u, | ||
| int | productDepth | ||
| ) |
Warp full image using distortion polynomials (alternative method)
| hdrl_img_in | Input HDRL image to warp |
| poly_u | Array of X-distortion polynomials |
| productDepth | Debug output level |
Alternative warping method that processes entire image at once. Uses polynomial_warp with identity Y polynomial.
Definition at line 2805 of file eris_ifu_distortion_static.c.
| hdrl_image * eris_ifu_dist_warp_slitlet | ( | const hdrl_image * | imgIn, |
| const cpl_polynomial * | poly_u, | ||
| const cpl_polynomial * | poly_v, | ||
| double | l_min, | ||
| double | r_max, | ||
| int | slitletNr | ||
| ) |
Warp single slitlet.
| imgIn | Input HDRL image |
| poly_u | X-distortion polynomial |
| poly_v | Y-distortion polynomial (typically identity) |
| l_min | Minimum X coordinate of slitlet |
| r_max | Maximum X coordinate of slitlet |
| slitletNr | Slitlet index for diagnostics |
Extracts and warps a single slitlet:
Special handling for slitlets extending beyond detector boundaries.
Definition at line 2923 of file eris_ifu_distortion_static.c.
| cpl_error_code eris_ifu_dist_warp_stats | ( | const hdrl_image * | hdrlWarpedImg, |
| cpl_propertylist * | qc_list, | ||
| cpl_propertylist * | pl, | ||
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Compute QC statistics on warped image.
| hdrlWarpedImg | Warped image to analyze |
| qc_list | Output: QC parameters to add to product |
| pl | Property list for output file |
| frameset | Input frameset |
| parlist | Parameter list |
Computes quality control parameters on warped image:
QC parameters added per slitlet:
Definition at line 3356 of file eris_ifu_distortion_static.c.
| cpl_table * eris_ifu_dist_wave | ( | cpl_frameset * | fs, |
| cpl_table ** | centers_fitted, | ||
| int | productDepth, | ||
| cpl_image *** | arcImgs, | ||
| int * | imgCnt, | ||
| const cpl_parameterlist * | parlist, | ||
| cpl_table ** | qclog | ||
| ) |
Perform wavelength calibration to identify valid arc lines.
| fs | Frameset with arc images and reference data |
| centers_fitted | Array of tables with fitted slitlet centers |
| productDepth | Debug output level |
| arcImgs | Output: array of arc lamp images |
| imgCnt | Output: number of images |
| parlist | Parameter list |
| qclog | Output: QC log table |
Performs simplified wavelength calibration to identify good arc lines:
This provides the list of valid arc lines needed for distortion calibration.
Definition at line 5083 of file eris_ifu_distortion_static.c.
References BRK_IF_ERROR, BRK_IF_NULL, BRK_WITH_ERROR_MSG, CATCH, CHECK_ERROR_STATE, eris_ifu_fit_all_lines(), eris_ifu_free_bivector(), eris_ifu_free_hdrl_imagelist(), eris_ifu_free_image(), eris_ifu_free_polynomial(), eris_ifu_free_propertylist(), eris_ifu_free_table(), eris_ifu_free_vector(), eris_ifu_get_first_fit(), eris_ifu_read_wave_setup(), eris_ifu_wave_clear_tables(), eris_ifu_wave_collapse_slitlet(), eris_ifu_wave_get_firstFitTable(), eris_ifu_wave_get_refLines(), eris_ifu_wave_init_tables(), eris_ifu_wave_save_fitting_tables(), eris_ifu_wave_save_spectrum(), eris_ifu_wavecal_processSof_dist(), hdrl_image_get_image_const(), hdrl_imagelist_get_const(), and TRY.
| int eris_ifu_distortion_get_narcs | ( | int | i, |
| cpl_boolean | triple_traces, | ||
| cpl_boolean | cut_off_left, | ||
| cpl_boolean | cut_off_right | ||
| ) |
Determine number of arc traces to process for a slitlet.
| i | Slitlet index |
| triple_traces | TRUE if 3 traces per slitlet, FALSE if 1 |
| cut_off_left | TRUE if leftmost slitlet is cut off |
| cut_off_right | TRUE if rightmost slitlet is cut off |
Counts: left edge + right edge + center line(s) Decrements count if edge slitlet is cut off at detector boundary.
Definition at line 1087 of file eris_ifu_distortion_static.c.
Referenced by eris_ifu_dist_calc_distortion().
| cpl_error_code eris_ifu_distortion_reduce_identical_lines | ( | cpl_table * | tbl | ) |
Remove duplicate or overlapping arc lines.
| tbl | Table of arc lines (modified in place) |
Removes lines with identical or very similar wavelengths (< 0.001 difference). When duplicates found, removes both entries to avoid ambiguity.
Definition at line 5005 of file eris_ifu_distortion_static.c.
References BRK_IF_NULL, CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_ifu_free_table(), and TRY.
| cpl_error_code eris_ifu_distortion_reduce_lines | ( | cpl_table * | tbl, |
| ifsBand | band, | ||
| int | nr_cols | ||
| ) |
Filter valid arc lines by intensity and fit quality.
| tbl | Table of fitted arc lines (modified in place) |
| band | Spectral band (affects thresholds) |
| nr_cols | Number of columns per slitlet |
Applies multiple filtering criteria:
Definition at line 4767 of file eris_ifu_distortion_static.c.
References BRK_IF_NULL, CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_ifu_free_table(), eris_ifu_get_bandString(), SET_ERROR_MSG, and TRY.
| cpl_error_code eris_ifu_fit_gauss | ( | const cpl_vector * | x, |
| const cpl_vector * | y, | ||
| double * | x0, | ||
| double * | sigma, | ||
| double * | area, | ||
| double * | offset | ||
| ) |
Fit Gaussian to find peak center and width.
| x | X coordinates |
| y | Y values (intensities) |
| x0 | Output: center position |
| sigma | Output: Gaussian width (positive on success) |
| area | Output: Gaussian area (positive on success) |
| offset | Output: background offset level |
Performs iterative Gaussian fitting:
Gaussian model: y = offset + (area / sqrt(2*pi*sigma^2)) * exp(-(x-x0)^2 / (2*sigma^2))
Definition at line 4417 of file eris_ifu_distortion_static.c.
Referenced by eris_ifu_slitpos_gauss().
| cpl_error_code eris_ifu_image_add_slit | ( | hdrl_image * | hdrlImgFull, |
| const hdrl_image * | hdrlImgSlit, | ||
| int | offset | ||
| ) |
Paste slitlet image into full detector image.
| hdrlImgFull | Full detector image (modified in place) |
| hdrlImgSlit | Slitlet image to paste |
| offset | X offset for paste position |
Copies data, error, and mask from slitlet image into full image at specified offset. Useful for assembling warped image from individual slitlets.
Definition at line 3715 of file eris_ifu_distortion_static.c.
| cpl_vector * eris_ifu_polyfit_edge | ( | const eris_ifu_vector * | x, |
| const eris_ifu_vector * | y, | ||
| int | fit_order | ||
| ) |
Iterative polynomial fitting with outlier rejection.
| x | X coordinates |
| y | Y values to fit |
| fit_order | Polynomial order (1, 2, or 3) |
Performs robust polynomial fitting:
Polynomial form: y(x) = a0 + a1*x + a2*x^2 + a3*x^3
Definition at line 4522 of file eris_ifu_distortion_static.c.
| hdrl_imagelist * eris_ifu_stack_warped | ( | const hdrl_image * | imgIn, |
| const int * | rowIx | ||
| ) |
Stack warped image into cube format.
| imgIn | Input warped full-detector image |
| rowIx | LUT for slitlet ordering |
Transforms 2D warped image into 3D cube by stacking slitlets:
Definition at line 3280 of file eris_ifu_distortion_static.c.
| cpl_error_code eris_ifu_wavecal_processSof_dist | ( | cpl_frameset * | frames, |
| int | exposureCorrectionMode, | ||
| int * | arcImgCnt, | ||
| hdrl_imagelist ** | arcImages, | ||
| int ** | lampStates, | ||
| ifsBand * | band, | ||
| ifsPreopticsScale * | scale, | ||
| ifsInstrument * | instrument, | ||
| double | saturation_threhold, | ||
| cpl_table ** | qclog | ||
| ) |
Process arc lamp images for distortion calibration.
| frames | Input frameset |
| exposureCorrectionMode | Exposure correction flags |
| arcImgCnt | Output: number of arc images |
| arcImages | Output: HDRL imagelist of arc images |
| lampStates | Output: array of lamp state flags |
| band | Output: spectral band |
| scale | Output: preoptics scale |
| instrument | Output: instrument identifier |
| saturation_threhold | Saturation threshold for QC |
| qclog | Output: QC log table |
Loads and processes arc lamp frames:
Definition at line 4677 of file eris_ifu_distortion_static.c.
Referenced by eris_ifu_dist_wave().