SourceXtractorPlusPlus  0.8
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
29 namespace ModelFitting {
30 
40 
41 public:
42 
43  AsinhChiSquareComparator(double u0=10) : m_u0{u0} { }
44 
46  double operator()(double real, double model, double weight) const {
47  double val = weight * (real - model) / m_u0;
48  return m_u0 * std::asinh(val);
49  }
50 
51 private:
52 
53  double m_u0;
54 
55 }; // end of class AsinhChiSquareComparator
56 
57 } // end of namespace ModelFitting
58 
59 #endif /* _MODELFITTING_ENGINE_ASINHCHISQUARECOMPARATOR_H_ */
Data vs model comparator which computes a modified residual, using asinh.
T asinh(T...args)
double operator()(double real, double model, double weight) const
Returns the modified residual.