|
ERIS Pipeline Reference Manual 1.9.2
|
Functions | |
| cpl_error_code | eris_ifu_detlin_load_frames (const cpl_frameset *frameset, int exposureCorrectionMode, hdrl_imagelist **hdrl_imglist_on, hdrl_imagelist **hdrl_imglist_off, cpl_vector **vec_dit_on, cpl_vector **vec_dit_off) |
| Load linearity calibration frames from a frameset. | |
| cpl_image * | eris_ifu_detlin_compute_linearity (const cpl_parameterlist *parlist, const hdrl_imagelist *imglist, const cpl_vector *vec_dit, cpl_propertylist *qclog) |
| Compute detector linearity bad pixel map. | |
| cpl_mask * | eris_ifu_detlin_filter_mask (const cpl_mask *bpm, const cpl_parameterlist *parlist) |
| Apply morphological filtering to a bad pixel mask. | |
| cpl_table * | eris_compute_gain (cpl_frameset *frameset) |
| Compute detector gain from linearity frames. | |
This module provides functions for detector linearity calibration, including loading linearity frames, computing linearity corrections, filtering bad pixel masks, and computing detector gain.
| cpl_table * eris_compute_gain | ( | cpl_frameset * | frameset | ) |
Compute detector gain from linearity frames.
| frameset | Input frameset containing linearity lamp-on and lamp-off frames |
Computes the detector gain using the photon transfer curve method. For each pair of on/off frames with the same DIT and exposure time, the gain is calculated using the formula:
gain = (mean_signal) / (variance_difference)
where mean_signal is the average signal level and variance_difference is computed from the difference images. The calculation is performed on a specified window region (default: [270:320, 1000:1050]) using kappa-sigma clipping to reject outliers.
The returned table contains two columns:
medium accuracy eris_image_estimate_noise(img_on_sub, 1, ¢re, &sig_on_dif); eris_image_estimate_noise(img_of_sub, 1, ¢re, &sig_of_dif);
cpl_flux_get_noise_window(img_on_dif, zone, 2, 100, &sig_on_dif, NULL); cpl_flux_get_noise_window(img_of_dif, zone, 2, 100, &sig_of_dif, NULL); eris_msg("noise=%g %g", sig_on_dif, sig_of_dif);
Definition at line 493 of file eris_ifu_detlin_static.c.
References eris_check_error_code(), eris_ifu_frame_is_on(), and eris_pfits_get_dit().
| cpl_image * eris_ifu_detlin_compute_linearity | ( | const cpl_parameterlist * | parlist, |
| const hdrl_imagelist * | imglist, | ||
| const cpl_vector * | vec_dit, | ||
| cpl_propertylist * | qclog | ||
| ) |
Compute detector linearity bad pixel map.
| parlist | Input recipe parameter list |
| imglist | Input HDRL imagelist of linearity frames |
| vec_dit | Input vector of detector integration times |
| qclog | Output property list for QC parameters |
Computes a bad pixel map for detector linearity using HDRL polynomial fitting. The function:
Definition at line 249 of file eris_ifu_detlin_static.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_free_hdrl_parameter(), eris_ifu_free_image(), eris_ifu_get_badpix_qc_from_ima(), hdrl_bpm_fit_compute(), hdrl_bpm_fit_parameter_get_degree(), hdrl_bpm_fit_parameter_parse_parlist(), hdrl_fit_polynomial_imagelist(), hdrl_image_get_error(), hdrl_image_get_image(), hdrl_imagelist_delete(), hdrl_imagelist_get(), hdrl_imagelist_get_size(), and TRY.
| cpl_mask * eris_ifu_detlin_filter_mask | ( | const cpl_mask * | bpm, |
| const cpl_parameterlist * | parlist | ||
| ) |
Apply morphological filtering to a bad pixel mask.
| bpm | Input bad pixel mask to filter |
| parlist | Input parameter list containing filter parameters |
Applies morphological filtering (closing or dilation) to a bad pixel mask to clean up isolated bad pixels or expand bad pixel regions. The filter parameters are read from the parameter list:
Definition at line 343 of file eris_ifu_detlin_static.c.
References BRK_IF_NULL, BRK_WITH_ERROR_MSG, CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_mask(), hdrl_bpm_filter(), and TRY.
| cpl_error_code eris_ifu_detlin_load_frames | ( | const cpl_frameset * | frameset, |
| int | exposureCorrectionMode, | ||
| hdrl_imagelist ** | hdrl_imglist_on, | ||
| hdrl_imagelist ** | hdrl_imglist_off, | ||
| cpl_vector ** | vec_dit_on, | ||
| cpl_vector ** | vec_dit_off | ||
| ) |
Load linearity calibration frames from a frameset.
| frameset | Input frameset containing linearity frames |
| exposureCorrectionMode | Exposure correction mode to apply |
| hdrl_imglist_on | Output HDRL imagelist for lamp-on frames (pointer to imagelist pointer) |
| hdrl_imglist_off | Output HDRL imagelist for lamp-off frames (pointer to imagelist pointer) |
| vec_dit_on | Output vector of DITs for lamp-on frames (pointer to vector pointer) |
| vec_dit_off | Output vector of DITs for lamp-off frames (pointer to vector pointer) |
Loads all LINEARITY_LAMP frames from the frameset and separates them into lamp-on and lamp-off frames. For each frame, the DIT (Detector Integration Time) is extracted from the FITS header and stored in the corresponding vector.
Definition at line 74 of file eris_ifu_detlin_static.c.
References CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_file_exists(), eris_ifu_frame_is_on(), eris_ifu_free_hdrl_imagelist(), eris_ifu_free_propertylist(), eris_ifu_free_vector(), eris_ifu_get_dit(), eris_ifu_load_exposure_file(), hdrl_imagelist_new(), hdrl_imagelist_set(), and TRY.