35 #ifndef __TWOPOINT2DCART__
36 #define __TWOPOINT2DCART__
192 void measureBootstrap (
const int nMocks,
const std::string dir_output_pairs=
par::defaultString,
const std::vector<std::string> dir_input_pairs={},
const std::string dir_output_resample=
par::defaultString,
const bool count_dd=
true,
const bool count_rr=
true,
const bool count_dr=
true,
const bool tcount=
true,
const Estimator estimator=
Estimator::_LandySzalay_,
const double fact=0.1,
const int seed=3213)
override;
241 TwoPointCorrelation2D_cartesian (
catalogue::Catalogue data,
catalogue::Catalogue random,
const BinType binType_rp,
const double rpMin,
const double rpMax,
const int nbins_rp,
const double shift_rp,
const BinType binType_pi,
const double piMin,
const double piMax,
const int nbins_pi,
const double shift_pi,
const CoordinateUnits angularUnits=
CoordinateUnits::_radians_, std::function<
double(
double)> angularWeight=
nullptr,
const bool compute_extra_info=
false,
const double random_dilution_fraction=1.)
243 {
m_twoPType =
TwoPType::_2D_Cartesian_;
set_parameters(binType_rp, rpMin, rpMax, nbins_rp, shift_rp, binType_pi, piMin, piMax, nbins_pi, shift_pi, angularUnits, angularWeight,
compute_extra_info); }
277 TwoPointCorrelation2D_cartesian (
catalogue::Catalogue data,
catalogue::Catalogue random,
const BinType binType_rp,
const double rpMin,
const double rpMax,
const double binSize_rp,
const double shift_rp,
const BinType binType_pi,
const double piMin,
const double piMax,
const double binSize_pi,
const double shift_pi,
const CoordinateUnits angularUnits=
CoordinateUnits::_radians_, std::function<
double(
double)> angularWeight=
nullptr,
const bool compute_extra_info=
false,
const double random_dilution_fraction=1.)
278 :
TwoPointCorrelation2D(
data,
random,
compute_extra_info,
random_dilution_fraction) {
m_twoPType =
TwoPType::_2D_Cartesian_;
set_parameters(binType_rp, rpMin, rpMax, binSize_rp, shift_rp, binType_pi, piMin, piMax, binSize_pi, shift_pi, angularUnits, angularWeight,
compute_extra_info); }
321 void set_parameters (
const BinType binType_rp,
const double rpMin,
const double rpMax,
const int nbins_rp,
const double shift_rp,
const BinType binType_pi,
const double piMin,
const double piMax,
const int nbins_pi,
const double shift_pi,
const CoordinateUnits angularUnits=
CoordinateUnits::_radians_, std::function<
double(
double)> angularWeight=
nullptr,
const bool compute_extra_info=
false);
348 void set_parameters (
const BinType binType_rp,
const double rpMin,
const double rpMax,
const double binSize_rp,
const double shift_rp,
const BinType binType_pi,
const double piMin,
const double piMax,
const double binSize_pi,
const double shift_pi,
const CoordinateUnits angularUnits=
CoordinateUnits::_radians_, std::function<
double(
double)> angularWeight=
nullptr,
const bool compute_extra_info=
false);
401 void measure (
const ErrorType errorType=
ErrorType::_Poisson_,
const std::string dir_output_pairs=
par::defaultString,
const std::vector<std::string> dir_input_pairs={},
const std::string dir_output_resample=
par::defaultString,
const int nMocks=0,
const bool count_dd=
true,
const bool count_rr=
true,
const bool count_dr=
true,
const bool tcount=
true,
const Estimator estimator=
Estimator::_LandySzalay_,
const double fact=0.1,
const int seed=3213)
override;
417 void read (
const std::string dir,
const std::string file)
override;
429 void write (
const std::string dir,
const std::string file,
const bool full,
const int rank=0)
const override;
439 {
write(dir, file,
true, rank); }
The class TwoPointCorrelation2D.
The class TwoPointCorrelation2D_cartesian.
void write_covariance(const std::string dir, const std::string file) const override
write the measured two-point correlation
void measureJackknife(const std::string dir_output_pairs=par::defaultString, const std::vector< std::string > dir_input_pairs={}, const std::string dir_output_resample=par::defaultString, const bool count_dd=true, const bool count_rr=true, const bool count_dr=true, const bool tcount=true, const Estimator estimator=Estimator::_LandySzalay_, const double fact=0.1) override
measure the 2D two-point correlation function in Cartesian coordinates, estimating the covariance wit...
void measurePoisson(const std::string dir_output_pairs=par::defaultString, const std::vector< std::string > dir_input_pairs={}, const bool count_dd=true, const bool count_rr=true, const bool count_dr=true, const bool tcount=true, const Estimator estimator=Estimator::_LandySzalay_, const double fact=0.1) override
measure the 2D two-point correlation function in Cartesian coordinates, with Poisson errors
TwoPointCorrelation2D_cartesian(catalogue::Catalogue data, catalogue::Catalogue random, const BinType binType_rp, const double rpMin, const double rpMax, const double binSize_rp, const double shift_rp, const BinType binType_pi, const double piMin, const double piMax, const double binSize_pi, const double shift_pi, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, std::function< double(double)> angularWeight=nullptr, const bool compute_extra_info=false, const double random_dilution_fraction=1.)
constructor
void read_covariance(const std::string dir, const std::string file) override
read the measured covariance matrix
void compute_covariance(const std::vector< std::string > file, const bool JK) override
compute the covariance matrix
void measure(const ErrorType errorType=ErrorType::_Poisson_, const std::string dir_output_pairs=par::defaultString, const std::vector< std::string > dir_input_pairs={}, const std::string dir_output_resample=par::defaultString, const int nMocks=0, const bool count_dd=true, const bool count_rr=true, const bool count_dr=true, const bool tcount=true, const Estimator estimator=Estimator::_LandySzalay_, const double fact=0.1, const int seed=3213) override
measure the 2D two-point correlation function in Cartesian coordinates
void compute_covariance(const std::vector< std::shared_ptr< data::Data >> xi, const bool JK) override
compute the covariance matrix
TwoPointCorrelation2D_cartesian(catalogue::Catalogue data, catalogue::Catalogue random, const BinType binType_rp, const double rpMin, const double rpMax, const int nbins_rp, const double shift_rp, const BinType binType_pi, const double piMin, const double piMax, const int nbins_pi, const double shift_pi, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, std::function< double(double)> angularWeight=nullptr, const bool compute_extra_info=false, const double random_dilution_fraction=1.)
constructor
void write(const std::string dir=par::defaultString, const std::string file=par::defaultString, const int rank=0) const override
write the 2D two-point correlation function
TwoPointCorrelation2D_cartesian()
default constructor 2D_cartesian
~TwoPointCorrelation2D_cartesian()=default
default destructor
void set_parameters(const BinType binType_rp, const double rpMin, const double rpMax, const int nbins_rp, const double shift_rp, const BinType binType_pi, const double piMin, const double piMax, const int nbins_pi, const double shift_pi, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, std::function< double(double)> angularWeight=nullptr, const bool compute_extra_info=false)
set the binning parameters
void write(const std::string dir, const std::string file, const bool full, const int rank=0) const override
write the 2D two-point correlation function
void read(const std::string dir, const std::string file) override
read the 2D two-point correlation function
void measureBootstrap(const int nMocks, const std::string dir_output_pairs=par::defaultString, const std::vector< std::string > dir_input_pairs={}, const std::string dir_output_resample=par::defaultString, const bool count_dd=true, const bool count_rr=true, const bool count_dr=true, const bool tcount=true, const Estimator estimator=Estimator::_LandySzalay_, const double fact=0.1, const int seed=3213) override
measure the 2D two-point correlation function in Cartesian coordinates, estimating the covariance wit...
The class TwoPointCorrelation2D.
std::shared_ptr< catalogue::Catalogue > random() const
get the protected member m_random
bool compute_extra_info() const
get the protected member m_compute_extra_info
bool random_dilution_fraction() const
get the protected member m_random_dilution_fraction
std::shared_ptr< catalogue::Catalogue > data() const
get the protected member m_data
TwoPType m_twoPType
two-point correlation function type
static const std::string defaultString
default std::string value
@ _workInProgress_
error due to work in progress
Estimator
the two-point correlation estimator
@ _LandySzalay_
Landy&Szalay estimator.
@ _2D_Cartesian_
2D two-point correlation function in Cartesian coordinates, ξ(rp,π)
ErrorType
the two-point correlation function error type
@ _Poisson_
Poissonian error.
The global namespace of the CosmoBolognaLib
int ErrorCBL(const std::string msg, const std::string functionCBL, const std::string fileCBL, const cbl::glob::ExitCode exitCode=cbl::glob::ExitCode::_error_)
throw an exception: it is used for handling exceptions inside the CosmoBolognaLib
CoordinateUnits
the coordinate units
@ _radians_
angle in radians