Bias Handling
Typedefs | |
typedef GiBiasResults | GiBiasResults |
Functions | |
cpl_matrix * | giraffe_get_raw_areas (const GiImage *image) |
Create bias areas from an image. | |
cxint | giraffe_trim_raw_areas (GiImage *image) |
Remove pre- and overscan ares from an image. | |
cxint | giraffe_bias_remove (GiImage *result, const GiImage *raw, const GiImage *master_bias, const GiImage *bad_pixels, const cpl_matrix *biaslimits, const GiBiasConfig *config) |
Removes the bias from an image. | |
GiBiasConfig * | giraffe_bias_config_create (cpl_parameterlist *list) |
Creates a setup structure for a bias removal task. | |
void | giraffe_bias_config_destroy (GiBiasConfig *config) |
Destroys a bias removal setup structure. | |
void | giraffe_bias_config_add (cpl_parameterlist *list) |
Adds parameters for the bias removal. |
Detailed Description
TBDFunction Documentation
void giraffe_bias_config_add | ( | cpl_parameterlist * | list | ) |
GiBiasConfig* giraffe_bias_config_create | ( | cpl_parameterlist * | list | ) |
void giraffe_bias_config_destroy | ( | GiBiasConfig * | config | ) |
Destroys a bias removal setup structure.
- Parameters:
-
config The setup structure to destroy.
- Returns:
- Nothing.
Definition at line 3576 of file gibias.c.
References GiBiasConfig::areas.
cxint giraffe_bias_remove | ( | GiImage * | result, | |
const GiImage * | raw, | |||
const GiImage * | master_bias, | |||
const GiImage * | bad_pixels, | |||
const cpl_matrix * | biaslimits, | |||
const GiBiasConfig * | config | |||
) |
Removes the bias from an image.
- Parameters:
-
result Result frame. raw Any raw frame. master_bias Master bias frame. bad_pixels Mask of CCD bad pixels. biaslimits Matrix of bias areas co-ordinates One or more rows of (xmin,xmax,ymin,ymax) config Biasremove PDRM Parameters
- Returns:
- The function returns 0 on success, or 1 otherwise.
It is the only function operating on images larger than the CCD active area (pre/overscans present) and using ADU units. The bias areas in the prescan and overscan lanes in both, x and y, directions are defined through the matrix_biaslimits argument.
A 2D plane or curve is fitted on the data, or the mean value is calculated, in these bias areas and the linear coefficients describing the plane or mean value are saved as quality indicators.
The control parameter config->method is used to differentiate various level of the processing: the single valued average subtraction, the plane subtraction and the master_bias subtraction without or with zero adjustment. In any case the pre/overscans are removed prior the bias subtraction (the master_bias not having necessarily the same size of pre/overscans as rawFrame) and raw_frame is converted from ADU to e-.
Routine has 4 optional parameters which have a default value when not specified:
config->method - Bias subtraction method: 'UNIFORM','PLANE','MASTER','ZMASTER','MASTER+PLANE', 'ZMASTER+PLANE','CURVE','MASTER+CURVE','ZMASTER+CURVE' default: 'UNIFORM'
config->remove - Remove Bias? Default TRUE
3 bias sigma clipping parameters:
- config->sigma - multiple of sigma, default: 2.5
- config->numiter - number of iterations, default: 10
- config->fraction - min fraction of points accepted/total, default: 0.9
4 Chebyshev interpolation parameters in bias areas
- config->xdeg - Polynom order for fit in x direction
- config->ydeg - Polynom order for fit in ydirection
- config->xstep - Step size to use in x direction
- config->ystep - Step size to use in y direction
- Warning:
- Geneva Code does not use keepOvPrScan (don't remove pre/overscan regions; default: 0) even if they describe it...
Definition at line 3114 of file gibias.c.
References GiBiasConfig::areas, GiBiasConfig::fraction, giraffe_get_raw_areas(), giraffe_image_get(), giraffe_image_get_properties(), giraffe_image_set(), giraffe_image_set_properties(), giraffe_trim_raw_areas(), GiBiasConfig::iterations, GiBiasConfig::method, GiBiasConfig::model, GiBiasConfig::option, GiBiasConfig::remove, GiBiasConfig::sigma, GiBiasConfig::xdeg, GiBiasConfig::xstep, GiBiasConfig::ydeg, and GiBiasConfig::ystep.
cpl_matrix* giraffe_get_raw_areas | ( | const GiImage * | image | ) |
Create bias areas from an image.
- Parameters:
-
image Image from which areas are constructed.
- Returns:
- A pointer to a cpl_matrix containing bias areas specification, or
NULL
if image does not contain pre- and overscan properties or if they are all equal to zero. The function also returnsNULL
if the image does not contain any image properties and sets the CPL error codeCPL_ERROR_NULL_INPUT
.
Definition at line 2720 of file gibias.c.
References giraffe_image_get_properties().
Referenced by giraffe_bias_remove().
cxint giraffe_trim_raw_areas | ( | GiImage * | image | ) |
Remove pre- and overscan ares from an image.
- Parameters:
-
image Image to be trimmed.
- Returns:
- The function returns 0 on success, or 1 otherwise.
The function expects that the image has properties associated and returns an error if image does not contain any properties.
Definition at line 2922 of file gibias.c.
References giraffe_image_get(), giraffe_image_get_properties(), and giraffe_image_set().
Referenced by giraffe_bias_remove().