35 #ifndef __TWOPOINTDEPROJ__
36 #define __TWOPOINTDEPROJ__
77 std::shared_ptr<data::Data>
Deprojected (
const std::vector<double> rp,
const std::vector<double> xi,
const std::vector<double> error_xi)
override;
198 void measureBootstrap (
const int nMocks,
const std::string dir_output_pairs,
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;
210 std::vector<std::shared_ptr<data::Data>>
XiJackknife (
const std::vector<std::shared_ptr<pairs::Pair>>
dd,
const std::vector<std::shared_ptr<pairs::Pair>>
rr)
override;
224 std::vector<std::shared_ptr<data::Data>>
XiJackknife (
const std::vector<std::shared_ptr<pairs::Pair>>
dd,
const std::vector<std::shared_ptr<pairs::Pair>>
rr,
const std::vector<std::shared_ptr<pairs::Pair>>
dr)
override;
241 std::vector<std::shared_ptr<data::Data>>
XiBootstrap (
const int nMocks,
const std::vector<std::shared_ptr<pairs::Pair>>
dd,
const std::vector<std::shared_ptr<pairs::Pair>>
rr,
const int seed=3213)
override;
260 std::vector<std::shared_ptr<data::Data>>
XiBootstrap (
const int nMocks,
const std::vector<std::shared_ptr<pairs::Pair>>
dd,
const std::vector<std::shared_ptr<pairs::Pair>>
rr,
const std::vector<std::shared_ptr<pairs::Pair>>
dr,
const int seed=3213)
override;
308 TwoPointCorrelation_deprojected (
catalogue::Catalogue data,
catalogue::Catalogue random,
const double rpMin,
const double rpMax,
const int nbins_rp,
const double shift_rp,
const double piMin,
const double piMax,
const int nbins_pi,
const double shift_pi,
const double piMax_integral,
const CoordinateUnits angularUnits=
CoordinateUnits::_radians_, std::function<
double(
double)> angularWeight=
nullptr,
const bool compute_extra_info=
false,
const double random_dilution_fraction=1.)
309 :
TwoPointCorrelation_projected(
data,
random,
BinType::
_logarithmic_, rpMin, rpMax, nbins_rp, shift_rp, piMin, piMax, nbins_pi, shift_pi, piMax_integral, angularUnits, angularWeight,
compute_extra_info,
random_dilution_fraction)
343 TwoPointCorrelation_deprojected (
catalogue::Catalogue data,
catalogue::Catalogue random,
const double rpMin,
const double rpMax,
const double binSize_rp,
const double shift_rp,
const double piMin,
const double piMax,
const double binSize_pi,
const double shift_pi,
const double piMax_integral,
const CoordinateUnits angularUnits=
CoordinateUnits::_radians_, std::function<
double(
double)> angularWeight=
nullptr,
const bool compute_extra_info=
false,
const double random_dilution_fraction=1.)
344 :
TwoPointCorrelation_projected(
data,
random,
BinType::
_logarithmic_, rpMin, rpMax, binSize_rp, shift_rp, piMin, piMax, binSize_pi, shift_pi, piMax_integral, angularUnits, angularWeight,
compute_extra_info,
random_dilution_fraction)
359 std::vector<double>
yy ()
const
360 {
cbl::ErrorCBL(
"",
"yy",
"TwoPointCorrelation_deprojected.h"); std::vector<double> vv;
return vv; }
366 std::vector<double>
xi1D ()
const
367 { std::vector<double> vv;
m_dataset->get_data(vv);
return vv; }
376 { std::vector<double> vv;
m_dataset->get_error(vv);
return vv; }
382 std::vector<std::vector<double>>
xi2D ()
const
383 {
cbl::ErrorCBL(
"",
"xi2D",
"TwoPointCorrelation_deprojected.h"); std::vector<std::vector<double>> vv;
return vv; }
391 std::vector<std::vector<double>>
error2D ()
const
392 {
cbl::ErrorCBL(
"",
"error2D",
"TwoPointCorrelation_deprojected.h"); std::vector<std::vector<double>> vv;
return vv; }
442 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;
458 void read (
const std::string dir,
const std::string file)
override;
The class TwoPointCorrelation_projected.
std::shared_ptr< data::Data > m_dataset
the dataset of the measure
The class TwoPointCorrelation_deprojected.
~TwoPointCorrelation_deprojected()=default
default destructor
TwoPointCorrelation_deprojected(catalogue::Catalogue data, catalogue::Catalogue random, const double rpMin, const double rpMax, const int nbins_rp, const double shift_rp, const double piMin, const double piMax, const int nbins_pi, const double shift_pi, const double piMax_integral, 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 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 deprojected two-point correlation function estimating the covariance with Jackknife resam...
std::vector< double > xi1D() const
get the the binned correlation function
virtual std::vector< double > error1D() const
get the error on the binned correlation function function
void read(const std::string dir, const std::string file) override
read the deprojected two-point correlation function
void write(const std::string dir=par::defaultString, const std::string file=par::defaultString, const int rank=0) const override
write the deprojected two-point correlation function
void measureBootstrap(const int nMocks, const std::string dir_output_pairs, 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 deprojected two-point correlation function estimating the covariance with Bootstrap resam...
TwoPointCorrelation_deprojected()
default constructor _deprojected
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 deprojected two-point correlation function with Poisson errors
TwoPointCorrelation_deprojected(catalogue::Catalogue data, catalogue::Catalogue random, const double rpMin, const double rpMax, const double binSize_rp, const double shift_rp, const double piMin, const double piMax, const double binSize_pi, const double shift_pi, const double piMax_integral, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, std::function< double(double)> angularWeight=nullptr, const bool compute_extra_info=false, const double random_dilution_fraction=1.)
constructor
std::vector< std::vector< double > > xi2D() const
get the the binned correlation function
std::vector< std::vector< double > > error2D() const
get the error on the binned correlation function function
std::vector< std::shared_ptr< data::Data > > XiBootstrap(const int nMocks, const std::vector< std::shared_ptr< pairs::Pair >> dd, const std::vector< std::shared_ptr< pairs::Pair >> rr, const int seed=3213) override
measure the bootstrap resampling of the two-point correlation function, ξ(r)
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 deprojected two-point correlation function
std::vector< double > yy() const
get the y coordinates
std::shared_ptr< data::Data > Deprojected(const std::vector< double > rp, const std::vector< double > xi, const std::vector< double > error_xi) override
measure deprojected correlation function
std::vector< std::shared_ptr< data::Data > > XiJackknife(const std::vector< std::shared_ptr< pairs::Pair >> dd, const std::vector< std::shared_ptr< pairs::Pair >> rr) override
measure the jackknife resampling of the two-point correlation function, ξ(r)
The class TwoPointCorrelation_projected.
std::shared_ptr< pairs::Pair > dr() const
get the protected member m_dr
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< pairs::Pair > rr() const
get the protected member m_rr
std::shared_ptr< pairs::Pair > dd() const
get the protected member m_dd
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
Estimator
the two-point correlation estimator
@ _LandySzalay_
Landy&Szalay estimator.
@ _deprojected_
the deprojected two-point correlation function, ξ(r)
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
@ _logarithmic_
logarithmic binning