GIRAFFE Pipeline Reference Manual

gimodel.h
1 /* $Id$
2  *
3  * This file is part of the GIRAFFE Pipeline
4  * Copyright (C) 2002-2006 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author$
23  * $Date$
24  * $Revision$
25  * $Name$
26  */
27 
28 #ifndef GIMODEL_H
29 #define GIMODEL_H
30 
31 #include <cxtypes.h>
32 
33 #include <cpl_macros.h>
34 #include <cpl_matrix.h>
35 
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 
42  enum GiModelType {
43  GI_MODEL_LINE = 1,
44  GI_MODEL_XOPT = 2,
45  GI_MODEL_YOPT = 3,
46  GI_MODEL_LOCY = 4
47  };
48 
49  typedef enum GiModelType GiModelType;
50 
51  typedef struct GiModel GiModel;
52 
53  struct GiFitSetup {
54 
55  cxint iterations;
56  cxint tests;
57  cxdouble delta;
58 
59  };
60 
61  typedef struct GiFitSetup GiFitSetup;
62 
63 
64  GiModel* giraffe_model_new(const cxchar* name);
65  GiModel* giraffe_model_clone(const GiModel* other);
66  void giraffe_model_delete(GiModel* self);
67 
68  const cxchar* giraffe_model_get_name(const GiModel* self);
69  GiModelType giraffe_model_get_type(const GiModel* self);
70 
71  cxsize giraffe_model_count_arguments(const GiModel* self);
72  cxsize giraffe_model_count_parameters(const GiModel* self);
73 
74  const cxchar* giraffe_model_argument_name(const GiModel* self,
75  cxsize position);
76  const cxchar* giraffe_model_parameter_name(const GiModel* self,
77  cxsize position);
78 
79  cxint giraffe_model_set_argument(GiModel* self, const cxchar* name,
80  cxdouble value);
81  cxdouble giraffe_model_get_argument(const GiModel* self,
82  const cxchar* name);
83 
84  cxint giraffe_model_set_parameter(GiModel* self, const cxchar* name,
85  cxdouble value);
86  cxdouble giraffe_model_get_parameter(const GiModel* self,
87  const cxchar* name);
88 
89  cxint giraffe_model_freeze_parameter(GiModel* self, const cxchar* name);
90  cxint giraffe_model_thaw_parameter(GiModel* self, const cxchar* name);
91 
92  cxbool giraffe_model_frozen_parameter(const GiModel* self,
93  const cxchar* name);
94 
95  cxint giraffe_model_freeze(GiModel* self);
96  cxint giraffe_model_thaw(GiModel* self);
97 
98  cxint giraffe_model_evaluate(const GiModel* self, cxdouble* result,
99  cxint* status);
100 
101  cxint giraffe_model_fit(GiModel* self, cpl_matrix* x, cpl_matrix* y,
102  cpl_matrix* sigma);
103  cxint giraffe_model_fit_sequence(GiModel* self, cpl_matrix* x,
104  cpl_matrix* y, cpl_matrix* sigma,
105  cxint ndata, cxint start, cxint stride);
106 
107  cxint giraffe_model_set_iterations(GiModel* self, cxint iterations);
108  cxint giraffe_model_get_iterations(const GiModel* self);
109 
110  cxint giraffe_model_set_delta(GiModel* self, cxdouble delta);
111  cxdouble giraffe_model_get_delta(const GiModel* self);
112 
113  cxint giraffe_model_set_tests(GiModel* self, cxint tests);
114  cxint giraffe_model_get_tests(const GiModel* self);
115 
116  cxint giraffe_model_get_position(const GiModel* self);
117  cxint giraffe_model_get_df(const GiModel* self);
118  cxdouble giraffe_model_get_chisq(const GiModel* self);
119  cxdouble giraffe_model_get_rsquare(const GiModel* self);
120 
121  cxdouble giraffe_model_get_variance(const GiModel* self,
122  const cxchar* name);
123  cxdouble giraffe_model_get_sigma(const GiModel* self,
124  const cxchar* name);
125 
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif /* GIMODEL_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.12.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Mon Mar 24 2014 11:43:52 by doxygen 1.8.2 written by Dimitri van Heesch, © 1997-2004