Defines | |
#define | USE_CPL_POLYNOMIAL |
#define | OPTIMIZE_IMAGE_HANDLING |
Functions | |
static int | orderCompare (const void *one, const void *two) |
static int | onoffCompare (const void *one, const void *two) |
cpl_frameset * | xsh_subtract_on_off (cpl_frameset *set, xsh_instrument *instrument) |
int | xsh_linear_group_by_exptime (cpl_frameset *raws, xsh_instrument *instrument, double exp_toler, cpl_frameset **groupSet) |
cpl_frame * | xsh_compute_linearity (cpl_frameset *medSet, xsh_instrument *instrument, xsh_clipping_param *lin_clipping, const int decode_bp) |
Functions used to compute the linearity bad pixel mask (recipe xsh_linear)
#define OPTIMIZE_IMAGE_HANDLING |
Definition at line 62 of file xsh_compute_linearity.c.
#define USE_CPL_POLYNOMIAL |
Definition at line 61 of file xsh_compute_linearity.c.
static int onoffCompare | ( | const void * | one, | |
const void * | two | |||
) | [static] |
Function used by qsort to order frames by ON/OFF Lamp keyword.
one | Pointer to first item to be compared | |
two | Pointer to second item ... |
Definition at line 101 of file xsh_compute_linearity.c.
References TIME_FRAME::on_off.
Referenced by xsh_linear_group_by_exptime().
static int orderCompare | ( | const void * | one, | |
const void * | two | |||
) | [static] |
Function used by qsort to order frames by increasing exptime.
one | Pointer to first item to be compared | |
two | Pointer to second item ... |
Definition at line 81 of file xsh_compute_linearity.c.
References TIME_FRAME::exptime.
Referenced by xsh_linear_group_by_exptime().
cpl_frame* xsh_compute_linearity | ( | cpl_frameset * | medSet, | |
xsh_instrument * | instrument, | |||
xsh_clipping_param * | lin_clipping, | |||
const int | decode_bp | |||
) |
Computes the linearity bad pixel mask from median frames with increasing exposure times.
medSet | The frameset of median frames (as returned by remove_crh) | |
instrument | Pointer to the instrument description structure | |
lin_clipping | Parameters of linearity sigma clipping |
< The final result bad pixel map image
< The final frame
< Temporary image list (to be freed)
< Temporary image list (to be freed)
< Temporary propertylist (to be freed)
< Temporary image list (to be freed)
< List of Bad pixel maps
Definition at line 550 of file xsh_compute_linearity.c.
References xsh_instrument::arm, assure, check, check_msg, LINEAR_POLYNOMIAL_DEGREE, xsh_clipping_param::niter, QFLAG_NON_LINEAR_PIXEL, xsh_clipping_param::sigma, XSH_ARM_NIR, XSH_BP_MAP_LIN, xsh_bpmap_collapse_bpmap_create(), xsh_bpmap_set_bad_pixel(), xsh_fit_imagelist_polynomial(), xsh_frame_product(), xsh_free_image(), xsh_free_imagelist(), xsh_free_propertylist(), XSH_GET_TAG_FROM_ARM, xsh_instrument_arm_tostring(), xsh_msg, xsh_msg_dbg_low, xsh_pfits_get_dit(), xsh_pfits_get_exptime(), xsh_pfits_set_qc(), xsh_pfits_set_qc_multi(), xsh_polynomial_fit_1d_create(), XSH_PRE_DATA_TYPE, XSH_QC_BP_MAP_LINi_MEAN, XSH_QC_BP_MAP_LINi_MED, XSH_QC_BP_MAP_LINi_RMS, XSH_QC_BP_MAP_NBADPIX, and xsh_set_image_cpl_bpmap().
Referenced by xsh_linear().
int xsh_linear_group_by_exptime | ( | cpl_frameset * | raws, | |
xsh_instrument * | instrument, | |||
double | exp_toler, | |||
cpl_frameset ** | groupSet | |||
) |
Create a list of framesets, each frameset containing frames with the same exposure time (+- tolerance). One should find at least 3 groups, each group with 3 frames. If arm is NIR, also spread ON and OFF frames into different framesets.
raws | Frameset of raw frames (LINEARITY) | |
instrument | Pointer to instrument description structure | |
exp_toler | Tolerance on same exposure time in a group | |
groupSet | Pointer to list of framesets, one frameset per group |
Definition at line 213 of file xsh_compute_linearity.c.
References xsh_instrument::arm, assure, check, check_msg, TIME_FRAME::exptime, first, TIME_FRAME::frame, TIME_FRAME::on_off, onoffCompare(), orderCompare(), XSH_ARM_NIR, xsh_free_propertylist(), xsh_msg, xsh_msg_dbg_low, xsh_pfits_get_dit(), xsh_pfits_get_exptime(), and xsh_pfits_get_lamp_on_off().
Referenced by xsh_linear().
cpl_frameset* xsh_subtract_on_off | ( | cpl_frameset * | set, | |
xsh_instrument * | instrument | |||
) |
Subtracts OFF frames from ON frames with same DIT (NIR only)
set | Frameset of all the frames at same DIT | |
instrument | Pointer to instrument structure |
Definition at line 120 of file xsh_compute_linearity.c.
References assure, check_msg, xsh_free_frameset(), XSH_LINEARITY_NIR, xsh_msg, xsh_msg_dbg_low, xsh_pre_duplicate(), xsh_pre_free(), xsh_pre_load(), xsh_pre_save(), and xsh_pre_subtract().
Referenced by xsh_linear().