MOONS Pipeline Reference Manual 0.13.2
Functions
Bad pixels map functions

Functions

cpl_error_code moo_badpix_to_mask (cpl_image *badpix, cpl_mask *mask, unsigned int level)
 Apply the badpix map on the given mask.
 
cpl_error_code moo_mask_to_badpix (cpl_image *badpix, cpl_mask *mask, unsigned int level)
 Add the mask of the badpix level to the badpix map.
 
cpl_error_code moo_badpix_merge (cpl_image *badpix1, cpl_image *badpix2)
 Merge to bad pixel map.
 
#define MOO_BADPIX_GOOD   0x0
 
#define MOO_BADPIX_NOISY   0x8
 
#define MOO_BADPIX_COSMIC_UNREMOVED   0x20
 
#define MOO_BADPIX_LOW_QE   0x40
 
#define MOO_BADPIX_CALIB_DEFECT   0x80
 
#define MOO_BADPIX_HOT   0x100
 
#define MOO_BADPIX_COLD   0x200
 
#define MOO_BADPIX_COSMETIC   0x2000
 
#define MOO_BADPIX_NON_LINEAR   0x8000
 
#define MOO_BADPIX_OUTSIDE_DATA_RANGE   0x80000000
 

Detailed Description

Macro Definition Documentation

◆ MOO_BADPIX_CALIB_DEFECT

#define MOO_BADPIX_CALIB_DEFECT   0x80

Calibration file defect (128)

Definition at line 48 of file moo_badpix.h.

◆ MOO_BADPIX_COLD

#define MOO_BADPIX_COLD   0x200

Cold pixel (512)

Definition at line 54 of file moo_badpix.h.

◆ MOO_BADPIX_COSMETIC

#define MOO_BADPIX_COSMETIC   0x2000

Permanent camera defect (8192)

Definition at line 57 of file moo_badpix.h.

◆ MOO_BADPIX_COSMIC_UNREMOVED

#define MOO_BADPIX_COSMIC_UNREMOVED   0x20

Cosmic (unremoved) (32)

Definition at line 42 of file moo_badpix.h.

◆ MOO_BADPIX_GOOD

#define MOO_BADPIX_GOOD   0x0

The good pixel value

Definition at line 36 of file moo_badpix.h.

◆ MOO_BADPIX_HOT

#define MOO_BADPIX_HOT   0x100

Hot pixel (256)

Definition at line 51 of file moo_badpix.h.

◆ MOO_BADPIX_LOW_QE

#define MOO_BADPIX_LOW_QE   0x40

Low quantum efficiency (64)

Definition at line 45 of file moo_badpix.h.

◆ MOO_BADPIX_NOISY

#define MOO_BADPIX_NOISY   0x8

Electronic pickup noise (8)

Definition at line 39 of file moo_badpix.h.

◆ MOO_BADPIX_NON_LINEAR

#define MOO_BADPIX_NON_LINEAR   0x8000

Non linear response pixel (32768)

Definition at line 60 of file moo_badpix.h.

◆ MOO_BADPIX_OUTSIDE_DATA_RANGE

#define MOO_BADPIX_OUTSIDE_DATA_RANGE   0x80000000

Outside data range (2^31)

Definition at line 62 of file moo_badpix.h.

Function Documentation

◆ moo_badpix_merge()

cpl_error_code moo_badpix_merge ( cpl_image *  badpix1,
cpl_image *  badpix2 
)

Merge to bad pixel map.

Parameters
badpix1Bad pixel map to update
badpix2Bad pixel map to merge
Returns
cpl error code

Error code:

  • CPL_ERROR_NULL_INPUT The parameter list or name is a NULL pointer

Definition at line 146 of file moo_badpix.c.

◆ moo_badpix_to_mask()

cpl_error_code moo_badpix_to_mask ( cpl_image *  badpix,
cpl_mask *  mask,
unsigned int  level 
)

Apply the badpix map on the given mask.

Parameters
badpixBad pixel map
maskthe bad pixel mask
levelthe level of good pixel in badpix
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

Error code:

  • CPL_ERROR_NULL_INPUT The parameter list or name is a NULL pointer
  • CPL_ERROR_ILLEGAL_INPUT the type of BADPIX image in not CPL_TYPE_INT
  • CPL_ERROR_ILLEGAL_INPUT if image and mask have not same size

Definition at line 58 of file moo_badpix.c.

Referenced by moo_ext_single_load(), moo_rbn_single_load(), moo_sci_single_load(), and moo_single_load().

◆ moo_mask_to_badpix()

cpl_error_code moo_mask_to_badpix ( cpl_image *  badpix,
cpl_mask *  mask,
unsigned int  level 
)

Add the mask of the badpix level to the badpix map.

Parameters
badpixBad pixel map
maskthe bad pixel mask
levelthe level of badpixel in mask
Returns
cpl error code

Error code:

  • CPL_ERROR_NULL_INPUT The parameter list or name is a NULL pointer
  • CPL_ERROR_ILLEGAL_INPUT the type of BADPIX image in not CPL_TYPE_INT
  • CPL_ERROR_ILLEGAL_INPUT if image and mask have not same size

Definition at line 105 of file moo_badpix.c.

Referenced by moo_compute_noise_map(), moo_single_apply_mask(), and moo_single_filter_snr().