HyperPlot
v1
Bin and visualise multidimensional datasets
|
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.
#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 |
~CyclicPhaseBins () | |
Private Attributes | |
std::vector< double > | _binEdges |
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 | ( | ) |
Empty constuctor i.e. no bins
Definition at line 3 of file CyclicPhaseBins.cpp.
CyclicPhaseBins::~CyclicPhaseBins | ( | ) |
desctructor
Definition at line 121 of file CyclicPhaseBins.cpp.
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.
void CyclicPhaseBins::setBinEdges | ( | std::vector< double > | binEdges | ) |
Set the bin edges. See constuctor for details
Definition at line 63 of file CyclicPhaseBins.cpp.
void CyclicPhaseBins::setUniformCiSiBins | ( | int | nBinPairs | ) |
set nBinPairs*2 uniformly spaces bins between -pi and pi
Definition at line 52 of file CyclicPhaseBins.cpp.