|
CR2RE Pipeline Reference Manual 1.7.0
|
Functions | |
| hdrl_imagelist * | cr2res_calib_imagelist (const hdrl_imagelist *in, int chip, int clean_bad, int subtract_nolight_rows, int subtract_interorder_column, int cosmics_corr, const cpl_frame *flat, const cpl_frame *dark, const cpl_frame *bpm, const cpl_frame *detlin, const cpl_vector *dits, const cpl_vector *ndits, const cpl_vector *ndsamples) |
| The images calibration routine for a given chip on a list. | |
| hdrl_image * | cr2res_calib_image (const hdrl_image *in, int chip, int clean_bad, int subtract_nolight_rows, int subtract_interorder_column, int cosmics_corr, const cpl_frame *flat, const cpl_frame *dark, const cpl_frame *bpm, const cpl_frame *detlin, double dit, int ndit, int ndsamples) |
| The images calibration routine for a given chip. | |
| int | cr2res_add_shotnoise (hdrl_image *in, double dit, int ndit, int ndsamples, int chip) |
| Add shot- and read-noise to errors in HDRL-image. | |
| int | cr2res_calib_subtract_interorder_column (hdrl_image *in, const hdrl_image *flat, cpl_size degree) |
| Remove background column by column. | |
| void | cr2res_calib_add_var (hdrl_image *ima, const cpl_image *var) |
| Add a variance image to the error of an HDRL image. | |
| cpl_image * | cr2res_calib_flat_relerr2 (const hdrl_image *mflat) |
| Squared relative error of a master flat, (sigma_F/F)^2. | |
| void | cr2res_calib_flat_var (hdrl_image *ima, const cpl_image *relerr2, double sign) |
| Add or remove the flat-field variance term of an image. | |
| int | cr2res_calib_dark_var (hdrl_imagelist *list, const cpl_frame *master_dark_frame, int chip, const hdrl_image *mflat, const cpl_vector *dits, double sign) |
| Add or remove the master dark variance of cr2res_calib_image() | |
| int cr2res_add_shotnoise | ( | hdrl_image * | in, |
| double | dit, | ||
| int | ndit, | ||
| int | ndsamples, | ||
| int | chip ) |
Add shot- and read-noise to errors in HDRL-image.
| in | the input hdrl image, gets modified |
| dit | the DIT, used for the read-noise model |
| ndit | the NDIT the frame is averaged over |
| ndsamples | the up-the-ramp reads per DIT, or < 2 if unknown |
| chip | the chip (1 to CR2RES_NB_DETECTORS) |
sigma_out^2 = sigma_in^2 + alpha_n max(S,0) / (g NDIT) + RN^2 / (g^2 NDIT)
Definition at line 376 of file cr2res_calib.c.
References hdrl_image_get_error(), and hdrl_image_get_image_const().
Referenced by cr2res_calib_image().
| void cr2res_calib_add_var | ( | hdrl_image * | ima, |
| const cpl_image * | var ) |
Add a variance image to the error of an HDRL image.
| ima | the image, its error gets modified |
| var | the variance to add (may be negative to remove a term) |
err = sqrt(max(err^2 + var, 0))
Definition at line 578 of file cr2res_calib.c.
References hdrl_image_get_error().
Referenced by cr2res_calib_dark_var(), and cr2res_calib_flat_var().
| int cr2res_calib_dark_var | ( | hdrl_imagelist * | list, |
| const cpl_frame * | master_dark_frame, | ||
| int | chip, | ||
| const hdrl_image * | mflat, | ||
| const cpl_vector * | dits, | ||
| double | sign ) |
Add or remove the master dark variance of cr2res_calib_image()
| list | the calibrated images, errors get modified |
| master_dark_frame | the master dark used for the calibration |
| chip | the chip (1 to CR2RES_NB_DETECTORS) |
| mflat | the master flat used, or NULL |
| dits | the DITs of the images in list |
| sign | +1 to add, -1 to remove |
var += sign * (dit/dark_dit * sigma_D / F)^2
Definition at line 645 of file cr2res_calib.c.
References cr2res_calib_add_var(), cr2res_io_load_MASTER_DARK(), cr2res_pfits_get_dit(), hdrl_image_delete(), hdrl_image_get_error_const(), hdrl_image_get_image_const(), hdrl_imagelist_get(), and hdrl_imagelist_get_size().
| cpl_image * cr2res_calib_flat_relerr2 | ( | const hdrl_image * | mflat | ) |
Squared relative error of a master flat, (sigma_F/F)^2.
| mflat | the master flat |
Definition at line 596 of file cr2res_calib.c.
References hdrl_image_get_error_const(), and hdrl_image_get_image_const().
| void cr2res_calib_flat_var | ( | hdrl_image * | ima, |
| const cpl_image * | relerr2, | ||
| double | sign ) |
Add or remove the flat-field variance term of an image.
| ima | the flat-fielded image, its error gets modified |
| relerr2 | (sigma_F/F)^2, see cr2res_calib_flat_relerr2() |
| sign | +1 to add, -1 to remove |
var += sign * data^2 * relerr2
Definition at line 618 of file cr2res_calib.c.
References cr2res_calib_add_var(), and hdrl_image_get_image_const().
| hdrl_image * cr2res_calib_image | ( | const hdrl_image * | in, |
| int | chip, | ||
| int | clean_bad, | ||
| int | subtract_nolight_rows, | ||
| int | subtract_interorder_column, | ||
| int | cosmics_corr, | ||
| const cpl_frame * | flat, | ||
| const cpl_frame * | dark, | ||
| const cpl_frame * | bpm, | ||
| const cpl_frame * | detlin, | ||
| double | dit, | ||
| int | ndit, | ||
| int | ndsamples ) |
The images calibration routine for a given chip.
| in | the input hdrl image |
| chip | the chip to calibrate (1 to CR2RES_NB_DETECTORS) |
| clean_bad | Flag to activate the cleaning of the bad pixels |
| subtract_nolight_rows | |
| cosmics_corr | Flag to correct for cosmics |
| flat | the flat frame or NULL |
| dark | the dark frame or NULL |
| bpm | the bpm frame or NULL |
| detlin | the detlin frame or NULL |
| dit | the DIT for the dark correction |
| ndit | the NDIT of the image |
| ndsamples | the up-the-ramp reads per DIT, or < 2 if unknown The flat, dark and bpm must have the same size as the input in. In the case of detlin, data are only taken in normal mode. |
Definition at line 158 of file cr2res_calib.c.
References cr2res_add_shotnoise(), cr2res_bpm_set_and_correct_image(), cr2res_calib_subtract_interorder_column(), cr2res_detlin_correct(), cr2res_io_load_DETLIN_COEFFS(), cr2res_io_load_MASTER_DARK(), cr2res_io_load_MASTER_FLAT(), cr2res_pfits_get_dit(), hdrl_image_delete(), hdrl_image_div_image(), hdrl_image_duplicate(), hdrl_image_get_image(), hdrl_image_get_mask(), hdrl_image_insert(), hdrl_image_mul_scalar(), hdrl_image_new(), hdrl_image_sub_image(), hdrl_imagelist_delete(), hdrl_lacosmic_edgedetect(), hdrl_lacosmic_parameter_create(), hdrl_lacosmic_parameter_verify(), and hdrl_parameter_delete().
Referenced by cr2res_calib_imagelist().
| hdrl_imagelist * cr2res_calib_imagelist | ( | const hdrl_imagelist * | in, |
| int | chip, | ||
| int | clean_bad, | ||
| int | subtract_nolight_rows, | ||
| int | subtract_interorder_column, | ||
| int | cosmics_corr, | ||
| const cpl_frame * | flat, | ||
| const cpl_frame * | dark, | ||
| const cpl_frame * | bpm, | ||
| const cpl_frame * | detlin, | ||
| const cpl_vector * | dits, | ||
| const cpl_vector * | ndits, | ||
| const cpl_vector * | ndsamples ) |
The images calibration routine for a given chip on a list.
| in | the input hdrl image list |
| chip | the chip to calibrate (1 to CR2RES_NB_DETECTORS) |
| clean_bad | Flag to activate the cleaning of the bad pixels |
| subtract_nolight_rows | |
| cosmics_corr | Flag to correct for cosmics |
| flat | the flat frame or NULL |
| dark | the dark frame or NULL |
| bpm | the bpm frame or NULL |
| detlin | the detlin frame or NULL |
| dits | the DITs of the images for the dark correction |
| ndits | the NDITs of the images, or NULL (NDIT=1) |
| ndsamples | the NDSAMPLES of the images, or NULL (unknown) The flat, dark and bpm must have the same size as the input in. In the case of detlin, data are only taken in normal mode. |
Definition at line 75 of file cr2res_calib.c.
References cr2res_calib_image(), hdrl_imagelist_delete(), hdrl_imagelist_get(), hdrl_imagelist_get_size(), hdrl_imagelist_new(), and hdrl_imagelist_set().
| int cr2res_calib_subtract_interorder_column | ( | hdrl_image * | in, |
| const hdrl_image * | flat, | ||
| cpl_size | degree ) |
Remove background column by column.
| in | the input hdrl image, gets modified |
Fits the background in each column, using a 1d polynomial with given degree to the out of order pixels.
Here the orders are defined by the flat-field.
Definition at line 452 of file cr2res_calib.c.
References cr2res_vector_get_mad(), hdrl_image_get_image(), hdrl_image_get_image_const(), hdrl_image_get_size_x(), and hdrl_image_get_size_y().
Referenced by cr2res_calib_image().