Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Euclid::MathUtils::Chi2Distance Struct Reference

#include <Distances.h>

Static Public Member Functions

template<typename Scale , typename Iterator >
static auto distance (Scale scale, Iterator ref_begin, Iterator ref_end, Iterator target_begin) -> decltype(ref_begin->getFlux())
 
template<typename Iterator >
static auto guessScale (Iterator ref_begin, Iterator ref_end, Iterator target_begin) -> decltype(ref_begin->getFlux())
 
template<typename Scale , typename Iterator >
static auto daDistance (Scale scale, Iterator ref_begin, Iterator ref_end, Iterator target_begin) -> decltype(ref_begin->getFlux())
 

Detailed Description

Implement the distance (with scale factor), partial derivative of the distance wrt scale factor, and scale guessing for the χ^2 distance

Definition at line 31 of file Distances.h.

Member Function Documentation

◆ daDistance()

template<typename Scale , typename Iterator >
static auto Euclid::MathUtils::Chi2Distance::daDistance ( Scale  scale,
Iterator  ref_begin,
Iterator  ref_end,
Iterator  target_begin 
) -> decltype(ref_begin->getFlux())
inlinestatic

Implement the derivative of the chi2 distance

\[ \frac{\delta}{\delta a}\left[ \frac{(a f_{ref} - f_{target})^2}{(a e_{ref})^2 + e_{target}^2}\right] = \frac{2 *(a f_{ref} - f_{target}) (e_{ref}^2 a f_{target} + f_{ref} e_{target}^2)}{(e_{ref}^2 a^2 + e_{target}^2)^2} \]

Definition at line 89 of file Distances.h.

◆ distance()

template<typename Scale , typename Iterator >
static auto Euclid::MathUtils::Chi2Distance::distance ( Scale  scale,
Iterator  ref_begin,
Iterator  ref_end,
Iterator  target_begin 
) -> decltype(ref_begin->getFlux())
inlinestatic

χ^2 distance

Template Parameters
Scale
Iterator
Parameters
scale
ref_begin
ref_end
target_begin
Returns

Definition at line 44 of file Distances.h.

Referenced by Euclid::MathUtils::Likelihood::weight(), and Euclid::MathUtils::InverseChi2::weight().

◆ guessScale()

template<typename Iterator >
static auto Euclid::MathUtils::Chi2Distance::guessScale ( Iterator  ref_begin,
Iterator  ref_end,
Iterator  target_begin 
) -> decltype(ref_begin->getFlux())
inlinestatic

Guess the scale factor for the reference object

Template Parameters
Iterator
Parameters
ref_begin
ref_end
target_begin
Returns

Definition at line 70 of file Distances.h.


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