SourceXtractorPlusPlus
0.11
Please provide a description of the project.
|
#include <KappaSigmaBinning.h>
Classes | |
struct | Stats |
Public Member Functions | |
KappaSigmaBinning (float kappa1=2., float kappa2=5., size_t min_pixels=4, size_t max_size=4096) | |
template<typename Iterator > | |
void | computeBins (Iterator begin, Iterator end) |
ssize_t | getBinIndex (VarType value) const final |
VarType | getEdge (size_t e) const final |
VarType | getBin (size_t i) const final |
![]() | |
BinStrategy () | |
virtual | ~BinStrategy ()=default |
size_t | getBinCount () const |
virtual std::vector< VarType > | getEdges () const |
virtual std::pair< VarType, VarType > | getBinEdges (size_t i) const |
virtual VarType | getEdge (size_t e) const =0 |
virtual VarType | getBin (size_t i) const |
Private Member Functions | |
size_t | computeBinCount (size_t ndata) const |
Private Attributes | |
VarType | m_kappa |
VarType | m_kappa2 |
size_t | m_min_pixels |
size_t | m_max_size |
VarType | m_scale |
VarType | m_zero |
VarType | m_const |
Additional Inherited Members | |
![]() | |
size_t | m_nbins |
Functor that estimates the number of bins depending on the standard deviation of the data, applying two cuts to remain robuts to outliers.
On a first step, data that is outside \( \kappa_1 \sigma_{data} \pm \mu_{data} \) is filtered out, and the standard deviation and the mean of the remaining data points is re-computed.
The final histogram bins will cover the range \( \kappa_2 \sigma_{filtered} \pm \mu_{filtered} \). Anything outside will be dropped.
The number of bins is directly proportional to \( \kappa_2 \) and the number of data points, and limited to 4096 bins by default.
Definition at line 40 of file KappaSigmaBinning.h.
|
inline |
Constructor
kappa1 | Number of sigmas for the first data cut |
kappa2 | Number of sigmas for the histogram limits |
min_pixels | Minimum number of "mode pixels" |
max_size | Maximum number of bins |
Definition at line 53 of file KappaSigmaBinning.h.
|
inlineprivate |
Definition at line 129 of file KappaSigmaBinning.h.
References SourceXtractor::KappaSigmaBinning< VarType >::m_kappa2, SourceXtractor::KappaSigmaBinning< VarType >::m_min_pixels, std::min(), and std::sqrt().
Referenced by SourceXtractor::KappaSigmaBinning< VarType >::computeBins().
|
inline |
Get the list of bin edges for the given data points
Iterator | Iterator type as passed to Histogram |
begin | Beginning of the data |
end | End of the data |
Definition at line 69 of file KappaSigmaBinning.h.
References SourceXtractor::KappaSigmaBinning< VarType >::computeBinCount(), SourceXtractor::KappaSigmaBinning< VarType >::Stats::get(), SourceXtractor::KappaSigmaBinning< VarType >::m_const, SourceXtractor::KappaSigmaBinning< VarType >::m_kappa, SourceXtractor::KappaSigmaBinning< VarType >::m_kappa2, Euclid::Histogram::BinStrategy< VarType >::m_nbins, SourceXtractor::KappaSigmaBinning< VarType >::m_scale, SourceXtractor::KappaSigmaBinning< VarType >::m_zero, SourceXtractor::KappaSigmaBinning< VarType >::Stats::reset(), and std::tie().
|
inlinefinal |
Definition at line 119 of file KappaSigmaBinning.h.
References SourceXtractor::KappaSigmaBinning< VarType >::m_scale, and SourceXtractor::KappaSigmaBinning< VarType >::m_zero.
|
inlinefinalvirtual |
Implements Euclid::Histogram::BinStrategy< VarType >.
Definition at line 111 of file KappaSigmaBinning.h.
References SourceXtractor::KappaSigmaBinning< VarType >::m_const, and SourceXtractor::KappaSigmaBinning< VarType >::m_scale.
|
inlinefinal |
Definition at line 115 of file KappaSigmaBinning.h.
References e, SourceXtractor::KappaSigmaBinning< VarType >::m_scale, and SourceXtractor::KappaSigmaBinning< VarType >::m_zero.
|
private |
Definition at line 127 of file KappaSigmaBinning.h.
Referenced by SourceXtractor::KappaSigmaBinning< VarType >::computeBins(), and SourceXtractor::KappaSigmaBinning< VarType >::getBinIndex().
|
private |
Definition at line 124 of file KappaSigmaBinning.h.
Referenced by SourceXtractor::KappaSigmaBinning< VarType >::computeBins().
|
private |
Definition at line 124 of file KappaSigmaBinning.h.
Referenced by SourceXtractor::KappaSigmaBinning< VarType >::computeBinCount(), and SourceXtractor::KappaSigmaBinning< VarType >::computeBins().
|
private |
Definition at line 125 of file KappaSigmaBinning.h.
|
private |
Definition at line 125 of file KappaSigmaBinning.h.
Referenced by SourceXtractor::KappaSigmaBinning< VarType >::computeBinCount().
|
private |
Definition at line 127 of file KappaSigmaBinning.h.
Referenced by SourceXtractor::KappaSigmaBinning< VarType >::computeBins(), SourceXtractor::KappaSigmaBinning< VarType >::getBin(), SourceXtractor::KappaSigmaBinning< VarType >::getBinIndex(), and SourceXtractor::KappaSigmaBinning< VarType >::getEdge().
|
private |
Definition at line 127 of file KappaSigmaBinning.h.
Referenced by SourceXtractor::KappaSigmaBinning< VarType >::computeBins(), SourceXtractor::KappaSigmaBinning< VarType >::getBin(), and SourceXtractor::KappaSigmaBinning< VarType >::getEdge().