GIRAFFE Pipeline Reference Manual

Bias Handling

Functions

cpl_matrix * giraffe_get_raw_areas (const GiImage *image)
 Create bias areas from an image. More...
 
cxint giraffe_trim_raw_areas (GiImage *image)
 Remove pre- and overscan ares from an image. More...
 
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. More...
 
GiBiasConfig * giraffe_bias_config_create (cpl_parameterlist *list)
 Creates a setup structure for a bias removal task. More...
 
void giraffe_bias_config_destroy (GiBiasConfig *config)
 Destroys a bias removal setup structure. More...
 
void giraffe_bias_config_add (cpl_parameterlist *list)
 Adds parameters for the bias removal. More...
 

Detailed Description

TBD

Function Documentation

void giraffe_bias_config_add ( cpl_parameterlist *  list)

Adds parameters for the bias removal.

Parameters
listParameter list to which parameters are added.
Returns
Nothing.

TBD

Definition at line 3605 of file gibias.c.

GiBiasConfig* giraffe_bias_config_create ( cpl_parameterlist *  list)

Creates a setup structure for a bias removal task.

Parameters
listParameter list from which the setup informations is read.
Returns
A newly allocated and initialized setup structure if no errors occurred, or NULL otherwise.

Definition at line 3446 of file gibias.c.

void giraffe_bias_config_destroy ( GiBiasConfig *  config)

Destroys a bias removal setup structure.

Parameters
configThe setup structure to destroy.
Returns
Nothing.

The function deallocates the memory used by the setup structure config.

Definition at line 3577 of file gibias.c.

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
resultResult frame.
rawAny raw frame.
master_biasMaster bias frame.
bad_pixelsMask of CCD bad pixels.
biaslimitsMatrix of bias areas co-ordinates One or more rows of (xmin,xmax,ymin,ymax)
configBiasremove PDRM Parameters
Returns
The function returns 0 on success, or 1 otherwise.

This is the first processing of any Giraffe raw image.

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:

  1. config->sigma - multiple of sigma, default: 2.5
  2. config->numiter - number of iterations, default: 10
  3. config->fraction - min fraction of points accepted/total, default: 0.9

4 Chebyshev interpolation parameters in bias areas

  1. config->xdeg - Polynom order for fit in x direction
  2. config->ydeg - Polynom order for fit in ydirection
  3. config->xstep - Step size to use in x direction
  4. 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 giraffe_get_raw_areas(), giraffe_image_get(), giraffe_image_get_properties(), giraffe_image_set(), giraffe_image_set_properties(), and giraffe_trim_raw_areas().

cpl_matrix* giraffe_get_raw_areas ( const GiImage *  image)

Create bias areas from an image.

Parameters
imageImage 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 returns NULL if the image does not contain any image properties and sets the CPL error code CPL_ERROR_NULL_INPUT.

The function creates bias areas specification matrix based upon the NAXIS1, NAXIS2, PRSCX, PRSCY, OVSCX and OVSCY properties of the image.

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
imageImage to be trimmed.
Returns
The function returns 0 on success, or 1 otherwise.

The function removes the pre- and overscan areas from image. The regions to crop are determined from the pre- and overscan image properties (FITS keywords PRSCX, PRSCY, OVSCX and OVSCY). After the removal the affected image properties are updated, including the image world coordinate system if it is present.

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


This file is part of the GIRAFFE Pipeline Reference Manual 2.14.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Wed Mar 11 2015 13:19:42 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2004