3 #include <gsl/gsl_vector.h>
4 #include <gsl/gsl_complex.h>
5 #include <gsl/gsl_complex_math.h>
6 #include <gsl/gsl_eigen.h>
7 #include <gsl/gsl_sort_vector.h>
8 #include <gsl/gsl_math.h>
9 #include <gsl/gsl_matrix.h>
10 #include <gsl/gsl_linalg.h>
11 #include <gsl/gsl_blas.h>
12 #include <gsl/gsl_multifit_nlin.h>
13 #include <gsl/gsl_multimin.h>
14 #include <gsl/gsl_multiroots.h>
15 #include <gsl/gsl_errno.h>
16 #include <gsl/gsl_rng.h>
17 #include <gsl/gsl_cdf.h>
18 #include <QProgressDialog>
19 #include <QMessageBox>
34 enum ErrMod{uncorrelated,covariant,minos,montecarlo};
37 double (*chi2)(
void*);
38 double (*runchi2)(
void*,int);
53 enum threattyp {fitseriell,fitglobal,errorseriell,errorglobal,notvalid};
70 double valb,
double valab,
71 double xa,
double xb);
110 fitthread(
double* para,
int* changed,
double* errors,
int cpara,
111 double (*f)(
void*),
void* instance,
int MaxIter,
112 double conv,
bool forceSimplex);
117 fitthread(
double* para,
int runi,
double* errors,
int cpara,
118 double (*f)(
void*,
int),
void* instance,
int MaxIter,
128 fitthread(
double* para,
int* changed,
double *errors,
int cpara,
129 double (*chi2)(
void*),
void* instance, ErrMod mode,
130 double (*fitting)(
void*),
int MonteCarloIterations,
131 int crun,
int cglobal,
bool (*correlated)(
void*,
int,
int));
133 fitthread(
double* para,
int runi,
double *errors,
int cpara,
134 double (*chi2)(
void*,
int),
void* instance, ErrMod mode,
135 int MonteCarloIterations);
147 void stop_calculations();
155 void paraboloid(
double **x,
double *y,
int N,
int points,
double* fxy);
165 void fit_gaussian(
double *x,
double* y,
double* sigma,
int count,
166 double* gsigma,
double* gy0,
double* gx0);
169 void fit_global_simplex();
171 int correlation_possible(
int xi,
int yi);
180 void get_Hesse(gsl_matrix *H,
double* ss,
double *k);
192 void Hesse_to_covariant_errors(gsl_matrix *H,
double* errors,
193 double* vals,
int cpara);
195 QString correlations(gsl_matrix *H,
int cpara,
double* vals);
203 double fxx(
double* v,
double v0,
double* ss,
double chi0);
205 double fx(
double* v,
double v0,
double* ss,
double chi0);
207 double fxy(
double* vx,
double* vy,
208 double v0x,
double v0y,
209 double fxx,
double fyy,
210 double ssx,
double ssy,
double chi0);
220 double (*f_global)(
void*);
221 double (*fit)(
void*);
222 double (*f_seriell)(
void*,int);
223 bool (*correlated)(
void*,int,int);
233 int montecarloiterations;
245 #endif // fitthread_H
fitthread(double *para, int *changed, double *errors, int cpara, double(*f)(void *), void *instance, int MaxIter, double conv, bool forceSimplex)
global fitting
Definition: fitthread.cpp:5
container to be used in GSL minimization functions
Definition: fitthread.h:36
thread class to perform fitting and error calculation tasks
Definition: fitthread.h:95
void errors_covariant()
see ErrMod
Definition: fitthread.cpp:296
void error_message(int runi, QString message)
fitmodel instance should print error message
container to sort correlation matrix elements using qSort()
Definition: fitthread.h:58
container to be used in GSL minimization functions
Definition: fitthread.h:46
void refresh_progress(int ID, int citer, double chi2)
progressbar in fitmodel should be updated
CorrelationEle(int ia, int ib, double vala, double valb, double valab, double xa, double xb)
Definition: fitthread.cpp:1163
void finished(int ID)
calculation is finished
void errors_uncorrelated(bool EmitSignals)
see ErrMod, EmitSignals may suppress Progressbar update at internal use
Definition: fitthread.cpp:372
void errors_MINOS()
see ErrMod
Definition: fitthread.cpp:388
void paraboloid(double **x, double *y, int N, int points, double *fxy)
fits a dim-dimensional paraboloid centered at zero at points x, UNUSED
Definition: fitthread.cpp:768
void errors_MonteCarlo(double pdfmin, double sigmac)
see ErrMod
Definition: fitthread.cpp:436
parser and handler of user input mbs-files
Definition: fitmodel.h:159