1
/*===========================================================================
2
Copyright (C) 1995-2009 European Southern Observatory (ESO)
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; either version 2 of
7
the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public
15
License along with this program; if not, write to the Free
16
Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
19
Correspondence concerning ESO-MIDAS should be addressed as follows:
20
Internet e-mail: midas@eso.org
21
Postal address: European Southern Observatory
22
Data Management Division
23
Karl-Schwarzschild-Strasse 2
24
D 85748 Garching bei Muenchen
26
===========================================================================*/
35
#include <alice_global.h>
36
#include <alice_util.h>
38
double avex,avey,adevx,adevy,sdevx,sdevy,svarx,svary,skew,curt,xm,ym;
40
void poly_fit(xv,yv,npt,n)
46
double chisq,*a,*sig,**covar,*powx;
47
void fpoly(), Alfit();
53
covar = dmatrix(1,n,1,n);
59
Alfit(xv,yv,sig,npt,a,n,lista,n,covar,&chisq,fpoly);
61
fitPolyValues[i-1] = a[i];
62
free_dvector(powx,1,n);
63
free_dmatrix(covar,1,n,1,n);
64
free_dvector(sig,1,npt);
65
free_ivector(lista,1,n);