111 inline std::vector<std::string>
PairTypeNames () {
return {
"angular_lin",
"angular_log",
"comoving_lin",
"comoving_log",
"comoving_multipoles_lin",
"comoving_multipoles_log",
"comovingCartesian_linlin",
"comovingCartesian_linlog",
"comovingCartesian_loglin",
"comovingCartesian_loglog",
"comovingPolar_linlin",
"comovingPolar_linlog",
"comovingPolar_loglin",
"comovingPolar_loglog"}; }
133 inline std::vector<std::string>
PairInfoNames () {
return {
"standard",
"extra"}; }
282 static std::shared_ptr<Pair>
Create (
const PairType type,
const PairInfo info,
const double Min_D1,
const double Max_D1,
const int nbins_D1,
const double shift_D1,
const double Min_D2,
const double Max_D2,
const int nbins_D2,
const double shift_D2,
const CoordinateUnits angularUnits=
CoordinateUnits::_radians_,
FunctionDoubleDouble angularWeight=
nullptr);
316 static std::shared_ptr<Pair>
Create (
const PairType type,
const PairInfo info,
const double Min_D1,
const double Max_D1,
const double binSize_D1,
const double shift_D1,
const double Min_D2,
const double Max_D2,
const double binSize_D2,
const double shift_D2,
const CoordinateUnits angularUnits=
CoordinateUnits::_radians_,
FunctionDoubleDouble angularWeight=
nullptr);
361 virtual double scale (
const int i)
const
368 virtual std::vector<double>
scale ()
const
369 {
cbl::ErrorCBL(
"",
"scale",
"Pair.h"); std::vector<double> vv;
return vv; }
377 { (void)i;
cbl::ErrorCBL(
"",
"scale_mean",
"Pair.h");
return 0; }
384 {
cbl::ErrorCBL(
"",
"scale_mean",
"Pair.h"); std::vector<double> vv;
return vv; }
394 { (void)i;
cbl::ErrorCBL(
"",
"scale_S",
"Pair.h");
return 0; }
402 {
cbl::ErrorCBL(
"",
"scale_S",
"Pair.h"); std::vector<double> vv;
return vv; }
411 { (void)i;
cbl::ErrorCBL(
"",
"scale_sigma",
"Pair.h");
return 0; }
419 {
cbl::ErrorCBL(
"",
"scale_sigma",
"Pair.h"); std::vector<double> vv;
return vv; }
426 virtual double z_mean (
const int i)
const
427 { (void)i;
cbl::ErrorCBL(
"",
"z_mean",
"Pair.h");
return 0; }
433 virtual std::vector<double>
z_mean ()
const
434 {
cbl::ErrorCBL(
"",
"z_mean",
"Pair.h"); std::vector<double> vv;
return vv; }
443 virtual double z_S (
const int i)
const
451 virtual std::vector<double>
z_S ()
const
452 {
cbl::ErrorCBL(
"",
"z_S",
"Pair.h"); std::vector<double> vv;
return vv; }
461 { (void)i;
cbl::ErrorCBL(
"",
"z_sigma",
"Pair.h");
return 0; }
469 {
cbl::ErrorCBL(
"",
"z_sigma",
"Pair.h"); std::vector<double> vv;
return vv; }
476 virtual double PP1D (
const int i)
const
483 virtual std::vector<double>
PP1D ()
const
484 {
cbl::ErrorCBL(
"",
"PP1D",
"Pair.h"); std::vector<double> vv;
return vv; }
492 { (void)i;
cbl::ErrorCBL(
"",
"PP1D_weighted",
"Pair.h");
return 0; }
500 {
cbl::ErrorCBL(
"",
"PP1D_weighted",
"Pair.h"); std::vector<double> vv;
return vv; }
508 { (void)i;
cbl::ErrorCBL(
"",
"scale_D1",
"Pair.h");
return 0; }
516 {
cbl::ErrorCBL(
"",
"scale_D1",
"Pair.h"); std::vector<double> vv;
return vv; }
524 { (void)i;
cbl::ErrorCBL(
"",
"scale_D2",
"Pair.h");
return 0; }
532 {
cbl::ErrorCBL(
"",
"scale_D2",
"Pair.h"); std::vector<double> vv;
return vv; }
541 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"scale_D1_mean",
"Pair.h");
return 0; }
548 {
cbl::ErrorCBL(
"",
"scale_D1_mean",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
557 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"scale_D2_mean",
"Pair.h");
return 0; }
565 {
cbl::ErrorCBL(
"",
"scale_D2_mean",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
576 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"scale_D1_S",
"Pair.h");
return 0; }
585 {
cbl::ErrorCBL(
"",
"scale_D1_S",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
596 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"scale_D2_S",
"Pair.h");
return 0; }
605 {
cbl::ErrorCBL(
"",
"scale_D2_S",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
615 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"scale_D1_sigma",
"Pair.h");
return 0; }
623 {
cbl::ErrorCBL(
"",
"scale_D1_sigma",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
633 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"scale_D2_sigma",
"Pair.h");
return 0; }
641 {
cbl::ErrorCBL(
"",
"scale_D2_sigma",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
649 virtual double z_mean (
const int i,
const int j)
const
650 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"z_mean",
"Pair.h");
return 0; }
656 virtual std::vector<std::vector<double>>
z_mean2D ()
const
657 {
cbl::ErrorCBL(
"",
"z_mean",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
667 virtual double z_S (
const int i,
const int j)
const
668 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"z_S",
"Pair.h");
return 0; }
677 virtual double z_sigma (
const int i,
const int j)
const
678 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"z_sigma",
"Pair.h");
return 0; }
685 virtual std::vector<std::vector<double>>
z_sigma2D ()
const
686 {
cbl::ErrorCBL(
"",
"z_sigma2D",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
694 virtual double PP2D (
const int i,
const int j)
const
695 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"PP2D",
"Pair.h");
return 0;}
701 virtual std::vector<std::vector<double>>
PP2D ()
const
702 {
cbl::ErrorCBL(
"",
"PP2D",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
711 { (void)i; (void)j;
cbl::ErrorCBL(
"",
"PP2D_weighted",
"Pair.h");
return 0;}
719 {
cbl::ErrorCBL(
"",
"PP2D_weighted",
"Pair.h"); std::vector<std::vector<double>> vv;
return vv; }
852 virtual void set_PP1D (
const int i,
const double pp)
853 { (void)i; (void)pp;
cbl::ErrorCBL(
"",
"set_PP1D",
"Pair.h"); }
861 { (void)i; (void)pp;
cbl::ErrorCBL(
"",
"set_PP1D_weighted",
"Pair.h"); }
869 virtual void set_PP2D (
const int i,
const int j,
const double pp)
870 { (void)i; (void)j; (void)pp;
cbl::ErrorCBL(
"",
"set_PP2D",
"Pair.h"); }
879 { (void)i; (void)j; (void)pp;
cbl::ErrorCBL(
"",
"set_PP2D_weighted",
"Pair.h"); }
886 virtual void add_data1D (
const int i,
const std::vector<double> data)
887 { (void)i; (void)data;
cbl::ErrorCBL(
"",
"add_data1D",
"Pair.h"); }
895 virtual void add_data1D (
const int i,
const std::shared_ptr<pairs::Pair> pair,
const double ww=1.)
896 { (void)i; (void)pair; (void)ww;
cbl::ErrorCBL(
"",
"add_data1D",
"Pair.h"); }
904 virtual void add_data2D (
const int i,
const int j,
const std::vector<double> data)
905 { (void)i; (void)j; (void)data;
cbl::ErrorCBL(
"",
"add_data2D",
"Pair.h"); }
914 virtual void add_data2D (
const int i,
const int j,
const std::shared_ptr<pairs::Pair> pair,
const double ww=1.)
915 { (void)i; (void)j; (void)pair; (void)ww;
cbl::ErrorCBL(
"",
"add_data2D",
"Pair.h"); }
932 virtual void get (
const std::shared_ptr<catalogue::Object> obj1,
const std::shared_ptr<catalogue::Object> obj2,
int &kk,
double &wkk)
933 { (void)obj1; (void)obj2; (void)kk; (void)wkk;
cbl::ErrorCBL(
"",
"get",
"Pair.h"); }
943 virtual void get (
const std::shared_ptr<catalogue::Object> obj1,
const std::shared_ptr<catalogue::Object> obj2,
int &kk,
double &cosmu,
double &wkk)
944 { (void)obj1; (void)obj2; (void)kk; (void)cosmu; (void)wkk;
cbl::ErrorCBL(
"",
"get",
"Pair.h"); }
954 virtual void get (
const std::shared_ptr<catalogue::Object> obj1,
const std::shared_ptr<catalogue::Object> obj2,
int &ir,
int &jr,
double &ww)
955 { (void)obj1; (void)obj2; (void)ir; (void)jr; (void)ww;
cbl::ErrorCBL(
"",
"get",
"Pair.h"); }
963 virtual void set (
const int kk,
const double wkk,
const double weight=1)
964 { (void)kk; (void)wkk; (void)weight;
cbl::ErrorCBL(
"",
"get",
"Pair.h"); }
973 virtual void set (
const double cosmu,
const int kk,
const double wkk,
const double weight=1)
974 { (void)cosmu; (void)kk; (void)wkk; (void)weight;
cbl::ErrorCBL(
"",
"get",
"Pair.h"); }
983 virtual void set (
const int ir,
const int jr,
const double ww,
const double weight=1)
984 { (void)ir; (void)jr; (void)ww; (void)weight;
cbl::ErrorCBL(
"",
"get",
"Pair.h"); }
993 virtual void put (
const std::shared_ptr<catalogue::Object> obj1,
const std::shared_ptr<catalogue::Object> obj2) = 0;
1000 virtual void Sum (
const std::shared_ptr<Pair> pp,
const double ww=1) = 0;
Dim pairDim() const
get the dimension of the pair vectors
virtual int nbins_D1() const
get the member m_nbins_D1
virtual ~Pair()=default
default destructor
virtual double shift() const
get the member m_shift
FunctionDoubleDouble m_angularWeight
angular weight function
PairInfo m_pairInfo
pair info
virtual double sMax_D2() const
get the the minimum separation in the second dimension
virtual double PP1D(const int i) const
get the member m_PP1D[i]
PairType pairType() const
get the pair type
virtual std::vector< double > z_sigma() const
get the protected member Pair1D_extra::m_z_sigma
virtual double scale_D2(const int i) const
get the member m_scale_D2[i]
virtual double scale_D1(const int i) const
get the member m_scale_D1[i]
virtual void Sum(const std::shared_ptr< Pair > pp, const double ww=1)=0
sum the number of binned pairs
virtual std::vector< double > scale() const
get the member std::vector<double> m_scale
virtual void set_PP2D_weighted(const int i, const int j, const double pp)
set the member m_PP2D_weighted[i][j]
virtual double scale_D1_sigma(const int i, const int j) const
get the member m_scale_D1_sigma[i][j]
virtual double binSize_inv_D1() const
get the member m_binSize_inv_D1
virtual void add_data2D(const int i, const int j, const std::shared_ptr< pairs::Pair > pair, const double ww=1.)
set the protected members by adding new 2D data
virtual double scale_D2_sigma(const int i, const int j) const
get the member m_scale_D2[i][j]
virtual void add_data1D(const int i, const std::vector< double > data)
set the protected members by adding new 1D data
virtual int nbins_D2() const
get the member m_nbins_D2
virtual double shift_D2() const
get the member m_shift_D2
virtual void get(const std::shared_ptr< catalogue::Object > obj1, const std::shared_ptr< catalogue::Object > obj2, int &kk, double &wkk)
get the pair index and weight
virtual double scale_S(const int i) const
get the member m_scale_S[i]
virtual std::vector< std::vector< double > > PP2D() const
get the member std::vector<std::vector<double>> m_PP2D
virtual double scale(const int i) const
get the member m_scale[i]
PairInfo pairInfo() const
get the pair information type
virtual void set(const int kk, const double wkk, const double weight=1)
set the pair vector
virtual double scale_mean(const int i) const
get the member m_scale_mean[i]
virtual double z_mean(const int i) const
get the protected member Pair1D_extra::m_z_mean[i]
virtual std::vector< double > PP1D() const
get the member std::vector<double> m_PP1D
virtual double sMin_D2() const
get the minimum separation in the second dimension
virtual double binSize_inv() const
get the member m_binSize_inv
virtual std::vector< double > z_S() const
get the protected member Pair1D_extra::m_z_S
virtual void put(const std::shared_ptr< catalogue::Object > obj1, const std::shared_ptr< catalogue::Object > obj2)=0
estimate the distance between two objects and update the pair vector accordingly
virtual double z_mean(const int i, const int j) const
get the protected member m_z_mean[i][j]
virtual void set(const double cosmu, const int kk, const double wkk, const double weight=1)
set the pair vector
static std::shared_ptr< Pair > Create(const PairType type, const PairInfo info, const double Min, const double Max, const int nbins, const double shift, const CoordinateUnits angularUnits=CoordinateUnits::_radians_, FunctionDoubleDouble angularWeight=nullptr)
static factory used to construct pairs of any type
virtual std::vector< std::vector< double > > scale_D1_S() const
get the member std::vector<double> m_scale_D1
virtual double PP2D(const int i, const int j) const
get the member m_PP2D[i][j]
virtual double sMax_D1() const
get the the minimum separation in the first dimension
virtual std::vector< double > scale_D1() const
get the member std::vector<double> m_scale_D1
virtual std::vector< double > PP1D_weighted() const
get the member std::vector<double> m_PP1D_weighted
FunctionDoubleDouble angularWeight()
get the m_angularWeight function
virtual void set_PP2D(const int i, const int j, const double pp)
set the member m_PP2D[i][j]
virtual void get(const std::shared_ptr< catalogue::Object > obj1, const std::shared_ptr< catalogue::Object > obj2, int &kk, double &cosmu, double &wkk)
get the pair index and weight
virtual double z_sigma(const int i, const int j) const
get the member m_z_sigma[i][j]
virtual void m_set_parameters_binSize()=0
set the binning parameters given the bin size
virtual std::vector< double > scale_S() const
get the member std::vector<double> m_scale_S
virtual void get(const std::shared_ptr< catalogue::Object > obj1, const std::shared_ptr< catalogue::Object > obj2, int &ir, int &jr, double &ww)
get the pair index and weight
virtual double scale_D2_mean(const int i, const int j) const
get the protected member m_scale_D2[i][j]
virtual double sMin_D1() const
get the minimum separation in the first dimension
Pair()=default
default constuctor
virtual std::vector< std::vector< double > > z_mean2D() const
get the protected member m_z_mean
virtual double scale_D1_S(const int i, const int j) const
get the member m_scale_D1_S[i][j]
virtual void set(const int ir, const int jr, const double ww, const double weight=1)
set the pair vector
virtual std::vector< std::vector< double > > z_sigma2D() const
get the member std::vector<double> m_z_sigma
virtual double sMin() const
get the minimum separation
virtual std::vector< std::vector< double > > scale_D1_mean() const
get the protected member m_scale_D1
virtual void add_data1D(const int i, const std::shared_ptr< pairs::Pair > pair, const double ww=1.)
set the protected members by adding new 1D data
virtual std::vector< double > z_mean() const
get the protected member Pair1D_extra::m_z_mean
virtual double PP1D_weighted(const int i) const
get the member m_PP1D_weighted[i]
virtual double scale_D2_S(const int i, const int j) const
get the member m_scale_D2[i][j]
CoordinateUnits angularUnits()
get the angular units
virtual std::vector< double > scale_mean() const
get the member std::vector<double> m_scale_mean
virtual std::vector< std::vector< double > > PP2D_weighted() const
get the member std::vector<std::vector<double>> m_PP2D_weighted
virtual std::vector< double > scale_sigma() const
get the member std::vector<double> m_scale_sigma
virtual std::vector< std::vector< double > > scale_D2_S() const
get the member std::vector<double> m_scale_D2
virtual double shift_D1() const
get the member m_shift_D1
virtual double z_sigma(const int i) const
get the protected member Pair1D_extra::m_z_sigma[i]
PairType m_pairType
pair type
virtual void set_PP1D_weighted(const int i, const double pp)
set the member m_PP1D_weighted[i]
virtual void set_PP1D(const int i, const double pp)
set the member m_PP1D[i]
virtual int nbins() const
get the member m_nbins
CoordinateUnits m_angularUnits
angular units
virtual double binSize_inv_D2() const
get the member m_binSize_inv_D2
virtual std::vector< double > scale_D2() const
get the member std::vector<double> m_scale_D2
virtual void add_data2D(const int i, const int j, const std::vector< double > data)
set the protected members by adding new 2D data
virtual double PP2D_weighted(const int i, const int j) const
get the member m_PP2D_weighted[i][j]
virtual double scale_sigma(const int i) const
get the member m_scale_sigma[i]
virtual std::vector< std::vector< double > > scale_D1_sigma() const
get the member std::vector<double> m_scale_D1
virtual void m_set_parameters_nbins()=0
set the binning parameters given the number of bins
virtual double sMax() const
get the the minimum separation
virtual double scale_D1_mean(const int i, const int j) const
get the protected member m_scale_D1[i][j]
virtual void reset()=0
reset the pair counts
virtual std::vector< std::vector< double > > scale_D2_mean() const
get the protected member m_scale_D2
virtual std::vector< std::vector< double > > scale_D2_sigma() const
get the member std::vector<double> m_scale_D2
virtual double z_S(const int i, const int j) const
get the member m_z_sigma[i][j]
virtual double z_S(const int i) const
get the protected member Pair1D_extra::m_z_S[i]
Dim m_pairDim
pair dimension
@ _comovingCartesian_linlin_
2D pair in comoving Cartesian coordinates (rp, π) in linear-linear bins
@ _comovingPolar_loglog_
2D pair in comoving polar coordinates (r, μ) in logarithmic-logarithmic bins
@ _angular_lin_
1D pair in angular coordinates in linear bins
@ _comovingCartesian_loglog_
2D pair in comoving Cartesian coordinates (rp, π) in logarithmic-logarithmic bins
@ _angular_log_
1D pair in angular coordinates in logarithmic bins
@ _comovingPolar_loglin_
2D pair in comoving polar coordinates (r, μ) in logarithmic-linear bins
@ _comoving_multipoles_log_
1D pair in comoving coordinates in logarithmic bins, multipoles
@ _comovingCartesian_linlog_
2D pair in comoving Cartesian coordinates (rp, π) in linear-logarithmic bins
@ _comoving_multipoles_lin_
1D pair in comoving coordinates in linear bins, multipoles
@ _comovingPolar_linlin_
2D pair in comoving polar coordinates (r, μ) in linear-linear bins
@ _comoving_log_
1D pair in comoving coordinates in logarithmic bins
@ _comoving_lin_
1D pair in comoving coordinates in linear bins
@ _comovingCartesian_loglin_
2D pair in comoving Cartesian coordinates (rp, π) in logarithmic-linear bins
@ _comovingPolar_linlog_
2D pair in comoving polar coordinates (r, μ) in linear-logarithmic bins
std::vector< std::string > PairTypeNames()
return a vector containing the PairType names
std::vector< std::string > PairInfoNames()
return a vector containing the PairInfo names
PairInfo
the information contained in the pairs
@ _standard_
standard: the object contains only the number of pairs
@ _extra_
extra: the object contains the number of pairs plus extra information, such as the mean scale separat...
The global namespace of the CosmoBolognaLib
T Min(const std::vector< T > vect)
minimum element of a std::vector
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
T Max(const std::vector< T > vect)
maximum element of a std::vector
std::function< double(double)> FunctionDoubleDouble
typedef of a function returning a double with a double in input
CoordinateUnits
the coordinate units
@ _radians_
angle in radians
Dim
the dimension, used e.g. for pair and triplet vectors