High-Level Data Reduction Library: hdrl_background

High-Level Data Reduction Library 1.6.0 High-Level data reduction routines for ESO pipelines

Loading...
Searching...
No Matches
Functions
hdrl_background
Catalogue

Model and create background map. More...

Collaboration diagram for hdrl_background:

## 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

  ap | The current ap structure
  x | The X position in question
  y | The Y position in question
  skylev | Output sky level at x, y
  skyrms | Output 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.

## ◆ 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

  ap | The current ap structure
  nbsize | The size of the cells in pixels
  bkg_subtr | switch: 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.

## ◆ 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

  ap | The current ap structure
  skymed | Output sky median
  skysig | Output 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.