CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::lognormal::LogNormalFull Class Reference

The class LogNormalFull. More...

#include <LogNormalFull.h>

Public Member Functions

 LogNormalFull ()=default
 default constructor
 
 LogNormalFull (const cosmology::Cosmology cosmology, const double redshift_min=0., const double redshift_max=10., const int n_redshift_bins=500, const std::string author="CAMB")
 constructor More...
 
 LogNormalFull (const double rmin, const double xMin, const double xMax, const double yMin, const double yMax, const double zMin, const double zMax, const cosmology::Cosmology cosmology, const double redshift_min=0., const double redshift_max=10., const int n_redshift_bins=500, const std::string author="CAMB")
 constructor More...
 
 LogNormalFull (const double rmin, const std::vector< std::shared_ptr< catalogue::Catalogue >> random, const double pad, const cosmology::Cosmology cosmology, const double redshift_min=0., const double redshift_max=10., const int n_redshift_bins=500, const std::string author="CAMB")
 constructor More...
 
 ~LogNormalFull ()=default
 default destructor
 
void set_cosmo_function (const cosmology::Cosmology cosmology, const double redshift_min=0., const double redshift_max=10., const int n_redshift_bins=500, const std::string author="CAMB")
 set cosmological functions More...
 
void set_grid_parameters (const double rmin, const double xMin, const double xMax, const double yMin, const double yMax, const double zMin, const double zMax)
 set grid parameters More...
 
void set_grid_parameters (const double rmin, const std::vector< std::shared_ptr< catalogue::Catalogue >> random, const double pad)
 set grid parameters More...
 
void generate_lognormal (const int start, const int stop, const bool doRSD, const double smoothing_radius, const std::vector< double > nObjects, const std::vector< std::vector< double >> redshift, const std::vector< std::vector< double > > bias, const std::string dir, const std::string filename, const int seed, const bool set_fields=true, const bool use_random=true)
 generate lognormal realizations More...
 

Protected Member Functions

void m_set_grid_parameters ()
 set the grid parameters
 
void m_set_fields (const bool use_random, const bool doRSD)
 set the fields More...
 
void m_reset_fields (const bool use_random, const bool doRSD)
 reset the fields More...
 
void m_set_clustering_signal ()
 set the target dark matter clustering signal
 
void m_set_density_field (const double smoothing_radius)
 set the density field More...
 
void m_set_potential ()
 set the gravitational potential field
 
void m_set_radial_velocity ()
 set the radial velocity field
 
void m_set_visibility ()
 set the visibility
 
void m_set_visibility_from_random ()
 set the visibility from random catalogue
 
void m_set_visibility_from_random_RSD ()
 set the visibility for redshift space mocks
 
void m_extract_points_lognormal_field (const double nObjects, const bool doRSD, const std::vector< double > redshift, const std::vector< double > bias, const std::shared_ptr< data::Field3D > visibility, const std::string file_out)
 extract points from lognormal density fields More...
 

Protected Attributes

std::vector< std::shared_ptr< catalogue::Catalogue > > m_data
 pointer to the input datasets
 
std::vector< std::shared_ptr< catalogue::Catalogue > > m_random
 pointer to the random catalogues
 
std::shared_ptr< cosmology::Cosmologym_cosmology
 pointer to the fiducial cosmology
 
std::string m_author
 std::string containing the author of the model power spectrum (i.e. the Boltzmann solver)
 
bool m_NL
 false \(\rightarrow\) compute the linear power spectrum; true \(\rightarrow\) compute the non-linear power spectrum
 
std::default_random_engine m_generator
 generator for random numbers
 
std::shared_ptr< data::Field3Dm_clustering_signal
 the clustering signal
 
double m_rmin
 approximate cell size of the density field
 
int m_nx
 the number of cells along x-axis
 
int m_ny
 the number of cells along y-axis
 
int m_nz
 the number of cells along z-axis
 
int m_nzF
 the number of cells along z-axis, Fourier space
 
double m_xMin
 the minimum x-value
 
double m_xMax
 the maximum x-value
 
double m_yMin
 the minimum y-value
 
double m_yMax
 the maximum y-value
 
double m_zMin
 the minimum z-value
 
double m_zMax
 the maximum z-value
 
int m_nCells_eff
 the effective cell numbers
 
int m_nLN
 the number of log-normal realizations to produce/read
 
double m_rsmooth
 smoothing radius
 
bool m_use_visibility
 1 \(\rightarrow\) use the visibility mask, 0 \(\rightarrow\) don't use the visibility mask
 
std::shared_ptr< data::Field3Dm_density
 vector containing pointers to the LogNormal realizations
 
std::shared_ptr< data::Field3Dm_densityG
 vector containing pointers to the LogNormal realizations
 
double m_sigma2G
 density field variance
 
std::shared_ptr< data::Field3Dm_rsd_displacement
 vector containing pointers to the LogNormal realizations
 
std::shared_ptr< data::Field3Dm_displacement
 vector containing pointers to the LogNormal realizations
 
std::shared_ptr< data::Field3Dm_potential
 vector containing pointers to the LogNormal realizations
 
std::shared_ptr< data::Field3Dm_velocity
 vector containing pointers to the LogNormal realizations
 
std::shared_ptr< data::Field3Dm_los_velocity
 vector containing pointers to the LogNormal realizations
 
std::shared_ptr< data::Field3Dm_visibility
 vector containing pointers to the LogNormal realizations
 
std::vector< std::shared_ptr< data::Field3D > > m_visibility_random
 vector containing pointers to the LogNormal realizations
 
std::vector< std::vector< std::shared_ptr< catalogue::Catalogue > > > m_LNCat
 vector containing pointers to the LogNormal realizations
 
std::shared_ptr< glob::FuncGridm_func_redshift
 interpolator for \(z(D_c)\)
 
std::shared_ptr< glob::FuncGridm_func_DC
 interpolator for \(D_c(z)\)
 
std::shared_ptr< glob::FuncGridm_func_HH
 interpolator for \(H(z)\)
 
std::vector< std::shared_ptr< glob::FuncGrid > > m_func_bias
 interpolator for \(b(z)\)
 
std::shared_ptr< glob::FuncGridm_func_growth_factor
 interpolator for \(g(z)\)
 
std::shared_ptr< glob::FuncGridm_func_growth_rate
 interpolator for \(f(z)\)
 
std::shared_ptr< glob::FuncGridm_func_pk
 interpolator for \(P(k)\)
 

Detailed Description

The class LogNormalFull.

"Headers/LogNormalFull.h"

This class is used to handle objects of type LogNormalFull . It is an improved version of the LogNormal class, aimed at providing log-normal mocks in redshift-space with reliable clustering multipoles. Still to be tested!

Definition at line 62 of file LogNormalFull.h.

Constructor & Destructor Documentation

◆ LogNormalFull() [1/3]

cbl::lognormal::LogNormalFull::LogNormalFull ( const cosmology::Cosmology  cosmology,
const double  redshift_min = 0.,
const double  redshift_max = 10.,
const int  n_redshift_bins = 500,
const std::string  author = "CAMB" 
)

constructor

Parameters
cosmologythe input cosmology
redshift_minthe minimum redshift
redshift_maxthe maximum redshift
n_redshift_binsthe number or redshift bins
authorthe linear power spectrum method

Definition at line 46 of file LogNormalFull.cpp.

◆ LogNormalFull() [2/3]

cbl::lognormal::LogNormalFull::LogNormalFull ( const double  rmin,
const double  xMin,
const double  xMax,
const double  yMin,
const double  yMax,
const double  zMin,
const double  zMax,
const cosmology::Cosmology  cosmology,
const double  redshift_min = 0.,
const double  redshift_max = 10.,
const int  n_redshift_bins = 500,
const std::string  author = "CAMB" 
)

constructor

Parameters
rmincell size
xMinthe minimum x-value
xMaxthe minimum x-value
yMinthe maximum y-value
yMaxthe maximum x-value
zMinthe minimum z-value
zMaxthe maximum z-value
cosmologythe input cosmology
redshift_minthe minimum redshift
redshift_maxthe maximum redshift
n_redshift_binsthe number or redshift bins
authorthe linear power spectrum

Definition at line 55 of file LogNormalFull.cpp.

◆ LogNormalFull() [3/3]

cbl::lognormal::LogNormalFull::LogNormalFull ( const double  rmin,
const std::vector< std::shared_ptr< catalogue::Catalogue >>  random,
const double  pad,
const cosmology::Cosmology  cosmology,
const double  redshift_min = 0.,
const double  redshift_max = 10.,
const int  n_redshift_bins = 500,
const std::string  author = "CAMB" 
)

constructor

Parameters
rmincell size
randomvector containing random samples
padthe size of padding area around grid
cosmologythe input cosmology
redshift_minthe minimum redshift
redshift_maxthe maximum redshift
n_redshift_binsthe number or redshift bins
authorthe linear power spectrum

Definition at line 66 of file LogNormalFull.cpp.

Member Function Documentation

◆ generate_lognormal()

void cbl::lognormal::LogNormalFull::generate_lognormal ( const int  start,
const int  stop,
const bool  doRSD,
const double  smoothing_radius,
const std::vector< double >  nObjects,
const std::vector< std::vector< double >>  redshift,
const std::vector< std::vector< double > >  bias,
const std::string  dir,
const std::string  filename,
const int  seed,
const bool  set_fields = true,
const bool  use_random = true 
)

generate lognormal realizations

Parameters
startindex of the first realization
stopindex of the last realization
doRSDtrue \(\rightarrow\) do redshift-space mocks, false \(\rightarrow\) do real-space mocks
smoothing_radiusthe smoothing radius
nObjectsnumber of generated points
redshiftvector containing the redshift
biasvector containing the bias in function of redshift
diroutput directory
filenameoutput filename
seedseed for random generator
set_fieldstrue \(\rightarrow\) set the fields, false \(\rightarrow\) don't set the fields
use_randomtrue \(\rightarrow\) use an input random catalogue for the visibility mask; false \(\rightarrow\) don't use random

Definition at line 619 of file LogNormalFull.cpp.

◆ m_extract_points_lognormal_field()

void cbl::lognormal::LogNormalFull::m_extract_points_lognormal_field ( const double  nObjects,
const bool  doRSD,
const std::vector< double >  redshift,
const std::vector< double >  bias,
const std::shared_ptr< data::Field3D visibility,
const std::string  file_out 
)
protected

extract points from lognormal density fields

Parameters
nObjectsnumber of generated points
doRSDtrue \(\rightarrow\)do redshift-space mocks, false \(\rightarrow\) do real-space mocks
redshiftvector containing the redshift
biasvector containing the bias in function of redshift
visibilitypointer to the visibility
file_outout file for the extracted sample

Definition at line 549 of file LogNormalFull.cpp.

◆ m_reset_fields()

void cbl::lognormal::LogNormalFull::m_reset_fields ( const bool  use_random,
const bool  doRSD 
)
protected

reset the fields

Parameters
use_randomtrue \(\rightarrow\) use an input random catalogue for visibility mask, false \(\rightarrow\) do not use random
doRSDtrue \(\rightarrow\)do redshift-space mocks, false \(\rightarrow\) do real-space mocks

Definition at line 213 of file LogNormalFull.cpp.

◆ m_set_density_field()

void cbl::lognormal::LogNormalFull::m_set_density_field ( const double  smoothing_radius)
protected

set the density field

Parameters
smoothing_radiusthe gaussian kernel size

Definition at line 291 of file LogNormalFull.cpp.

◆ m_set_fields()

void cbl::lognormal::LogNormalFull::m_set_fields ( const bool  use_random,
const bool  doRSD 
)
protected

set the fields

Parameters
use_randomtrue \(\rightarrow\) use an input random catalogue for the visibility mask; false \(\rightarrow\) do not use random
doRSDtrue \(\rightarrow\) construct redshift-space mocks; false \(\rightarrow\) construct real-space mocks

Definition at line 187 of file LogNormalFull.cpp.

◆ set_cosmo_function()

void cbl::lognormal::LogNormalFull::set_cosmo_function ( const cosmology::Cosmology  cosmology,
const double  redshift_min = 0.,
const double  redshift_max = 10.,
const int  n_redshift_bins = 500,
const std::string  author = "CAMB" 
)

set cosmological functions

Parameters
cosmologythe input cosmology
redshift_minthe minimum redshift
redshift_maxthe maximum redshift
n_redshift_binsthe number or redshift bins
authorthe linear power spectrum

Definition at line 77 of file LogNormalFull.cpp.

◆ set_grid_parameters() [1/2]

void cbl::lognormal::LogNormalFull::set_grid_parameters ( const double  rmin,
const double  xMin,
const double  xMax,
const double  yMin,
const double  yMax,
const double  zMin,
const double  zMax 
)

set grid parameters

Parameters
rmincell size
xMinthe minimum x-value
xMaxthe minimum x-value
yMinthe maximum y-value
yMaxthe maximum x-value
zMinthe minimum z-value
zMaxthe maximum z-value

Definition at line 135 of file LogNormalFull.cpp.

◆ set_grid_parameters() [2/2]

void cbl::lognormal::LogNormalFull::set_grid_parameters ( const double  rmin,
const std::vector< std::shared_ptr< catalogue::Catalogue >>  random,
const double  pad 
)

set grid parameters

Parameters
rmincell size
randomvector containing random samples
padthe size of padding area around grid

Definition at line 154 of file LogNormalFull.cpp.


The documentation for this class was generated from the following files: