|
FML
|
Class for holding the results after binning up a power-spectrum. More...
#include <PowerSpectrumBinning.h>
Public Types | |
| enum | BinningType { LINEAR_SPACING , LOG_SPACING } |
Public Member Functions | |
| PowerSpectrumBinning ()=default | |
| PowerSpectrumBinning (int n) | |
| PowerSpectrumBinning (double kmin, double kmax, int n, int bin_type) | |
| PowerSpectrumBinning & | operator+= (const PowerSpectrumBinning &rhs) |
| Add two binnings together. | |
| void | reset () |
| Reset everything. Call before starting to bim. | |
| void | scale (const double boxsize) |
| Scale to physical units: k *= 1/Box and pofk *= Box^N. | |
| void | info () |
| Print some info. | |
| void | combine (PowerSpectrumBinning &rhs) |
| Combine with another binning (just for testing to make it easier to bin up over realisations) | |
| void | add_to_bin (double kvalue, double power, double weight=1.0) |
| Add a new point to a bin. | |
| void | normalize () |
| Normalize (i.e. find mean in each bin) Do summation over MPI tasks. | |
| int | get_bin_index (double kvalue, double kmin, double kmax, int n, int bin_type) |
| From k to the index of the bin. | |
| double | get_k_from_bin_index (int index, double kmin, double kmax, int n, int bin_type) |
| From index of the bin get k. | |
Data Fields | |
| int | n {0} |
| Number of bins. | |
| int | bin_type {LINEAR_SPACING} |
| Bin spacing (LINEAR_SPACING or LOG_SPACING) | |
| double | kmin {0.0} |
| The kmin value to bin from. | |
| double | kmax {0.0} |
| The kmax value to bin up to. | |
| bool | subtract_shotnoise {true} |
| Subtract shotnoise or not (used by algorithms) | |
| std::vector< double > | k |
| The bin edges. | |
| std::vector< double > | kbin |
| The mean k-value in the bin. | |
| std::vector< double > | count |
| The bin count. | |
| std::vector< double > | pofk |
| The power-spectrum in the bin. | |
| std::vector< std::vector< double > > | count_thread |
| std::vector< std::vector< double > > | pofk_thread |
| std::vector< std::vector< double > > | kbin_thread |
| int | nbinnings {0} |
Class for holding the results after binning up a power-spectrum.
This class is thread-safe, but cannot be created or normalized inside a OMP parallel region Summation over MPI tasks is done in normalize()
Definition at line 14 of file PowerSpectrumBinning.h.
| enum FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning::BinningType |
| Enumerator | |
|---|---|
| LINEAR_SPACING | |
| LOG_SPACING | |
Definition at line 16 of file PowerSpectrumBinning.h.
|
default |
| FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::PowerSpectrumBinning | ( | int | n | ) |
Definition at line 110 of file PowerSpectrumBinning.h.
| FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::PowerSpectrumBinning | ( | double | kmin, |
| double | kmax, | ||
| int | n, | ||
| int | bin_type ) |
Definition at line 114 of file PowerSpectrumBinning.h.
| void FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::add_to_bin | ( | double | kvalue, |
| double | power, | ||
| double | weight = 1.0 ) |
Add a new point to a bin.
Definition at line 152 of file PowerSpectrumBinning.h.
| void FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::combine | ( | PowerSpectrumBinning< N > & | rhs | ) |
Combine with another binning (just for testing to make it easier to bin up over realisations)
Definition at line 79 of file PowerSpectrumBinning.h.
| int FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::get_bin_index | ( | double | kvalue, |
| double | kmin, | ||
| double | kmax, | ||
| int | n, | ||
| int | bin_type ) |
From k to the index of the bin.
Definition at line 228 of file PowerSpectrumBinning.h.
| double FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::get_k_from_bin_index | ( | int | index, |
| double | kmin, | ||
| double | kmax, | ||
| int | n, | ||
| int | bin_type ) |
From index of the bin get k.
Definition at line 243 of file PowerSpectrumBinning.h.
| void FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::info | ( | ) |
Print some info.
Definition at line 136 of file PowerSpectrumBinning.h.
| void FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::normalize | ( | ) |
Normalize (i.e. find mean in each bin) Do summation over MPI tasks.
Definition at line 189 of file PowerSpectrumBinning.h.
| PowerSpectrumBinning< N > & FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::operator+= | ( | const PowerSpectrumBinning< N > & | rhs | ) |
Add two binnings together.
Definition at line 93 of file PowerSpectrumBinning.h.
| void FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::reset | ( | ) |
Reset everything. Call before starting to bim.
Definition at line 175 of file PowerSpectrumBinning.h.
| void FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::scale | ( | const double | boxsize | ) |
Scale to physical units: k *= 1/Box and pofk *= Box^N.
Definition at line 218 of file PowerSpectrumBinning.h.
| int FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::bin_type {LINEAR_SPACING} |
Bin spacing (LINEAR_SPACING or LOG_SPACING)
Definition at line 21 of file PowerSpectrumBinning.h.
| std::vector<double> FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::count |
The bin count.
Definition at line 34 of file PowerSpectrumBinning.h.
| std::vector<std::vector<double> > FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::count_thread |
Definition at line 40 of file PowerSpectrumBinning.h.
| std::vector<double> FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::k |
The bin edges.
Definition at line 30 of file PowerSpectrumBinning.h.
| std::vector<double> FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::kbin |
The mean k-value in the bin.
Definition at line 32 of file PowerSpectrumBinning.h.
| std::vector<std::vector<double> > FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::kbin_thread |
Definition at line 42 of file PowerSpectrumBinning.h.
| double FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::kmax {0.0} |
| double FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::kmin {0.0} |
| int FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::n {0} |
| int FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::nbinnings {0} |
Definition at line 63 of file PowerSpectrumBinning.h.
| std::vector<double> FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::pofk |
The power-spectrum in the bin.
Definition at line 36 of file PowerSpectrumBinning.h.
| std::vector<std::vector<double> > FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::pofk_thread |
Definition at line 41 of file PowerSpectrumBinning.h.
| bool FML::CORRELATIONFUNCTIONS::PowerSpectrumBinning< N >::subtract_shotnoise {true} |
Subtract shotnoise or not (used by algorithms)
Definition at line 27 of file PowerSpectrumBinning.h.