UVES Pipeline Reference Manual  5.4.0
Functions
Flat-field correction

Functions

cpl_error_code uves_flatfielding (cpl_image *image, cpl_image *noise, const cpl_image *master_flat, const cpl_image *mflat_noise)
 Divide by flat field.
flatfielding_method uves_get_flatfield_method (const cpl_parameterlist *parameters, const char *context, const char *subcontext)
 Read flat-field method from parameter list.

Detailed Description

Divide by a master flat-field frame in (pixel, pixel)-space or in (pixel, order)-space.


Function Documentation

cpl_error_code uves_flatfielding ( cpl_image *  image,
cpl_image *  noise,
const cpl_image *  master_flat,
const cpl_image *  mflat_noise 
)

Divide by flat field.

Parameters:
imageThe image to correct
noiseThe noise of the provided image. This noise image is updated according to the error propagation formula. Ignored if set to NULL.
master_flatThe master flat field image
mflat_noiseThe master flat field noise image
Returns:
CPL_ERROR_NONE iff okay.

The input image divided by the normalized master flat image. The normalized master flat image has mean flux equal to 1.

This flat field correction is performed in (pixel, pixel)-space, or (pixel, order)-space. The input image sizes must be equal.

Bad pixels are properly propagated, i.e. if a pixel in the input image or master flat or noise images is bad, the resulting pixel is also set to bad. Also division by a zero or negative flat field causes a bad pixel.

Definition at line 185 of file uves_flatfield.c.

References check, check_nomsg, and passure.

Referenced by extract_ff_rebin_merge(), and uves_reduce().

flatfielding_method uves_get_flatfield_method ( const cpl_parameterlist *  parameters,
const char *  context,
const char *  subcontext 
)

Read flat-field method from parameter list.

Parameters:
parametersThe parameter list
contextContext of ff parameter (or NULL)
subcontextSubcontext of ff parameter
Returns:
The flat-fielding method as read from the parameter context.subcontext.ffmethod

Definition at line 398 of file uves_flatfield.c.

References check.

Referenced by uves_reduce().