UVES Pipeline Reference Manual
5.4.6
|
Functions | |
int | uves_physmod_stacen (float *p_img, int dimx, int dimy, char meth, int *image, float *xout, float *yout, float *xerr, float *yerr, float *xsig, float *ysig, float *xyval, int *stat) |
Routines used to do Gaussian fit to a line. More... | |
static int | CGN_NINT (float a) |
finds absolute value of nearest integer More... | |
static int | Ckapsig (float *val, int nval, int iter, float akap, float *cons, float *rms, int *npts) |
selects a constant mean through a kap*sig clipping More... | |
static int | MATINV (double(*matrix)[MAXPAR], int nfree) |
calculate the inverse of a matrix More... | |
static double | ERFCC (double xx) |
returns complementary error function EFC( xx ) More... | |
static double | GAUSFU (double xx, double *gpar) |
static void | GAUSDE (double xdat, double *gpar, double *deriv) |
evaluates derivatives of function for least squares search with shape of a gaussian distribution More... | |
static float | FCHIS (double *data, int ndim, int nfree, int mode, double *dfit) |
evaluate reduced chi square for fit to data More... | |
static int | LSQFIT (double *xdat, double *data, int ndim, double *gpar, float *lamda, double *dfit, double *chisqr, double *sigma) |
least squares fit to a non-linear function More... | |
static void | Crhox (float *p_img, int *npix, int *image, int *lnew, double *krx) |
compute X-marginal vector KRX. More... | |
static void | Crhoy (float *p_img, int *npix, int *image, int *lnew, double *kry) |
compute Y-marginal vector KRY. More... | |
static int | Cserch (double *marg, int ndim, int ign, int *lmin, int *lmax, float *s_cent, float *s_width) |
search a star from a marginal distribution More... | |
int | uves_physmod_cstacen (char meth, float *p_img, int *npix, int *image, float *xypos, float *xyerr, float *xysig, float *xyval) |
Routines used to do Gaussian fit to a line. More... | |
This module contains functionalities to do a Gaussian fit along X,Y to a line (equivalent of MIDAS cstacen.c)
int uves_physmod_stacen | ( | float * | p_img, |
int | dimx, | ||
int | dimy, | ||
char | meth, | ||
int * | image, | ||
float * | xout, | ||
float * | yout, | ||
float * | xerr, | ||
float * | yerr, | ||
float * | xsig, | ||
float * | ysig, | ||
float * | xyval, | ||
int * | stat | ||
) |
Routines used to do Gaussian fit to a line.
p_img | : input pointer to image |
dimx | : input image's x dimension |
dimy | : input image's y dimension |
meth | : input method of centering: MOM (moment centering) GAU (gaussian centering) |
image | : input image mapping array |
xout | : ouput center position x (C indexing) |
yout | : ouput center position x (C indexing) |
xerr | : ouput error estimate of xout |
yerr | : ouput error estimate of yout |
xsig | : output width of source on x |
ysig | : output width of source on x |
xyval | : output central value |
stat | : return status |
This module contains the following statistic functions:
Performs a Gaussian fit of the intensity distribution obtained by collapsing along X or Y an image within a box.
Definition at line 188 of file uves_physmod_cstacen.c.
References uves_physmod_cstacen().
Referenced by uves_physmod_center_gauss().
|
static |
finds absolute value of nearest integer
a | value to convert |
Definition at line 232 of file uves_physmod_cstacen.c.
Referenced by Cserch(), and uves_physmod_cstacen().
|
static |
selects a constant mean through a kap*sig clipping
val | : input values |
nval | : number of input values |
iter | : number of iterations (min = 1) |
akap | : input AKAP * RMS |
output:
cons | : output derived mean value |
rms | : output RMS of mean value |
npts | : output number of points used to derive the mean value |
Selects a constant mean through a kap*sig clipping:
Definition at line 269 of file uves_physmod_cstacen.c.
Referenced by uves_physmod_cstacen().
|
static |
calculate the inverse of a matrix
input:
(*matrix) | : input matrix to be inverted |
nfree | : input number of free parameters |
The algorithm used is the Gauss-Jordan algorithm described in Stoer, Numerische matematik, 1 Teil.
Definition at line 373 of file uves_physmod_cstacen.c.
Referenced by LSQFIT().
|
static |
returns complementary error function EFC( xx )
xx | : input parameter of error function |
Factional error everywhere less than 1.2e-7
Definition at line 473 of file uves_physmod_cstacen.c.
Referenced by GAUSFU().
|
static |
xx | : input data point of independent variable |
gpar | : function parameters |
Definition at line 533 of file uves_physmod_cstacen.c.
References ERFCC().
|
static |
evaluates derivatives of function for least squares search with shape of a gaussian distribution
xdat | : input data point of independent variable |
gpar | : input parameters of the gaussian distribution |
deriv | : output derivatives of function |
Definition at line 571 of file uves_physmod_cstacen.c.
References GAUSFU().
Referenced by LSQFIT().
|
static |
evaluate reduced chi square for fit to data
data | : input data |
ndim | : dimension of input data |
nfree | : number of degrees of freedom |
mode | : determines method of weighting the least-squares fit:
|
dfit | : output array with the fit for data |
Definition at line 645 of file uves_physmod_cstacen.c.
Referenced by LSQFIT().
|
static |
least squares fit to a non-linear function
xdat | : input array of data points ind. var. |
data | : input array of data points dep. var. |
ndim | : input dimension of xdat and data |
gpar | : in/out function parameters:
|
lamda | : in/out proportion of gradient search included |
dfit | : output array with the fit for data |
chisqr | output reduced chi square for fit |
sigma | : the probable uncertainty (output) |
Note: set LAMDA to 0.001 at the beginning of the search
Definition at line 711 of file uves_physmod_cstacen.c.
References FCHIS(), GAUSDE(), GAUSFU(), and MATINV().
Referenced by uves_physmod_cstacen().
|
static |
compute X-marginal vector KRX.
p_img | : input pointer to 2-D image |
npix | : input dimension of image |
image | : (input) contains in pixel units in C notation (0 ...) |
lnew | : input Y lower/upper limits to the marginal in C notation (0 ...) |
krx | : output X-marginal vector |
For the algorithm description see Stetson, P.B., 1979 Astron. J., 84 1149.
Definition at line 849 of file uves_physmod_cstacen.c.
Referenced by uves_physmod_cstacen().
|
static |
compute Y-marginal vector KRY.
p_img | : input pointer to 2-D image |
npix | : input dimension of image |
image | : (input) contains in pixel units in C notation (0 ...) |
lnew | : input Y lower/upper limits to the marginal in C notation (0 ...) |
kry | : output X-marginal vector |
For the algorithm description see Stetson, P.B., 1979 Astron. J., 84 1149.
Definition at line 921 of file uves_physmod_cstacen.c.
Referenced by uves_physmod_cstacen().
|
static |
search a star from a marginal distribution
marg | : input marginal data |
ndim | : input dimension of MARG |
ign | : input number of points ignored at each end of KRX ( greater or equal 2) |
lmin | : output low-side local minimum (in pixels) |
lmax | : output high-side local minimum (in pixels) |
s_cent | : output output estimate of the object centre |
s_width | output output estimate of the object width |
For the algorithm description see Stetson, P.B., 1979 Astron. J., 84 1149.
Definition at line 994 of file uves_physmod_cstacen.c.
References CGN_NINT().
Referenced by uves_physmod_cstacen().
int uves_physmod_cstacen | ( | char | meth, |
float * | p_img, | ||
int * | npix, | ||
int * | image, | ||
float * | xypos, | ||
float * | xyerr, | ||
float * | xysig, | ||
float * | xyval | ||
) |
Routines used to do Gaussian fit to a line.
meth | : input method of centering: MOM (moment centering) GAU (gaussian centering) |
p_img | : input pointer to image |
npix | : input number of pixels in image |
image | : input image size in pixel coordinates (F77 indexing) |
xypos | : output center position (x,y) (C indexing) |
xyerr | : output error estimate of xypos (x,y) |
xysig | : output width of source (x,y) |
xyval | : output central value |
3 if iteration failed
This module contains the following statistic functions:
Performs a Gaussian fit of the intensity distribution obtained by collapsing along X or Y an image within a box.
Definition at line 1208 of file uves_physmod_cstacen.c.
References CGN_NINT(), Ckapsig(), Crhox(), Crhoy(), Cserch(), and LSQFIT().
Referenced by uves_physmod_stacen().