35 #ifndef __STACKPROFILE__
36 #define __STACKPROFILE__
57 namespace stackprofile {
114 bool m_photzSelection (
const int i_clu,
const int i_gal,
const int clu_zbin);
138 void m_resize(
const double rad_min,
const double rad_max,
const int nRad,
const bool log_rad);
158 void m_add_galaxy(
const int i_gal,
const int clu_index,
const double coscludec,
const double clu_dist);
185 std::shared_ptr<data::Data>
m_make_bootstrap(
const std::vector<int> z_proxy_bin);
199 bool m_check_file(
const std::string checked_file,
const std::vector<int> z_proxy_bin);
209 void m_write(
const std::string output_dir,
const std::string output_file);
215 std::shared_ptr<cosmology::Cosmology>
m_cosm;
230 std::vector<std::function<bool(
const std::vector<bool>)>>
m_logicSel;
496 StackedDensityProfile (
cosmology::Cosmology cosm,
const catalogue::Catalogue gal_cat,
const catalogue::Catalogue clu_cat,
const double delta_redshift, std::vector<double> z_binEdges, std::vector<std::vector<double>> proxy_binEdges,
const double rad_min,
const double rad_max,
const int nRad,
const bool log_rad,
const double SN_min,
const double pix_size,
const std::vector<std::vector<double>> multiplicative_calibration_stats={},
const std::vector<std::vector<double>> multiplicative_calibration_zEdges={},
const double rad_alpha=1.,
const double obs_gamma=1.);
527 void set_colour_selection(
const std::string colour_space,
const int z_bin,
const double C1,
const double C2,
const double C3,
const double C4,
const double z_min);
550 void set_colour_selection(
const std::string colour_space,
const double C1,
const double C2,
const double C3,
const double C4,
const double z_min);
570 void set_zphot_selection(
const int z_bin,
const double deltaz,
const double zgal_min,
const double zgal_max,
const double ODDS_min);
588 void set_zphot_selection(
const double deltaz,
const double zgal_min,
const double zgal_max,
const double ODDS_min);
661 void measure(
const std::vector<int> z_proxy_bin,
const std::string output_dir,
const std::string output_file_root,
const ErrorType errorType=
ErrorType::_Bootstrap_,
const int n_resampling=10000,
const bool write_background=
false);
679 void write(
const std::string dir,
const std::string file);
The class StackedDensityProfile.
std::vector< std::vector< std::vector< double > > > m_stacked_deltasigma_err
error on the stacked surface density
bool m_colourSelection_gri(const int i_gal, const int clu_zbin)
colour selection function in the colour-colour space ( ) vs ( )
void set_logic_selection(const int z_bin, const std::string sel)
Set the logic operator linking redshift and colour selections in the i-th cluster redshift bin.
std::vector< double > m_z_binEdges
phot-z bin edges
void m_stacker()
perform the stacking
std::vector< std::vector< std::vector< std::vector< double > > > > m_single_deltasigma_x
cross surface density, stored for each single cluster
std::vector< std::vector< double > > m_z_sigma
error on the effective redshift linked to the stacked signal
double m_sigma_fac
constant factor for lensing quantities (c*c/(4piG) in M_sun/Mpc)
std::vector< double > m_deltasigmaSum
deltasigmaSum
std::vector< double > m_wetasquareSum
wetasquareSum
std::vector< double > m_deltasigma_t
tangential surface density
std::vector< std::vector< std::vector< double > > > m_stacked_rad_sigma_arr
stacked effective radii errors
std::vector< double > m_rad_arr
radius bin edges
std::vector< double > m_wSum
wSum
std::vector< std::vector< double > > m_proxy_sigma
error on the effective mass proxy linked to the stacked signal
std::vector< std::vector< std::string > > m_logic_sel_par
the logic selection linking redshift and colour selections
StackedDensityProfile()=default
default constructor
std::vector< bool > m_isSet_colourSel
vector for checking if the colour selection is set in all the z bins
std::vector< int > m_nPix
number of pixels in RA and Dec
void m_add_galaxy(const int i_gal, const int clu_index, const double coscludec, const double clu_dist)
add galaxies to profiles
std::vector< bool(StackedDensityProfile::*)(const int, const int, const int)> m_photzSel
vector of pointers to the photo-z selection functions
std::vector< std::vector< int > > m_background_idx_z
vector of indices of the background galaxies selected through the redshift selection
std::vector< std::vector< std::vector< std::vector< double > > > > m_deltasigma_cov_matr
Bootstrap covariance matrix for the stacked signal.
std::vector< std::vector< double > > m_zphot_sel_pars
the parameters for the redshift selection
bool m_write_background
if true, create the folder containing the background galaxies indices
void m_profile(const int clu_index)
compute a single cluster profile
double m_pix_size
pixel size (in deg)
void m_linked_list()
linked galaxy list
double m_delta_redshift
minimum interval between the cluster and the source redshifts
void m_resize(const double rad_min, const double rad_max, const int nRad, const bool log_rad)
resize the private member arrays
std::vector< std::string > m_inputs_to_str
vector of the inputs stored as strings
bool m_measure_is_read
bool stating if the measure is read from file
std::vector< std::vector< std::vector< double > > > m_stacked_deltasigma_t_err
tangential stacked surface density error
std::shared_ptr< catalogue::Catalogue > m_galData
input galaxy catalogue
std::vector< std::vector< double > > m_z_eff
effective redshift linked to the stacked signal
void set_colour_selection(const std::string colour_space, const int z_bin, const double C1, const double C2, const double C3, const double C4, const double z_min)
Set the colour selection in the i-th cluster redshift bin.
std::vector< std::vector< std::vector< double > > > m_stacked_deltasigma_x_err
cross stacked surface density error
double m_obs_gamma
gamma slope for lensing-weighted observables
std::vector< bool > m_isSet_logicSel
vector for checking if the logic selection linking colour and z selections is set in all the z bins
std::vector< std::vector< std::vector< std::vector< double > > > > m_single_deltasigma_err
error on the surface density, stored for each single cluster
std::vector< std::vector< std::vector< double > > > m_stacked_deltasigma_t
tangential stacked surface density
double m_SN_min
minimum signal-to-noise
double m_n_resampling
number of regions for the resampling
std::vector< std::vector< int > > m_last
a "last" for each pixel
std::shared_ptr< data::Data > m_make_bootstrap(const std::vector< int > z_proxy_bin)
bootstrap resampling to retrieve the covariance matrix of the stacked signal, providing the stacked p...
bool m_photzSelection(const int i_clu, const int i_gal, const int clu_zbin)
redshift selection function
bool m_check_file(const std::string checked_file, const std::vector< int > z_proxy_bin)
check if the results obtained from the stacking have already been written to a file
void measure(const std::vector< int > z_proxy_bin, const std::string output_dir, const std::string output_file_root, const ErrorType errorType=ErrorType::_Bootstrap_, const int n_resampling=10000, const bool write_background=false)
measure the stacked profiles in all the bins of redshift and mass proxy, providing in output the stac...
std::vector< std::vector< std::vector< double > > > m_stacked_deltasigma_x
cross stacked surface density
std::vector< double > m_wetaSum
wetaSum
void m_write(const std::string output_dir, const std::string output_file)
write the results obtained from the stacking on file
double m_rad_alpha
slope for the observable weighted mean
std::vector< double > m_deltasigma_x
cross surface density
void write(const std::string dir, const std::string file)
write on file the measure in a given bin of redshift and mass proxy
std::vector< std::vector< std::vector< std::vector< double > > > > m_single_deltasigma_t
tangential surface density, stored for each single cluster
std::vector< double > m_deltasigma_err
error on the surface density
std::vector< std::function< bool(const std::vector< bool >)> > m_logicSel
logic operator between colour and photo-z selection
std::vector< std::vector< std::vector< double > > > m_stacked_wetasquareSum
stacked wetasquareSum
void m_check_catalogue_variables()
check if all the necessary variables in the galaxy and cluster catalogues are set
std::vector< std::vector< std::vector< double > > > m_stacked_wetaSum
stacked wetaSum
double m_ra_start
starting RA
void set_zphot_selection(const int z_bin, const double deltaz, const double zgal_min, const double zgal_max, const double ODDS_min)
Set the redshift selection in the i-th cluster redshift bin.
std::vector< std::vector< double > > m_proxy_eff
effective mass proxy linked to the stacked signal
std::vector< double > m_rad_eff_arr
effective radii
std::vector< int > m_next
a "next" for each galaxy
std::vector< std::vector< double > > m_colour_sel_pars
the parameters for the colour selection
std::vector< std::vector< double > > m_m_calib
the multiplicative calibration bias mean and standard deviation in the z bins
virtual ~StackedDensityProfile()=default
default destructor
double m_dec_start
starting Dec
std::shared_ptr< catalogue::Catalogue > m_cluData
input cluster catalogue
std::vector< bool > m_isSet_photzSel
vector for checking if the photo-z selection is set in all the z bins
std::vector< std::vector< std::vector< int > > > m_stacked_ngal_arr
stacked number of galaxies for annulus
std::vector< double > m_rad_sigma_arr
effective radii errors
std::vector< std::vector< std::vector< double > > > m_stacked_rad_eff_arr
stacked effective radii
std::vector< std::vector< std::vector< double > > > m_stacked_deltasigmaSum
stacked deltasigmaSum
void m_set_multiplicative_calib()
set the multiplicative shear calibration, m
std::vector< std::vector< std::vector< double > > > m_stacked_deltasigma_wei
stacked deltasigma_wei
std::vector< std::vector< int > > m_first
a "first" for each pixel
std::vector< bool(StackedDensityProfile::*)(const int, const int)> m_colourSel
vector of pointers to the colour selection function s
std::vector< std::vector< int > > m_background_idx_colour
vector of indices of the background galaxies selected through the colour selection
std::vector< int > m_ngal_arr
number of galaxies for annulus
std::vector< std::vector< std::vector< double > > > m_stacked_wSum
stacked wSum
std::vector< std::vector< double > > m_proxy_binEdges
mass proxy bin edges
std::shared_ptr< cosmology::Cosmology > m_cosm
input cosmology
std::vector< std::vector< double > > m_nClu_inBin
number of clusters in a bin of z and mass proxy
std::vector< std::vector< std::vector< std::vector< int > > > > m_single_ngal_arr
number of galaxies for annulus for cluster
std::vector< std::vector< double > > m_m_calib_zEdges
the redshift edges within which the multiplicative calibration bias is evaluated
ErrorType
the two-point correlation function error type
@ _Bootstrap_
Bootstrap resampling.
The global namespace of the CosmoBolognaLib