SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
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 <cmath>
29
30namespace ModelFitting {
31
41
42public:
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
52private:
53
54 double m_u0;
55
56}; // end of class AsinhChiSquareComparator
57
58} // end of namespace ModelFitting
59
60#endif /* _MODELFITTING_ENGINE_ASINHCHISQUARECOMPARATOR_H_ */
T asinh(T... args)
double operator()(double real, double model, double weight) const
Returns the modified residual.