SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ModelFitting::LogChiSquareComparator Class Reference

Data vs model comparator which computes a modified \(\chi^2\) residual. More...

#include <LogChiSquareComparator.h>

Public Member Functions

 LogChiSquareComparator (double u0=10.)
 Creates a new LogChiSquareComparator instance with the given \(u_0\).
 
double operator() (double real, double model, double weight) const
 Returns the modified \(\chi^2\) residual.
 

Private Attributes

double m_u0
 

Detailed Description

Data vs model comparator which computes a modified \(\chi^2\) residual.

The \(\chi^2\) residual is modified to be more immune against occasionally large non-Gaussian deviations. It is computed as:

\[ g_{(u)} = \begin{cases} & u_0 * log\left( 1 + \dfrac{u}{u_0} \right) \text{ if } u \geqslant 0 \\ & -u_0 * log\left( 1 - \dfrac{u}{u_0} \right) \text{ if } u < 0 \end{cases} \]

where:

Definition at line 52 of file LogChiSquareComparator.h.

Constructor & Destructor Documentation

◆ LogChiSquareComparator()

ModelFitting::LogChiSquareComparator::LogChiSquareComparator ( double u0 = 10.)
inline

Creates a new LogChiSquareComparator instance with the given \(u_0\).

Definition at line 57 of file LogChiSquareComparator.h.

Member Function Documentation

◆ operator()()

double ModelFitting::LogChiSquareComparator::operator() ( double real,
double model,
double weight ) const
inline

Returns the modified \(\chi^2\) residual.

Definition at line 60 of file LogChiSquareComparator.h.

References std::log1p(), and m_u0.

Here is the call graph for this function:

Member Data Documentation

◆ m_u0

double ModelFitting::LogChiSquareComparator::m_u0
private

Definition at line 67 of file LogChiSquareComparator.h.

Referenced by operator()().


The documentation for this class was generated from the following file: