SINFONI Pipeline Reference Manual
2.5.2
|
Functions | |
float | sinfo_new_boltz (float *xdat, float *parlist) |
calculates the value of a Boltzmann function with parameters parlist at the position xdat | |
void | sinfo_new_boltz_deriv (float *xdat, float *parlist, float *dervs) |
calculates the partial derivatives for a Boltzmann function with parameters parlist at position xdat | |
int | sinfo_new_lsqfit (float *xdat, int *xdim, float *ydat, float *wdat, int *ndat, float *fpar, float *epar, int *mpar, int *npar, float *tol, int *its, float *lab) |
makes a least-squares fit of a function to a set of data points. | |
int | sinfo_new_fit_slits_boltz (cpl_image *lineImage, FitParams **par, float **slit_pos, int box_length, float y_box, float diff_tol) |
fits the beginning and end position of the slitlets by using non-linear least square fitting of a Boltzmann function fits a Boltzmann function to the slitlet edges exposed and indicated by the brightest emission lines. | |
int | sinfo_new_fit_slits_boltz_single_line (cpl_image *lineImage, float **slit_pos, int box_length, float y_box, int low_pos, int high_pos) |
fits the beginning and end position of the slitlets by using non-linear least square fitting of a Boltzmann function | |
int | sinfo_new_fit_slits_boltz_with_estimate (cpl_image *lineImage, float **slit_pos, int box_length, float y_box, float diff_tol, int low_pos, int high_pos) |
its the beginning and end position of the slitlets by using non-linear least square fitting of a Boltzmann function |
TBD
float sinfo_new_boltz | ( | float * | xdat, |
float * | parlist | ||
) |
calculates the value of a Boltzmann function with parameters parlist at the position xdat
xdat | position array |
parlist | parameter list The parameters are: # parlist(0): background1 # parlist(1): background2 # parlist(2): central position # parlist(3): width |
Definition at line 245 of file sinfo_boltzmann.c.
void sinfo_new_boltz_deriv | ( | float * | xdat, |
float * | parlist, | ||
float * | dervs | ||
) |
calculates the partial derivatives for a Boltzmann function with parameters parlist at position xdat
xdat | position array xdat |
parlist | parameter list The parameters are: |
dervs | derivative value of a Boltzmann function at\ position xdat: dervs dervs[0]: partial derivative by background1 |
Definition at line 278 of file sinfo_boltzmann.c.
int sinfo_new_fit_slits_boltz | ( | cpl_image * | lineImage, |
FitParams ** | par, | ||
float ** | slit_pos, | ||
int | box_length, | ||
float | y_box, | ||
float | diff_tol | ||
) |
fits the beginning and end position of the slitlets by using non-linear least square fitting of a Boltzmann function fits a Boltzmann function to the slitlet edges exposed and indicated by the brightest emission lines.
lineImage,: | emission line frame |
par,: | fit parameter data structure of fitted lines |
slit_pos,: | allocated dummy array for the slitlet positions [32][2] |
box_length,: | pixel length of the row box within the fit is done |
y_box,: | small box in spectral direction within the slitlet may lie. |
diff_tol,: | maximum tolerable difference of the resulting fit position with respect to the expected position. If difference is greater the expected position is taken. |
image columns
fits the beginning and end position of the slitlets by using non-linear least square fitting of a Boltzmann function fits a Boltzmann function to the slitlet edges exposed and indicated by the brightest emission lines. To achieve this, the fit parameters are used to find the brightest emission line and to get its position for each column. The least squares fit is done by using a box smaller than the size of two slitlets —————————————————————————
Definition at line 865 of file sinfo_boltzmann.c.
References sinfo_msg_error, sinfo_msg_warning, and sinfo_new_lsqfit().
int sinfo_new_fit_slits_boltz_single_line | ( | cpl_image * | lineImage, |
float ** | slit_pos, | ||
int | box_length, | ||
float | y_box, | ||
int | low_pos, | ||
int | high_pos | ||
) |
fits the beginning and end position of the slitlets by using non-linear least square fitting of a Boltzmann function
lineImage | emission line frame |
slit_pos | allocated dummy array for the slitlet positions [min32][2] |
box_length | pixel length of the row box within the fit is done |
y_box,: | small box in spectral direction within the slitlet may lie. |
low_pos | pixel positions in spectral direction between which the line should be located. |
high_pos | pixel positions in spectral direction between which the line should be located. |
fits the beginning and end position of the slitlets by using non-linear least square fitting of a Boltzmann function fits a Boltzmann function to the slitlet edges exposed and indicated by the brightest emission lines. The slitlet is searched with user given positions. The least squares fit is done by using a box smaller than the size of two slitlets
Definition at line 1620 of file sinfo_boltzmann.c.
References sinfo_msg_error, sinfo_msg_warning, and sinfo_new_lsqfit().
int sinfo_new_fit_slits_boltz_with_estimate | ( | cpl_image * | lineImage, |
float ** | slit_pos, | ||
int | box_length, | ||
float | y_box, | ||
float | diff_tol, | ||
int | low_pos, | ||
int | high_pos | ||
) |
its the beginning and end position of the slitlets by using non-linear least square fitting of a Boltzmann function
lineImage | emission line frame |
slit_pos | estimation array for the slitlet positions [min32][2] |
box_length | pixel length of the row box within the fit is done |
y_box | small box in spectral direction within the slitlet may lie. |
diff_tol | tolerance on slitlets position |
low_pos | pixel positions in spectral direction between which the line should be located. |
high_pos | pixel positions in spectral direction between which the line should be located. |
Definition at line 2165 of file sinfo_boltzmann.c.
References sinfo_msg_error, sinfo_msg_warning, and sinfo_new_lsqfit().
int sinfo_new_lsqfit | ( | float * | xdat, |
int * | xdim, | ||
float * | ydat, | ||
float * | wdat, | ||
int * | ndat, | ||
float * | fpar, | ||
float * | epar, | ||
int * | mpar, | ||
int * | npar, | ||
float * | tol, | ||
int * | its, | ||
float * | lab | ||
) |
makes a least-squares fit of a function to a set of data points.
xdat,: | position, coordinates of data points. xdat is 2 dimensional: XDAT ( XDIM, NDAT ) |
xdim,: | dimension of fit |
ydat,: | data points |
wdat,: | weights for data points |
ndat,: | number of data points |
fpar,: | on input contains initial estimates of the parameters for non-linear fits, on output the fitted parameters. |
epar,: | contains estimates of the errors in fitted parameters |
mpar,: | logical mask telling which parameters are free (non-zero) and which parameters are fixed (0) |
npar,: | number of function parameters ( free + fixed ) |
tol,: | relative tolerance. sinfo_lsqfit stops when successive iterations fail to produce a decrement in reduced chi-squared less than tol. If tol is less than the minimum tolerance possible, tol will be set to this value. This means that maximum accuracy can be obtained by setting tol = 0.0. |
its,: | maximum number of iterations |
lab,: | mixing parameter, lab determines the initial weight of steepest descent method relative to the Taylor method lab should be a small value (i.e. 0.01). lab can only be zero when the partial derivatives are independent of the parameters. In fact in this case lab should be exactly equal to zero. |
a solution which satisfies tol.
are zero
The method used is described in: Marquardt, J.Soc.Ind.Appl.Math. 11. 431 (1963). This method is a mixture of the steepest descent method and the Taylor method.
Definition at line 627 of file sinfo_boltzmann.c.
Referenced by sinfo_new_fit_slits_boltz(), sinfo_new_fit_slits_boltz_single_line(), and sinfo_new_fit_slits_boltz_with_estimate().