CR2RE Pipeline Reference Manual 1.6.7
Functions
hdrl_background

Model and create background map. More...

Functions

cpl_error_code hdrl_background (ap_t *ap, cpl_size nbsize, cpl_size bkg_subtr, hdrl_casu_result *res)
 Model and create background map.
 
cpl_error_code hdrl_backstats (ap_t *ap, double *skymed, double *skysig)
 Work out robust background estimate over a whole input image.
 
void hdrl_backest (ap_t *ap, double x, double y, double *skylev, double *skyrms)
 Work out estimated sky for a pixel position.
 

Detailed Description

Model and create background map.

Function Documentation

◆ hdrl_backest()

void hdrl_backest ( ap_t *  ap,
double  x,
double  y,
double *  skylev,
double *  skyrms 
)

Work out estimated sky for a pixel position.

Parameters
apThe current ap structure
xThe X position in question
yThe Y position in question
skylevOutput sky level at x, y
skyrmsOutput sky noise at x, y

Description: Given the coarse background grid, calculate the background at a given image pixel position by doing a bi-linear interpolation of it's position within the grid.

Definition at line 315 of file hdrl_cat_background.c.

Referenced by hdrl_process_results().

◆ hdrl_background()

cpl_error_code hdrl_background ( ap_t *  ap,
cpl_size  nbsize,
cpl_size  bkg_subtr,
hdrl_casu_result *  res 
)

Model and create background map.

Parameters
apThe current ap structure
nbsizeThe size of the cells in pixels
bkg_subtrswitch: if bkg_subtr !=0 fill background map
res
Returns
CPL_ERROR_CODE if all went well (this is currently the only value).

Description: The image data array is split into cells. In each cell a robust background estimate is obtained. The cell raster is gently smoothed and then used to create a full background map with a bi-linear interpolation scheme.

Definition at line 67 of file hdrl_cat_background.c.

References hdrl_bfilt(), and sort_array().

Referenced by hdrl_catalogue_conf().

◆ hdrl_backstats()

cpl_error_code hdrl_backstats ( ap_t *  ap,
double *  skymed,
double *  skysig 
)

Work out robust background estimate over a whole input image.

Parameters
apThe current ap structure
skymedOutput sky median
skysigOutput sky noise
Returns
CPL_ERROR_NONE if all went well and CPL_ERROR_ILLEGAL_INPUT if there aren't enough good values to do the calculation.

Description: The image is analysed to work out a robust estimate of the background median, and sigma.

Definition at line 230 of file hdrl_cat_background.c.

Referenced by hdrl_catalogue_conf().