KaraFit.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 by Aris Noutsos
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Applications/njkk08/KaraFit.h
10 
11 #ifndef _KaraFit_h
12 #define _KaraFit_h
13 
14 #include <vector>
15 #include <math.h>
16 
17 class KaraFit
18 {
19 
20 public:
21 
22  KaraFit();
23  ~KaraFit();
24 
25 
26  void passData (const std::vector<double>& _pas,
27  const std::vector<double>& _errs,
28  const std::vector<double>& _freqs,
29  double _rm1,
30  double _rm2,
31  double _drm,
32  double _pa1,
33  double _pa2,
34  double _dpa)
35  {
36 
37  rm1 = _rm1; rm2 = _rm2;
38  drm = _drm; dpa = _dpa;
39  pa1 = _pa1; pa2 = _pa2;
40 
41  pas = _pas;
42  errs = _errs;
43  freqs = _freqs;
44 
45  }
46 
47  int doFit();
48 
49  std::vector<double> fitValues;
50 
51 
52 private:
53 
54 
55  void fitResult();
56 
57 
58 
59  double r2d(){return 180.0/M_PI;}
60  double d2r(){return M_PI/180.0;}
61 
62  double rm;
63  double drm;
64  double pa;
65  double dpa;
66 
67  double rm1,rm2;
68  double pa1,pa2;
69 
70  double fu;
71  double xmin,xmax;
72  double expo;
73 
74  double prob;
75  double intstep;
76 
77  double probmin,probmax;
78  double bestrm,bestpa;
79  double sigpa;
80 
81  std::vector<double> freqs;
82  std::vector<double> pas;
83  std::vector<double> errs;
84 
85 
86 };
87 
88 #endif
const ScalarMath pow(const ScalarMath &x, const ScalarMath &y)

Generated using doxygen 1.8.17