MINT2
|
#include <CyclicPhaseBins.h>
Public Member Functions | |
CyclicPhaseBins (std::vector< double > binEdges) | |
CyclicPhaseBins () | |
void | setUniformCiSiBins (int nBinPairs) |
void | setBinEdges (std::vector< double > binEdges) |
int | getBinNumber (double phase) const |
double | getLowBinBoundary (int bin) const |
double | getHighBinBoundary (int bin) const |
double | getLowBinBoundary (double phase) const |
double | getHighBinBoundary (double phase) const |
int | getNumBins () const |
~CyclicPhaseBins () | |
Private Attributes | |
std::vector< double > | _binEdges |
HyperPlot, Author: Sam Harnew, sam.h , Date: Dec 2015 arne w@gma il.c om
Dealing with cyclic bin boundaries is annoying. This class makes life easier.
Definition at line 20 of file CyclicPhaseBins.h.
CyclicPhaseBins::CyclicPhaseBins | ( | std::vector< double > | binEdges | ) |
Constuct a phase binning with the given bin edges. Since the binning is cyclic you only need nBins edges. The edges must be given in asending order, and within 2pi of each other
Definition at line 7 of file CyclicPhaseBins.cpp.
CyclicPhaseBins::CyclicPhaseBins | ( | ) |
CyclicPhaseBins::~CyclicPhaseBins | ( | ) |
int CyclicPhaseBins::getBinNumber | ( | double | phase | ) | const |
For a given phase, return the bin number. Note that the phase does not have to be mapped into any particular range i.e. [-pi, +pi]
Definition at line 26 of file CyclicPhaseBins.cpp.
double CyclicPhaseBins::getHighBinBoundary | ( | int | bin | ) | const |
Get the high bin edge for given bin number. This just uses the nmbers stored in _binEdges
Definition at line 73 of file CyclicPhaseBins.cpp.
double CyclicPhaseBins::getHighBinBoundary | ( | double | phase | ) | const |
Get the high bin edge for given phase. This appropriately maps the numbers stored in _binEdges so that the bin edge is below the phase given, but within 2pi
Definition at line 104 of file CyclicPhaseBins.cpp.
double CyclicPhaseBins::getLowBinBoundary | ( | int | bin | ) | const |
Get the low bin edge for given bin number. This just uses the nmbers stored in _binEdges
Definition at line 67 of file CyclicPhaseBins.cpp.
double CyclicPhaseBins::getLowBinBoundary | ( | double | phase | ) | const |
Get the low bin edge for given phase. This appropriately maps the numbers stored in _binEdges so that the bin edge is below the phase given, but within 2pi
Definition at line 87 of file CyclicPhaseBins.cpp.
int CyclicPhaseBins::getNumBins | ( | ) | const |
void CyclicPhaseBins::setBinEdges | ( | std::vector< double > | binEdges | ) |
void CyclicPhaseBins::setUniformCiSiBins | ( | int | nBinPairs | ) |
set nBinPairs*2 uniformly spaces bins between -pi and pi
Definition at line 52 of file CyclicPhaseBins.cpp.
|
private |
Definition at line 22 of file CyclicPhaseBins.h.