CR2RE Pipeline Reference Manual 1.6.2
Functions
Cr2res_detlin

Functions

int cr2res_detlin_correct (hdrl_image *in, const hdrl_imagelist *detlin)
 Apply the detector linearity correction.
 
int cr2res_detlin_compute (const cpl_vector *dits, const cpl_vector *adus, cpl_size max_degree, cpl_polynomial **fitted, cpl_vector **error)
 Fits the response of a given pixel to the illumination increase.
 
cpl_frameset * cr2res_detlin_sort_frames (const cpl_frameset *in)
 Sort the frames by increasing DIT.
 

Detailed Description

Function Documentation

◆ cr2res_detlin_compute()

int cr2res_detlin_compute ( const cpl_vector *  dits,
const cpl_vector *  adus,
cpl_size  max_degree,
cpl_polynomial **  fitted,
cpl_vector **  error 
)

Fits the response of a given pixel to the illumination increase.

Parameters
ditsVector with the DIT values, assumed sorted increasing!
adusVector with corresponding illumination values (ADU)
max_degreeMaximum degree for the fit
fitted[out] The fitted polynomial
error[out] the errors vector
Returns
0 if ok, -1 in error case

The input dits and values vectors must have the same size The *fitted polynomial coefficients are the values stored in the DETLIN_COEFFS product for a given pixel. When evaluated at a certain ADU, this polynomial yields the correction factor to be multiplied with. The *error vector size must match the *fitted polynomial number of coefficients. Its values are stored in the error extension of the DETLIN_COEFFS product.

Definition at line 175 of file cr2res_detlin.c.

◆ cr2res_detlin_correct()

int cr2res_detlin_correct ( hdrl_image *  in,
const hdrl_imagelist *  detlin 
)

Apply the detector linearity correction.

Parameters
inthe input image
detlinthe detlin coeffs
Returns
0 if everything is ok, -1 otherwise

Definition at line 71 of file cr2res_detlin.c.

References hdrl_image_get_error(), hdrl_image_get_error_const(), hdrl_image_get_image(), hdrl_image_get_image_const(), and hdrl_imagelist_get_const().

Referenced by cr2res_calib_image(), and cr2res_qc_detlin().

◆ cr2res_detlin_sort_frames()

cpl_frameset * cr2res_detlin_sort_frames ( const cpl_frameset *  in)

Sort the frames by increasing DIT.

Parameters
inThe input frameset
Returns
the newly allocated sorted frameset

Definition at line 335 of file cr2res_detlin.c.