![]() |
CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
|
The class NumberCounts. More...
#include <NumberCounts.h>
Public Member Functions | |
Constructors/destructors | |
NumberCounts ()=default | |
default constructor | |
virtual | ~NumberCounts ()=default |
default destructor | |
Member functions to set protected members | |
void | set_data (const catalogue::Catalogue data) |
add a data catalogue More... | |
Member functions to get protected members | |
std::shared_ptr< catalogue::Catalogue > | catalogue () |
function to get the protected member m_data More... | |
Member functions to measure the number counts | |
virtual void | measure (const ErrorType errorType=ErrorType::_Poisson_, const std::string dir_output_resample=par::defaultString, const int nResamplings=0, const int seed=3213, const bool conv=false, const double sigma=0.) |
measure the number counts More... | |
input/output member functions (customized in all the derived classes) | |
virtual void | write (const std::string dir=par::defaultString, const std::string file=par::defaultString, const int rank=0) const |
write the measured number counts More... | |
Member functions to estimate the errors and covariance matrices | |
virtual void | write_covariance (const std::string dir, const std::string file) const |
write the measured covariance matrix More... | |
virtual void | compute_covariance (const std::vector< std::shared_ptr< glob::Histogram >> histo, const bool JK) |
compute the covariance matrix More... | |
virtual std::shared_ptr< data::Data > | Gaussian_smoothing (const double sigma) |
apply a Gaussian filter to the distribution More... | |
Functions to get the private members of the class | |
std::shared_ptr< glob::Histogram > | histogram () |
return the binned counts More... | |
glob::HistogramType | HistogramType () |
return the type of histogram normalization More... | |
double | fact () |
return the normalization factor More... | |
![]() | |
Measure ()=default | |
default constructor | |
virtual | ~Measure ()=default |
default destructor | |
virtual std::shared_ptr< data::Data > | dataset () const |
get the protected member dataset More... | |
Protected Member Functions | |
Protected member functions to measure the number counts | |
virtual std::shared_ptr< data::Data > | m_measurePoisson () |
measure the number counts with Poisson errors More... | |
virtual std::shared_ptr< data::Data > | m_measureJackknife (const std::string dir_output_resample=par::defaultString) |
measure the number counts with Jackknife covariance matrix More... | |
virtual std::shared_ptr< data::Data > | m_measureBootstrap (const std::string dir_output_resample=par::defaultString, const int nResamplings=0, const int seed=3213) |
measure the number counts with Bootstrap covariance matrix More... | |
Protected Attributes | |
Input catalogue | |
std::shared_ptr< catalogue::Catalogue > | m_data |
input data catalogue | |
Binned data | |
glob::HistogramType | m_HistogramType |
the histogram type | |
double | m_fact |
the normalization factor | |
std::shared_ptr< glob::Histogram > | m_histogram |
number counts type | |
![]() | |
std::shared_ptr< data::Data > | m_dataset |
the dataset of the measure | |
The class NumberCounts.
"Headers/NumberCounts.h"
This is the base class used to measure the number counts
Definition at line 69 of file NumberCounts.h.
|
inline |
function to get the protected member m_data
Definition at line 193 of file NumberCounts.h.
|
inlinevirtual |
compute the covariance matrix
histo | vector containing the measures used to compute the covariance matrix |
JK | true → compute the jackknife covariance matrix; false compute the standard covariance matrix |
Reimplemented in cbl::measure::numbercounts::NumberCounts2D, and cbl::measure::numbercounts::NumberCounts1D.
Definition at line 261 of file NumberCounts.h.
|
inline |
return the normalization factor
Definition at line 301 of file NumberCounts.h.
|
inlinevirtual |
apply a Gaussian filter to the distribution
σ | of the Gaussian kernel |
Reimplemented in cbl::measure::numbercounts::NumberCounts2D, and cbl::measure::numbercounts::NumberCounts1D.
Definition at line 271 of file NumberCounts.h.
|
inline |
return the binned counts
Definition at line 286 of file NumberCounts.h.
|
inline |
return the type of histogram normalization
Definition at line 294 of file NumberCounts.h.
|
inlineprotectedvirtual |
measure the number counts with Bootstrap covariance matrix
dir_output_resample | output directory of the resampling correlation functions |
nResamplings | number of resampling used for bootstrap |
seed | the seed for random number generation |
Reimplemented in cbl::measure::numbercounts::NumberCounts2D, and cbl::measure::numbercounts::NumberCounts1D.
Definition at line 142 of file NumberCounts.h.
|
inlineprotectedvirtual |
measure the number counts with Jackknife covariance matrix
dir_output_resample | output directory of the resampling correlation functions |
Reimplemented in cbl::measure::numbercounts::NumberCounts2D, and cbl::measure::numbercounts::NumberCounts1D.
Definition at line 125 of file NumberCounts.h.
|
inlineprotectedvirtual |
measure the number counts with Poisson errors
Reimplemented in cbl::measure::numbercounts::NumberCounts2D, and cbl::measure::numbercounts::NumberCounts1D.
Definition at line 112 of file NumberCounts.h.
|
inlinevirtual |
measure the number counts
errorType | type of error |
dir_output_resample | output directory of the resampling correlation functions |
nResamplings | number of resampling used for bootstrap |
seed | the seed for random number generation |
conv | true → compute the Gaussian convolvolution of the distribution; false → do not convolve |
sigma | σ of the Gaussian kernel |
Reimplemented in cbl::measure::numbercounts::NumberCounts2D, and cbl::measure::numbercounts::NumberCounts1D.
Definition at line 218 of file NumberCounts.h.
|
inline |
add a data catalogue
data | object of class Catalogue |
Definition at line 179 of file NumberCounts.h.
|
inlinevirtual |
write the measured number counts
dir | output directory |
file | output file |
rank | cpu index (for mpi usage) |
Reimplemented in cbl::measure::numbercounts::NumberCounts2D, and cbl::measure::numbercounts::NumberCounts1D.
Definition at line 234 of file NumberCounts.h.
|
inlinevirtual |
write the measured covariance matrix
dir | output directory |
file | output file |
Reimplemented in cbl::measure::numbercounts::NumberCounts2D, and cbl::measure::numbercounts::NumberCounts1D.
Definition at line 251 of file NumberCounts.h.