XSH Specific Bad Pixel Mask Functions
[Xsh Specific Tools]

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)

Detailed Description

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).


Function Documentation

cpl_error_code xsh_badpixelmap_coadd ( cpl_frame *  self,
const cpl_frame *  right 
)

Create coadd a mask frame with another

Parameters:
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().

void xsh_badpixelmap_or ( xsh_pre self,
const xsh_pre right 
)

Make an "OR" between 2 bad QUAL images.

Parameters:
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.

References check, nx, and ny.

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.

Parameters:
liste List of bpmap images
Returns:
an image, the union of all the bpmap images in the list

< 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

Parameters:
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

Parameters:
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.

Parameters:
bpmap Bad pixel map image
nx Number of pixels along X axis
ny Number of pixels along Y axis
Returns:
Tne number of bad pixels

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.

References check, nx, and ny.

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]
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 
)
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

Parameters:
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().


Generated on 9 Mar 2011 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1