Functions | |
cpl_error_code | cpl_detector_interpolate_rejected (cpl_image *in) |
Clean the bad pixels in an image. | |
cpl_error_code | cpl_flux_get_noise_ring (const cpl_image *diff, const double *zone_def, int ron_hsize, int ron_nsamp, double *noise, double *error) |
Compute the readout noise in a ring. | |
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. |
#include "cpl_detector.h"
cpl_error_code cpl_detector_interpolate_rejected | ( | cpl_image * | in | ) |
Clean the bad pixels in an image.
in | The image to clean |
Possible _cpl_error_code_ set in this function:
cpl_error_code cpl_flux_get_noise_ring | ( | const cpl_image * | diff, | |
const double * | zone_def, | |||
int | ron_hsize, | |||
int | ron_nsamp, | |||
double * | noise, | |||
double * | error | |||
) |
Compute the readout noise in a ring.
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. |
Possible _cpl_error_code_ set in this function:
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.
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. |
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: