Functions | |
void | xsh_badpixelmap_or (xsh_pre *self, const xsh_pre *right) |
void | xsh_set_image_cpl_bpmap (cpl_image *image, cpl_image *bpmap, int nx, int ny) |
void | xsh_bpmap_bitwise_to_flag (cpl_image *bpmap, int flag) |
void | xsh_bpmap_mask_bad_pixel (cpl_image *bpmap, cpl_mask *mask, int flag) |
void | xsh_bpmap_set_bad_pixel (cpl_image *bpmap, int ix, int iy, int flag) |
cpl_image * | xsh_bpmap_collapse_bpmap_create (cpl_imagelist *liste) |
int | xsh_bpmap_count (cpl_image *bpmap, int nx, int ny) |
void | xsh_bpmap_collapse_median (cpl_image *median, cpl_imagelist *list, cpl_mask *bpmap) |
void | xsh_bpmap_collapse_mean (cpl_image *mean, cpl_imagelist *list, cpl_mask *bpmap) |
cpl_error_code | xsh_badpixelmap_coadd (cpl_frame *self, const cpl_frame *right) |
static cpl_error_code | xsh_image_get_hot_cold_maps (cpl_image *masterbias, const double kappa_low, const double kappa_high, const int low_niter, const int high_niter, cpl_mask **bpmhot, int *hotpix_nb, cpl_mask **bpmcold, int *coldpix_nb, cpl_propertylist **hplist, cpl_propertylist **cplist) |
cpl_error_code | xsh_image_get_hot_cold_pixs (cpl_frame *frame_image, xsh_instrument *instrument, const double ks_low, const int cold_niter, const double ks_high, const int hot_niter, cpl_frame **cpix_frm, cpl_frame **hpix_frm) |
cpl_frame * | xsh_image_local_cold_pixs (cpl_image *ima, const double kappa, const int r, xsh_instrument *instr) |
cpl_frame * | xsh_image_local_hot_pixs (cpl_image *ima, const double kappa, const int r, xsh_instrument *instr) |
cpl_error_code | xsh_image_clean_mask_pixs (cpl_image **ima, cpl_image *msk, const int r) |
static cpl_error_code | xsh_image_coadd (cpl_image **self, const cpl_image *add) |
cpl_image * | xsh_image_flag_bptype_with_crox (cpl_image *ima) |
This module contains functions used to handle Xshooter version of Bad pixel mask (each pixel is marked with a set of bits describing why the pixel has been considered BAD).
cpl_error_code xsh_badpixelmap_coadd | ( | cpl_frame * | self, | |
const cpl_frame * | right | |||
) |
Create coadd a mask frame with another
self | input bp map frame | |
right | input bp map frame |
Definition at line 475 of file xsh_badpixelmap.c.
References assure, check, nx, ny, xsh_free_image(), xsh_free_propertylist(), and xsh_msg.
Referenced by xsh_check_load_master_bpmap(), xsh_lingain(), xsh_mbias(), xsh_mdark(), xsh_mflat(), and xsh_util_bpmap_coadd().
Make an "OR" between 2 bad QUAL images.
self | Inout bad pixel map (modified) | |
right | Secondary bpmap (unchanged) |
Definition at line 79 of file xsh_badpixelmap.c.
References check, xsh_pre::nx, xsh_pre::ny, xsh_pre::qual, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_pre_add(), and xsh_pre_subtract().
void xsh_bpmap_bitwise_to_flag | ( | cpl_image * | bpmap, | |
int | flag | |||
) |
Definition at line 135 of file xsh_badpixelmap.c.
Referenced by xsh_bpmap_2pre(), and xsh_lingain().
cpl_image* xsh_bpmap_collapse_bpmap_create | ( | cpl_imagelist * | liste | ) |
Create a bad pixel map image by a union of all the bpmap images of the liste.
liste | List of bpmap images |
< first image is the result
Definition at line 219 of file xsh_badpixelmap.c.
References assure, nx, ny, XSH_GOOD_PIXEL_LEVEL, xsh_msg, and xsh_msg_dbg_low.
Referenced by xsh_compute_linearity().
void xsh_bpmap_collapse_mean | ( | cpl_image * | mean, | |
cpl_imagelist * | list, | |||
cpl_mask * | bpmap | |||
) |
Create a mean image from a list of images, taking into account a mask given pixel to compute
mean | the result average of the images collapse | |
list | List of images to collapse | |
bpmap | mask given pixels to compute CPL_BINARY_0 ==> compute the median for this pixel |
Definition at line 396 of file xsh_badpixelmap.c.
References assure, check, nx, ny, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_FREE, XSH_MALLOC, and xsh_unwrap_vector().
Referenced by xsh_remove_cosmics().
void xsh_bpmap_collapse_median | ( | cpl_image * | median, | |
cpl_imagelist * | list, | |||
cpl_mask * | bpmap | |||
) |
Create a median image from a list of images, taking into account a mask given pixel to compute
median | the result median of the images collapse | |
list | List of images to collapse | |
bpmap | mask given pixels to compute CPL_BINARY_0 ==> compute the median for this pixel |
Definition at line 315 of file xsh_badpixelmap.c.
References assure, check, nx, ny, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_FREE, XSH_MALLOC, and xsh_unwrap_vector().
Referenced by xsh_create_master_bias2(), and xsh_remove_cosmics().
int xsh_bpmap_count | ( | cpl_image * | bpmap, | |
int | nx, | |||
int | ny | |||
) |
Count the number of bad pixels in a bad pixel map image.
bpmap | Bad pixel map image | |
nx | Number of pixels along X axis | |
ny | Number of pixels along Y axis |
Definition at line 289 of file xsh_badpixelmap.c.
References assure.
Referenced by verifCr(), and verify_noisy().
void xsh_bpmap_mask_bad_pixel | ( | cpl_image * | bpmap, | |
cpl_mask * | mask, | |||
int | flag | |||
) |
Definition at line 160 of file xsh_badpixelmap.c.
References assure, check, nx, and ny.
Referenced by xsh_mdark(), and xsh_remove_cosmics().
void xsh_bpmap_set_bad_pixel | ( | cpl_image * | bpmap, | |
int | ix, | |||
int | iy, | |||
int | flag | |||
) |
Definition at line 205 of file xsh_badpixelmap.c.
Referenced by flag_noisy_pixels(), and xsh_compute_linearity().
cpl_error_code xsh_image_clean_mask_pixs | ( | cpl_image ** | ima, | |
cpl_image * | msk, | |||
const int | r | |||
) |
Definition at line 927 of file xsh_badpixelmap.c.
static cpl_error_code xsh_image_coadd | ( | cpl_image ** | self, | |
const cpl_image * | add | |||
) | [static] |
Definition at line 959 of file xsh_badpixelmap.c.
References check, XSH_ASSURE_NOT_NULL, and xsh_msg.
Referenced by xsh_image_flag_bptype_with_crox().
cpl_image* xsh_image_flag_bptype_with_crox | ( | cpl_image * | ima | ) |
Definition at line 996 of file xsh_badpixelmap.c.
References check, xsh_free_image(), and xsh_image_coadd().
Referenced by xsh_lingain().
static cpl_error_code xsh_image_get_hot_cold_maps | ( | cpl_image * | masterbias, | |
const double | kappa_low, | |||
const double | kappa_high, | |||
const int | low_niter, | |||
const int | high_niter, | |||
cpl_mask ** | bpmhot, | |||
int * | hotpix_nb, | |||
cpl_mask ** | bpmcold, | |||
int * | coldpix_nb, | |||
cpl_propertylist ** | hplist, | |||
cpl_propertylist ** | cplist | |||
) | [static] |
Definition at line 566 of file xsh_badpixelmap.c.
References check, check_msg, xsh_ksigma_clip(), xsh_msg_dbg_low, XSH_QC_COLD_PIX_NUM, XSH_QC_COLD_PIX_NUM_C, XSH_QC_HOT_PIX_NUM, XSH_QC_HOT_PIX_NUM_C, XSH_QC_MASTER_MEAN, XSH_QC_MASTER_MEAN_C, XSH_QC_MASTER_RMS, and XSH_QC_MASTER_RMS_C.
Referenced by xsh_image_get_hot_cold_pixs().
cpl_error_code xsh_image_get_hot_cold_pixs | ( | cpl_frame * | frame_image, | |
xsh_instrument * | instrument, | |||
const double | ks_low, | |||
const int | cold_niter, | |||
const double | ks_high, | |||
const int | hot_niter, | |||
cpl_frame ** | cpix_frm, | |||
cpl_frame ** | hpix_frm | |||
) |
Definition at line 680 of file xsh_badpixelmap.c.
References check, QFLAG_CAMERA_DEFECT, QFLAG_QUESTIONABLE_PIXEL, xsh_add_temporary_file(), XSH_BP_MAP_CP, XSH_BP_MAP_HP, xsh_frame_product(), XSH_FREE, xsh_free_image(), xsh_free_mask(), xsh_free_propertylist(), XSH_GET_TAG_FROM_ARM, xsh_image_get_hot_cold_maps(), xsh_instrument_arm_tostring(), and xsh_msg.
Referenced by xsh_mbias().
cpl_frame* xsh_image_local_cold_pixs | ( | cpl_image * | ima, | |
const double | kappa, | |||
const int | r, | |||
xsh_instrument * | instr | |||
) |
Definition at line 805 of file xsh_badpixelmap.c.
References check, nx, ny, QFLAG_LOW_QE_PIXEL, XSH_BP_MAP_DP, xsh_frame_product(), xsh_instrument_arm_tostring(), and XSH_PRE_DATA_BPP.
cpl_frame* xsh_image_local_hot_pixs | ( | cpl_image * | ima, | |
const double | kappa, | |||
const int | r, | |||
xsh_instrument * | instr | |||
) |
Definition at line 866 of file xsh_badpixelmap.c.
References check, nx, ny, QFLAG_WELL_SATURATION, XSH_BP_MAP_SP, xsh_frame_product(), xsh_instrument_arm_tostring(), and XSH_PRE_DATA_BPP.
void xsh_set_image_cpl_bpmap | ( | cpl_image * | image, | |
cpl_image * | bpmap, | |||
int | nx, | |||
int | ny | |||
) |
Create the bad pixel map (cpl format) attached to the XSH format Bad Pixel Map image
image | the image on which attaches the cpl bpmap | |
bpmap | XSH format bad pixel map | |
nx | Size of the image (X) | |
ny | Size of the image (Y) |
Definition at line 109 of file xsh_badpixelmap.c.
References assure, check, and XSH_GOOD_PIXEL_LEVEL.
Referenced by xsh_compute_linearity(), xsh_compute_noise_map(), and xsh_follow_arclines().