SourceXtractorPlusPlus  0.11
Please provide a description of the project.
AsinhChiSquareComparator.h
Go to the documentation of this file.
1 
17 /*
18  * ASinhChiSquareComparator.h
19  *
20  * Created on: 2019 M04 30
21  * Author: mschefer
22  */
23 
24 #ifndef _MODELFITTING_ENGINE_ASINHCHISQUARECOMPARATOR_H_
25 #define _MODELFITTING_ENGINE_ASINHCHISQUARECOMPARATOR_H_
26 
27 #include <cstdlib>
28 #include <math.h>
29 
30 namespace ModelFitting {
31 
41 
42 public:
43 
44  AsinhChiSquareComparator(double u0=10) : m_u0{u0} { }
45 
47  double operator()(double real, double model, double weight) const {
48  float val = weight * (real - model) / m_u0;
49  return m_u0 * std::asinh(val);
50  }
51 
52 private:
53 
54  double m_u0;
55 
56 }; // end of class AsinhChiSquareComparator
57 
58 } // end of namespace ModelFitting
59 
60 #endif /* _MODELFITTING_ENGINE_ASINHCHISQUARECOMPARATOR_H_ */
ModelFitting::AsinhChiSquareComparator
Data vs model comparator which computes a modified residual, using asinh.
Definition: AsinhChiSquareComparator.h:40
std::asinh
T asinh(T... args)
ModelFitting::AsinhChiSquareComparator::operator()
double operator()(double real, double model, double weight) const
Returns the modified residual.
Definition: AsinhChiSquareComparator.h:47
ModelFitting::AsinhChiSquareComparator::AsinhChiSquareComparator
AsinhChiSquareComparator(double u0=10)
Definition: AsinhChiSquareComparator.h:44
ModelFitting
Definition: AsinhChiSquareComparator.h:30
ModelFitting::AsinhChiSquareComparator::m_u0
double m_u0
Definition: AsinhChiSquareComparator.h:54