30 #ifndef __POWSPECTRUMANG__
31 #define __POWSPECTRUMANG__
63 void read_mixing_matrix (
const std::string dir,
const std::string file, std::vector<double> &ll, std::vector<std::vector<double>> &matrix);
97 std::vector<double>
m_w;
139 std::vector<std::vector<double>>
m_RR;
223 std::vector<double>
m_error (
const BinType binType, std::vector<double> w_err);
254 void m_read_angular_mask (
const std::string mask_file, std::string mask_type,
double pixel_area,
int n_lines_header=1);
303 PowerSpectrum_angular (
const catalogue::Catalogue data,
const catalogue::Catalogue random,
const double l_min,
const double l_max,
const int Nl,
const BinType binType,
const double thetaMin,
const double thetaMax,
const int nbins,
const double shift,
const CoordinateUnits angularUnits,
const BinType correlation_binType);
336 PowerSpectrum_angular (
const catalogue::Catalogue data,
const double l_min,
const double l_max,
const int bandwidth=1,
const std::string mask_file=
"",
const std::string mask_type=
"",
const double pixel_area=0,
const int n_lines_header=1);
433 std::vector<double>
Wl () {
return m_Wl; }
445 std::vector<double>
l () {
return m_l; }
482 void write (
const std::string dir,
const std::string file);
492 void write_average (
const std::string dir,
const std::string file);
504 void write_mixing_matrix (
const std::string dir,
const std::string file,
bool store_window=
false);
522 void read (
const std::string dir,
const std::string file,
const std::vector<int> column_x={1},
const std::vector<int> column_y={2},
const std::vector<int> column_error={3},
const int n_lines_header=1);
The class TwoPointCorrelation1D_angular.
The class PowerSpectrum_angular.
std::vector< double > theta()
get the private member m_theta
cbl::CoordinateUnits m_angularUnits
the coordinate units of the correlation function (if computed with cbl)
std::shared_ptr< catalogue::Catalogue > m_catalogue
variable that store the constructor for the catalogue
std::vector< std::vector< double > > m_RR
the mixing matrix
double m_l_min
the minimum multipole
void compute_mixing_matrix(std::string dir_window_input="", std::string file_window_input="")
compute the mixing matrix
void write_average(const std::string dir, const std::string file)
write the angular power spectrum on file
std::string m_file_correlation_output
the file to write w (if computed with cbl)
std::vector< double > m_RA_mask_min
vector containing the min RA vector of the mask
void read(const std::string dir, const std::string file, const std::vector< int > column_x={1}, const std::vector< int > column_y={2}, const std::vector< int > column_error={3}, const int n_lines_header=1)
read data from file
std::vector< double > m_w
vector containing the angular correlation function
std::vector< double > m_y_err
vector containing the y errors read from file
double m_nbins
the number of multipoles at which the angular power spectrum is computed
cbl::BinType m_binType
the bin type of the correlation function (if computed with cbl)
void m_averagePowerSpectrum()
compute the average of the power spectrum
std::shared_ptr< twopt::TwoPointCorrelation1D_angular > m_TwoPointCorrelation1D_angular
variable that store the constructor for the measure of angular correlation function
std::vector< double > m_RA_mask_max
vector containing the max RA vector of the mask
std::vector< double > m_l
vector containing the multipoles at which power spectrum is computed
std::vector< double > AngularPowerSpectrum()
get the private member AngularPowerSpectrum
double m_Nl
the number of multipoles at which the angular power spectrum is computed
void set_l_output(const BinType binType)
generate vector which contains the multipoles at which the angular power spectrum is computed
std::vector< double > m_RA_mask
vector containing the RA vector of the mask
std::string m_dir_correlation_output
the directory to write w (if computed with cbl)
~PowerSpectrum_angular()=default
default destructor
std::vector< double > m_w_err
vector containing the angular correlation function error
PowerSpectrum_angular()=default
default constructor Power_spectrum_angular
std::vector< double > m_l_av
vector containing the average of the multipoles
void measureFast(const std::string dir_correlation_input="", const std::string file_correlation_input="", const int n_lines_header=1, CoordinateUnits inputUnits=CoordinateUnits::_arcminutes_, BinType input_binType=BinType::_logarithmic_, cbl::measure::ErrorType errorType=ErrorType::_Poisson_, const std::string dir_correlation_output=par::defaultString, const std::string file_correlation_output="xi_angular.dat", const int nMocks=0)
measure the angular power spectrum with fast estimator
std::vector< double > m_theta_mask_min
vector containing the min colatitude vector of the mask
std::string m_dir_correlation_input
the directory to read w
std::vector< double > m_AngularPowerSpectrum
vector containing the angular power spectrum
double m_pixel_area
pixel area
int m_n_lines_header
the header lines to skip
std::vector< double > m_theta
vector containing the angular separation
void measureSphericalArmonic()
measure the angular power spectrum with spherical armonic estimator
std::vector< double > m_error(const BinType binType, std::vector< double > w_err)
measure the angular power spectrum errors
void write(const std::string dir, const std::string file)
write the angular power spectrum on file
std::vector< double > m_y
vector containing the y coordinate read from file
std::vector< double > m_AngularPowerSpectrum_av
vector containing the angular power spectrum average
cbl::CoordinateUnits m_inputUnits
the coordinate units of the input file
double m_dtheta_theta(const BinType binType, int i)
compute the dtheta*theta for the integral
double m_l_max
the maximum multipole
double m_survey_area
the survey area
std::vector< double > m_theta_mask_max
vector containing the max colatitude vector of the mask
std::vector< double > m_Wl
vector containing the angular power spectrum of the window function
std::vector< double > m_x
vector containing the x coordinate read from file
std::vector< double > Wl()
get the private member Wl
void measure(const AngularEstimator estimator=AngularEstimator::_Fast_, const std::string dir_correlation_input="", const std::string file_correlation_input="", const int n_lines_header=1, CoordinateUnits inputUnits=CoordinateUnits::_arcminutes_, BinType input_binType=BinType::_logarithmic_, cbl::measure::ErrorType errorType=ErrorType::_Poisson_, const std::string dir_correlation_output=par::defaultString, const std::string file_correlation_output="xi_angular.dat", const int nMocks=0)
measure the angular power spectrum
void write_mixing_matrix(const std::string dir, const std::string file, bool store_window=false)
write the angular power spectrum on file
std::string m_file_correlation_input
the file to read w
void m_convert_angular_units(cbl::CoordinateUnits inputUnits)
converts the input angle in radians
double angular_mask(double theta, double RA)
include the binary angular mask
std::vector< double > l()
get the private member m_l
void m_read_angular_mask(const std::string mask_file, std::string mask_type, double pixel_area, int n_lines_header=1)
read the angular mask from file
std::vector< double > m_theta_mask
vector containing the colatitude vector of the mask
void set_catalogue(cbl::catalogue::Catalogue catalogue)
set the catalogue for Spherical armonic estimator
static const std::string defaultString
default std::string value
void read_mixing_matrix(const std::string dir, const std::string file, std::vector< double > &ll, std::vector< std::vector< double >> &matrix)
read mixing matrix from file
AngularEstimator
the angular two-point correlation estimator type
@ _Fast_
the fast estimator
@ _SphericalArmonic_
the spherical armonic estimator
ErrorType
the two-point correlation function error type
@ _Poisson_
Poissonian error.
The global namespace of the CosmoBolognaLib
CoordinateUnits
the coordinate units
@ _arcminutes_
angle in arcminutes
@ _logarithmic_
logarithmic binning