CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
TwoPointCorrelation1D_angular.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2010 by Federico Marulli and Alfonso Veropalumbo *
3  * federico.marulli3@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ********************************************************************/
20 
35 #ifndef __TWOPOINTANG__
36 #define __TWOPOINTANG__
37 
38 
39 #include "TwoPointCorrelation1D.h"
40 
41 
42 // ===================================================================================================
43 
44 
45 namespace cbl {
46 
47  namespace measure {
48 
49  namespace twopt {
50 
68 
69  protected:
70 
105  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;
106 
146  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;
147 
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;
193 
194  public:
195 
200 
206 
231  TwoPointCorrelation1D_angular (const catalogue::Catalogue data, const catalogue::Catalogue random, const BinType binType, const double thetaMin, const double thetaMax, const int nbins, const double shift, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, std::function<double(double)> angularWeight=nullptr, const bool compute_extra_info=false, const double random_dilution_fraction=1.)
233  { m_twoPType = TwoPType::_angular_; set_parameters(binType, thetaMin, thetaMax, nbins, shift, angularUnits, angularWeight, compute_extra_info); }
234 
259  TwoPointCorrelation1D_angular (const catalogue::Catalogue data, const catalogue::Catalogue random, const BinType binType, const double thetaMin, const double thetaMax, const double binSize, const double shift, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, std::function<double(double)> angularWeight=nullptr, const bool compute_extra_info=false, const double random_dilution_fraction=1.)
261  { m_twoPType = TwoPType::_angular_; set_parameters(binType, thetaMin, thetaMax, binSize, shift, angularUnits, angularWeight, compute_extra_info); }
262 
268 
270 
271 
276 
294  void set_parameters (const BinType binType, const double thetaMin, const double thetaMax, const int nbins, const double shift, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, std::function<double(double)> angularWeight=nullptr, const bool compute_extra_info=false);
295 
313  void set_parameters (const BinType binType, const double thetaMin, const double thetaMax, const double binSize, const double shift, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, std::function<double(double)> angularWeight=nullptr, const bool compute_extra_info=false);
314 
316 
317 
322 
366  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;
367 
369 
370 
375 
382  void read (const std::string dir, const std::string file) override;
383 
391  void write (const std::string dir=par::defaultString, const std::string file=par::defaultString, const int rank=0) const override;
392 
394 
395  };
396  }
397  }
398 }
399 
400 #endif
The class TwoPointCorrelation1D.
The class Catalogue.
Definition: Catalogue.h:654
TwoPointCorrelation1D_angular(const catalogue::Catalogue data, const catalogue::Catalogue random, const BinType binType, const double thetaMin, const double thetaMax, const int nbins, const double shift, 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 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 angular two-point correlation function estimating the covariance with Bootstrap resamplin...
~TwoPointCorrelation1D_angular()=default
default destructor
TwoPointCorrelation1D_angular(const catalogue::Catalogue data, const catalogue::Catalogue random, const BinType binType, const double thetaMin, const double thetaMax, const double binSize, const double shift, 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 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 angular two-point correlation function with Poisson errors
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 angular two-point correlation function estimating the covariance with Jackknife resamplin...
void read(const std::string dir, const std::string file) override
read the angular two-point correlation function
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 angular two-point correlation function
void set_parameters(const BinType binType, const double thetaMin, const double thetaMax, const int nbins, const double shift, 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=par::defaultString, const std::string file=par::defaultString, const int rank=0) const override
write the angular two-point correlation function
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
Definition: Constants.h:336
Estimator
the two-point correlation estimator
@ _LandySzalay_
Landy&Szalay estimator.
@ _angular_
angular two-point correlation function
ErrorType
the two-point correlation function error type
Definition: Measure.h:59
@ _Poisson_
Poissonian error.
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38
CoordinateUnits
the coordinate units
Definition: Kernel.h:562
@ _radians_
angle in radians
BinType
the binning type
Definition: Kernel.h:505