GIRAFFE Pipeline Reference Manual

gimodel.h

00001 /* $Id: gimodel.h,v 1.11 2007/03/12 12:53:23 rpalsa Exp $
00002  *
00003  * This file is part of the GIRAFFE Pipeline
00004  * Copyright (C) 2002-2006 European Southern Observatory
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 /*
00022  * $Author: rpalsa $
00023  * $Date: 2007/03/12 12:53:23 $
00024  * $Revision: 1.11 $
00025  * $Name: giraffe-2_9 $
00026  */
00027 
00028 #ifndef GIMODEL_H
00029 #define GIMODEL_H
00030 
00031 #include <cxtypes.h>
00032 
00033 #include <cpl_macros.h>
00034 #include <cpl_matrix.h>
00035 
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 
00042     enum GiModelType {
00043         GI_MODEL_LINE = 1,
00044         GI_MODEL_XOPT = 2,
00045         GI_MODEL_YOPT = 3,
00046         GI_MODEL_LOCY = 4
00047     };
00048 
00049     typedef enum GiModelType GiModelType;
00050 
00051     typedef struct GiModel GiModel;
00052 
00053     struct GiFitSetup {
00054 
00055         cxint iterations;
00056         cxint tests;
00057         cxdouble delta;
00058 
00059     };
00060 
00061     typedef struct GiFitSetup GiFitSetup;
00062 
00063 
00064     GiModel* giraffe_model_new(const cxchar* name);
00065     GiModel* giraffe_model_clone(const GiModel* other);
00066     void giraffe_model_delete(GiModel* self);
00067 
00068     const cxchar* giraffe_model_get_name(const GiModel* self);
00069     GiModelType giraffe_model_get_type(const GiModel* self);
00070 
00071     cxsize giraffe_model_count_arguments(const GiModel* self);
00072     cxsize giraffe_model_count_parameters(const GiModel* self);
00073 
00074     const cxchar* giraffe_model_argument_name(const GiModel* self,
00075                                             cxsize position);
00076     const cxchar* giraffe_model_parameter_name(const GiModel* self,
00077                                             cxsize position);
00078 
00079     cxint giraffe_model_set_argument(GiModel* self, const cxchar* name,
00080                                     cxdouble value);
00081     cxdouble giraffe_model_get_argument(const GiModel* self,
00082                                         const cxchar* name);
00083 
00084     cxint giraffe_model_set_parameter(GiModel* self, const cxchar* name,
00085                                     cxdouble value);
00086     cxdouble giraffe_model_get_parameter(const GiModel* self,
00087                                         const cxchar* name);
00088 
00089     cxint giraffe_model_freeze_parameter(GiModel* self, const cxchar* name);
00090     cxint giraffe_model_thaw_parameter(GiModel* self, const cxchar* name);
00091 
00092     cxbool giraffe_model_frozen_parameter(const GiModel* self,
00093                                         const cxchar* name);
00094 
00095     cxint giraffe_model_freeze(GiModel* self);
00096     cxint giraffe_model_thaw(GiModel* self);
00097 
00098     cxint giraffe_model_evaluate(const GiModel* self, cxdouble* result,
00099                                 cxint* status);
00100 
00101     cxint giraffe_model_fit(GiModel* self, cpl_matrix* x, cpl_matrix* y,
00102                             cpl_matrix* sigma);
00103     cxint giraffe_model_fit_sequence(GiModel* self, cpl_matrix* x,
00104                                      cpl_matrix* y, cpl_matrix* sigma,
00105                                      cxint ndata, cxint start, cxint stride);
00106 
00107     cxint giraffe_model_set_iterations(GiModel* self, cxint iterations);
00108     cxint giraffe_model_get_iterations(const GiModel* self);
00109 
00110     cxint giraffe_model_set_delta(GiModel* self, cxdouble delta);
00111     cxdouble giraffe_model_get_delta(const GiModel* self);
00112 
00113     cxint giraffe_model_set_tests(GiModel* self, cxint tests);
00114     cxint giraffe_model_get_tests(const GiModel* self);
00115 
00116     cxint giraffe_model_get_position(const GiModel* self);
00117     cxint giraffe_model_get_df(const GiModel* self);
00118     cxdouble giraffe_model_get_chisq(const GiModel* self);
00119     cxdouble giraffe_model_get_rsquare(const GiModel* self);
00120 
00121     cxdouble giraffe_model_get_variance(const GiModel* self,
00122                                         const cxchar* name);
00123     cxdouble giraffe_model_get_sigma(const GiModel* self,
00124                                      const cxchar* name);
00125 
00126 
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130 
00131 #endif /* GIMODEL_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.9.0.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Jan 26 14:20:28 2012 by doxygen 1.6.3 written by Dimitri van Heesch, © 1997-2004