GIRAFFE Pipeline Reference Manual

gilevenberg.h
1 /*
2  * This file is part of the GIRAFFE Pipeline
3  * Copyright (C) 2002-2019 European Southern Observatory
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef GILEVENBERG_H
21 #define GILEVENBERG_H
22 
23 #include <cxtypes.h>
24 
25 #include <cpl_macros.h>
26 #include <cpl_matrix.h>
27 
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 
39 struct GiFitParams {
40 
45  cxint iterations;
46 
51  cxint tests;
52 
56  cxdouble dchisq;
57 
58 };
59 
60 typedef struct GiFitParams GiFitParams;
61 
62 
68 typedef void (*GiFitFunc)(cxdouble *result, cxdouble *x, cxdouble *a,
69  cxint na, cxdouble *dyda, cxdouble *r);
70 
71 
72 cxint giraffe_nlfit(cpl_matrix *x, cpl_matrix *y, cpl_matrix *sigma,
73  cxint ndata, cpl_matrix *a, cpl_matrix *delta,
74  cxint *ia, cxint ma, cpl_matrix *alpha, cxdouble *chisq,
75  GiFitFunc funcs, const GiFitParams *setup);
76 
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* GILEVENBERG_H */
cxint giraffe_nlfit(cpl_matrix *x, cpl_matrix *y, cpl_matrix *sigma, cxint ndata, cpl_matrix *a, cpl_matrix *delta, cxint *ia, cxint ma, cpl_matrix *alpha, cxdouble *chisq, GiFitFunc funcs, const GiFitParams *setup)
Levenberg-Marquardt non-linear fit driver.
Definition: gilevenberg.c:488
Non-linear fit control parameters.
Definition: gilevenberg.h:39
cxint iterations
Definition: gilevenberg.h:45
cxdouble dchisq
Definition: gilevenberg.h:56
cxint tests
Definition: gilevenberg.h:51

This file is part of the GIRAFFE Pipeline Reference Manual 2.16.10.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Dec 15 2022 21:18:51 by doxygen 1.9.1 written by Dimitri van Heesch, © 1997-2004