GIRAFFE Pipeline Reference Manual

gimodel.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 GIMODEL_H
21#define GIMODEL_H
22
23#include <cxtypes.h>
24
25#include <cpl_macros.h>
26#include <cpl_matrix.h>
27
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33
34 enum GiModelType {
35 GI_MODEL_LINE = 1,
36 GI_MODEL_XOPT = 2,
37 GI_MODEL_YOPT = 3,
38 GI_MODEL_LOCY = 4
39 };
40
41 typedef enum GiModelType GiModelType;
42
43 typedef struct GiModel GiModel;
44
45 struct GiFitSetup {
46
47 cxint iterations;
48 cxint tests;
49 cxdouble delta;
50
51 };
52
53 typedef struct GiFitSetup GiFitSetup;
54
55
56 GiModel* giraffe_model_new(const cxchar* name);
57 GiModel* giraffe_model_clone(const GiModel* other);
58 void giraffe_model_delete(GiModel* self);
59
60 const cxchar* giraffe_model_get_name(const GiModel* self);
61 GiModelType giraffe_model_get_type(const GiModel* self);
62
63 cxsize giraffe_model_count_arguments(const GiModel* self);
64 cxsize giraffe_model_count_parameters(const GiModel* self);
65
66 const cxchar* giraffe_model_argument_name(const GiModel* self,
67 cxsize position);
68 const cxchar* giraffe_model_parameter_name(const GiModel* self,
69 cxsize position);
70
71 cxint giraffe_model_set_argument(GiModel* self, const cxchar* name,
72 cxdouble value);
73 cxdouble giraffe_model_get_argument(const GiModel* self,
74 const cxchar* name);
75
76 cxint giraffe_model_set_parameter(GiModel* self, const cxchar* name,
77 cxdouble value);
78 cxdouble giraffe_model_get_parameter(const GiModel* self,
79 const cxchar* name);
80
81 cxint giraffe_model_freeze_parameter(GiModel* self, const cxchar* name);
82 cxint giraffe_model_thaw_parameter(GiModel* self, const cxchar* name);
83
84 cxbool giraffe_model_frozen_parameter(const GiModel* self,
85 const cxchar* name);
86
87 cxint giraffe_model_freeze(GiModel* self);
88 cxint giraffe_model_thaw(GiModel* self);
89
90 cxint giraffe_model_evaluate(const GiModel* self, cxdouble* result,
91 cxint* status);
92
93 cxint giraffe_model_fit(GiModel* self, cpl_matrix* x, cpl_matrix* y,
94 cpl_matrix* sigma);
95 cxint giraffe_model_fit_sequence(GiModel* self, cpl_matrix* x,
96 cpl_matrix* y, cpl_matrix* sigma,
97 cxint ndata, cxint start, cxint stride);
98
99 cxint giraffe_model_set_iterations(GiModel* self, cxint iterations);
100 cxint giraffe_model_get_iterations(const GiModel* self);
101
102 cxint giraffe_model_set_delta(GiModel* self, cxdouble delta);
103 cxdouble giraffe_model_get_delta(const GiModel* self);
104
105 cxint giraffe_model_set_tests(GiModel* self, cxint tests);
106 cxint giraffe_model_get_tests(const GiModel* self);
107
108 cxint giraffe_model_get_position(const GiModel* self);
109 cxint giraffe_model_get_df(const GiModel* self);
110 cxdouble giraffe_model_get_chisq(const GiModel* self);
111 cxdouble giraffe_model_get_rsquare(const GiModel* self);
112
113 cxdouble giraffe_model_get_variance(const GiModel* self,
114 const cxchar* name);
115 cxdouble giraffe_model_get_sigma(const GiModel* self,
116 const cxchar* name);
117
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif /* GIMODEL_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.16.11.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Sun Apr 21 2024 13:58:03 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2004