High-Level Data Reduction Library: Fitting

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

Loading...
Searching...
No Matches
Functions
Fitting

## Functions
cpl_error_code | hdrl_fit_polynomial_imagelist (const hdrl_imagelist *list, const cpl_vector *samplepos, const int degree, hdrl_imagelist **coef, cpl_image **chi2, cpl_image **dof)
| weighted least squares polynomial fit of each pixel of a imagelist
cpl_error_code | hdrl_fit_polynomial_imagelist2 (const hdrl_imagelist *list, const cpl_imagelist *samplepos, const int degree, hdrl_imagelist **coef, cpl_image **chi2, cpl_image **dof)
| weighted least squares polynomial fit of each pixel of a imagelist

## Detailed Description

## Function Documentation

## ◆ hdrl_fit_polynomial_imagelist()

cpl_error_code hdrl_fit_polynomial_imagelist | ( | const hdrl_imagelist * | list,
|  | const cpl_vector * | samplepos,
|  | const int | degree,
|  | hdrl_imagelist ** | coef,
|  | cpl_image ** | chi2,
|  | cpl_image ** | dof
| ) |  |

weighted least squares polynomial fit of each pixel of a imagelist

Parameters

  list | imagelist to fit, the 1/errors^2 are used as the weights of the fit
  samplepos | vector of sample position of each image in the list
  degree | degree of the fit starting from 0
  coef | output coefficient hdrl_imagelist, the data contains the coefficient the error contains the diagonal element of the covariance matrix
  chi2 | output double cpl_image, contains the chi2 of the fit
  dof | output double cpl_image, contains the degrees of freedom of the residuals

Note
  the errors only need to be relative correct, if the are wrong by a constant the real errors of the data points can be estimated by multiplying the squared errors with chi2/dof The fitting method uses normal equation so the function should not be used for badly conditioned data.

## ◆ hdrl_fit_polynomial_imagelist2()

cpl_error_code hdrl_fit_polynomial_imagelist2 | ( | const hdrl_imagelist * | list,
|  | const cpl_imagelist * | samplepos,
|  | const int | degree,
|  | hdrl_imagelist ** | coef,
|  | cpl_image ** | chi2,
|  | cpl_image ** | dof
| ) |  |

weighted least squares polynomial fit of each pixel of a imagelist

Parameters

  list | imagelist to fit, the 1/errors^2 are used as the weights of the fit
  samplepos | each slice of pixels of this imagelist form the sample position vector
  degree | degree of the fit starting from 0
  coef | output coefficient hdrl_imagelist, the data contains the coefficient the error contains the diagonal element of the covariance matrix
  chi2 | output double cpl_image, contains the chi2 of the fit
  dof | output double cpl_image, contains the degrees of freedom of the residuals

See also
  hdrl_fit_polynomial_imagelist

Similar to hdrl_fit_polynomial_imagelist except the sample positions for each line of pixels per image is taken from the slice of pixels of the samplepos imagelist

Note
  the errors only need to be relative correct, if the are wrong by a constant the real errors of the data points can be estimated by multiplying the squared errors with chi2/dof The fitting method uses normal equation so the function should not be used for badly conditioned data.