ifw-odp  2.0.0-alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
clipm_priv_optimize.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  * E.S.O. - VLT project
4  *
5  * "@(#) $Id: clipm_priv_optimize.h 261995 2014-11-21 16:14:51Z cgarcia $"
6  *
7  * PRIVATE functions for optimization
8  *
9  * who when what
10  * -------- ---------- ----------------------------------------------
11  * hlorch 2007-02-07 created
12  */
13 
14 #ifndef CLIPM_PRIV_OPTIMIZE_H
15 #define CLIPM_PRIV_OPTIMIZE_H
16 
17 /*-----------------------------------------------------------------------------
18  Includes
19  -----------------------------------------------------------------------------*/
20 
21 #include <cpl.h>
22 
23 /*-----------------------------------------------------------------------------
24  Declaration Block
25  -----------------------------------------------------------------------------*/
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*-----------------------------------------------------------------------------
32  Prototypes
33  -----------------------------------------------------------------------------*/
34 
35 cpl_error_code clipm_priv_optimize_gaussian(
36  const cpl_vector *xvalues,
37  const cpl_vector *xsigmas,
38  const cpl_vector *yvalues,
39  const cpl_vector *ysigmas,
40  cpl_fit_mode fit_pars,
41  int max_iterations,
42  double *x0,
43  double *x0_uncertainty,
44  double *sigma,
45  double *sigma_uncertainty,
46  double *fwhm,
47  double *fwhm_uncertainty,
48  double *area,
49  double *offset,
50  double *mse,
51  double *red_chisq,
52  cpl_matrix **covariance,
53  cpl_size *lower_ndx,
54  cpl_size *upper_ndx);
55 
57  cpl_vector *fit_params,
58  const cpl_vector *start_delta,
59  const cpl_vector *precision,
60  double (*evalfunc)
61  (cpl_vector *params,
62  void *other),
63  void *other_func_par,
64  int max_iterations,
65  double *optimum,
66  int *done_iterations);
67 
68 /*----------------------------------------------------------------------------*/
69 
70 #ifdef __cplusplus
71 } /* extern "C" */
72 #endif
73 
74 #endif /* CLIPM_PRIV_OPTIMIZE_H */
cpl_error_code clipm_priv_optimize_gaussian(const cpl_vector *xvalues, const cpl_vector *xsigmas, const cpl_vector *yvalues, const cpl_vector *ysigmas, cpl_fit_mode fit_pars, int max_iterations, double *x0, double *x0_uncertainty, double *sigma, double *sigma_uncertainty, double *fwhm, double *fwhm_uncertainty, double *area, double *offset, double *mse, double *red_chisq, cpl_matrix **covariance, cpl_size *lower_ndx, cpl_size *upper_ndx)
Apply a Gaussian fitting until it is successful.
Definition: clipm_priv_optimize.c:145
cpl_error_code clipm_priv_optimize_downhill_simplex(cpl_vector *fit_params, const cpl_vector *start_delta, const cpl_vector *precision,(cpl_vector *params, void *other), void *other_func_par, int max_iterations, double *optimum, int *done_iterations)
Optimize a set of parameters using the Downhill Simplex method by Nelder and Mead (also known as the ...
Definition: clipm_priv_optimize.c:528