Main Page | Modules | Alphabetical List | Class List | Directories | Class Members

High-level functions to compute detector features


Functions

cpl_error_code cpl_flux_get_noise_window (const cpl_image *diff, const int *zone_def, int ron_hsize, int ron_nsamp, double *noise, double *error)
 Compute the readout noise in a rectangle.
cpl_error_code cpl_flux_get_noise_ring (const cpl_image *diff, const int *zone_def, int ron_hsize, int ron_nsamp, double *noise, double *error)
 Compute the readout noise in a ring.
cpl_error_code cpl_detector_interpolate_rejected (cpl_image *in)
 Clean the bad pixels in an image.

Detailed Description

Synopsis:
   #include "cpl_detector.h"

Function Documentation

cpl_error_code cpl_detector_interpolate_rejected cpl_image *  in  ) 
 

Clean the bad pixels in an image.

Parameters:
in The image to clean
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
Images can be CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. The number of bad pixels has to be lower than 20% of the total number of pixels.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the number of pixels is bigger than 20% of the total number of pixels
  • CPL_ERROR_TYPE_MISMATCH if the passed image list type is not supported

cpl_error_code cpl_flux_get_noise_ring const cpl_image *  diff,
const int *  zone_def,
int  ron_hsize,
int  ron_nsamp,
double *  noise,
double *  error
 

Compute the readout noise in a ring.

Parameters:
diff Input image, usually a difference frame.
zone_def Zone where the readout noise is to be computed.
ron_hsize to specify half size of squares (<0 to use default)
ron_nsamp to specify the nb of samples (<0 to use default)
noise Output parameter: noise in the frame.
error Output parameter: error on the noise.
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_flux_get_noise_window
The provided zone is an array of four integers specifying the zone to take into account for the computation. The integers specify a ring as x, y, r1, r2 where these coordinates are given in the FITS notation (x from 1 to nx, y from 1 to ny and bottom to top).

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if diff noise or zone_def is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the internal radius is bigger than the external one in zone_def

cpl_error_code cpl_flux_get_noise_window const cpl_image *  diff,
const int *  zone_def,
int  ron_hsize,
int  ron_nsamp,
double *  noise,
double *  error
 

Compute the readout noise in a rectangle.

Parameters:
diff Input image, usually a difference frame.
zone_def Zone where the readout noise is to be computed.
ron_hsize to specify half size of squares (<0 to use default)
ron_nsamp to specify the nb of samples (<0 to use default)
noise Output parameter: noise in the frame.
error Output parameter: error on the noise.
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
This function is meant to compute the readout noise in a frame by means of a MonteCarlo approach. The input is a frame, usually a difference between two frames taken with the same settings for the acquisition system, although no check is done on that, it is up to the caller to feed in the right kind of frame.

The provided zone is an array of four integers specifying the zone to take into account for the computation. The integers specify ranges as xmin, xmax, ymin, ymax, where these coordinates are given in the FITS notation (x from 1 to lx, y from 1 to ly and bottom to top). Specify NULL instead of an array of four values to use the whole frame in the computation.

The algorithm will create typically 100 9x9 windows on the frame, scattered optimally using a Poisson law. In each window, the standard deviation of all pixels in the window is computed and this value is stored. The readout noise is the median of all computed standard deviations, and the error is the standard deviation of the standard deviations.

Both noise and error are returned by modifying a passed double. If you do not care about the error, pass NULL.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if diff or noise is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the specified window (zone_def) is invalid


Generated on Mon Sep 26 14:38:18 2005 for Common Pipeline Library Reference Manual by  doxygen 1.4.1