![]() |
CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
|
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::Cosmology > | m_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::Field3D > | m_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::Field3D > | m_density |
| vector containing pointers to the LogNormal realizations | |
| std::shared_ptr< data::Field3D > | m_densityG |
| vector containing pointers to the LogNormal realizations | |
| double | m_sigma2G |
| density field variance | |
| std::shared_ptr< data::Field3D > | m_rsd_displacement |
| vector containing pointers to the LogNormal realizations | |
| std::shared_ptr< data::Field3D > | m_displacement |
| vector containing pointers to the LogNormal realizations | |
| std::shared_ptr< data::Field3D > | m_potential |
| vector containing pointers to the LogNormal realizations | |
| std::shared_ptr< data::Field3D > | m_velocity |
| vector containing pointers to the LogNormal realizations | |
| std::shared_ptr< data::Field3D > | m_los_velocity |
| vector containing pointers to the LogNormal realizations | |
| std::shared_ptr< data::Field3D > | m_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::FuncGrid > | m_func_redshift |
| interpolator for \(z(D_c)\) | |
| std::shared_ptr< glob::FuncGrid > | m_func_DC |
| interpolator for \(D_c(z)\) | |
| std::shared_ptr< glob::FuncGrid > | m_func_HH |
| interpolator for \(H(z)\) | |
| std::vector< std::shared_ptr< glob::FuncGrid > > | m_func_bias |
| interpolator for \(b(z)\) | |
| std::shared_ptr< glob::FuncGrid > | m_func_growth_factor |
| interpolator for \(g(z)\) | |
| std::shared_ptr< glob::FuncGrid > | m_func_growth_rate |
| interpolator for \(f(z)\) | |
| std::shared_ptr< glob::FuncGrid > | m_func_pk |
| interpolator for \(P(k)\) | |
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.
| 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
| cosmology | the input cosmology |
| redshift_min | the minimum redshift |
| redshift_max | the maximum redshift |
| n_redshift_bins | the number or redshift bins |
| author | the linear power spectrum method |
Definition at line 46 of file LogNormalFull.cpp.
| 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
| rmin | cell size |
| xMin | the minimum x-value |
| xMax | the minimum x-value |
| yMin | the maximum y-value |
| yMax | the maximum x-value |
| zMin | the minimum z-value |
| zMax | the maximum z-value |
| cosmology | the input cosmology |
| redshift_min | the minimum redshift |
| redshift_max | the maximum redshift |
| n_redshift_bins | the number or redshift bins |
| author | the linear power spectrum |
Definition at line 55 of file LogNormalFull.cpp.
| 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
| rmin | cell size |
| random | vector containing random samples |
| pad | the size of padding area around grid |
| cosmology | the input cosmology |
| redshift_min | the minimum redshift |
| redshift_max | the maximum redshift |
| n_redshift_bins | the number or redshift bins |
| author | the linear power spectrum |
Definition at line 66 of file LogNormalFull.cpp.
| 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
| start | index of the first realization |
| stop | index of the last realization |
| doRSD | true \(\rightarrow\) do redshift-space mocks, false \(\rightarrow\) do real-space mocks |
| smoothing_radius | the smoothing radius |
| nObjects | number of generated points |
| redshift | vector containing the redshift |
| bias | vector containing the bias in function of redshift |
| dir | output directory |
| filename | output filename |
| seed | seed for random generator |
| set_fields | true \(\rightarrow\) set the fields, false \(\rightarrow\) don't set the fields |
| use_random | true \(\rightarrow\) use an input random catalogue for the visibility mask; false \(\rightarrow\) don't use random |
Definition at line 619 of file LogNormalFull.cpp.
|
protected |
extract points from lognormal density fields
| nObjects | number of generated points |
| doRSD | true \(\rightarrow\)do redshift-space mocks, false \(\rightarrow\) do real-space mocks |
| redshift | vector containing the redshift |
| bias | vector containing the bias in function of redshift |
| visibility | pointer to the visibility |
| file_out | out file for the extracted sample |
Definition at line 549 of file LogNormalFull.cpp.
|
protected |
reset the fields
| use_random | true \(\rightarrow\) use an input random catalogue for visibility mask, false \(\rightarrow\) do not use random |
| doRSD | true \(\rightarrow\)do redshift-space mocks, false \(\rightarrow\) do real-space mocks |
Definition at line 213 of file LogNormalFull.cpp.
|
protected |
set the density field
| smoothing_radius | the gaussian kernel size |
Definition at line 291 of file LogNormalFull.cpp.
|
protected |
set the fields
| use_random | true \(\rightarrow\) use an input random catalogue for the visibility mask; false \(\rightarrow\) do not use random |
| doRSD | true \(\rightarrow\) construct redshift-space mocks; false \(\rightarrow\) construct real-space mocks |
Definition at line 187 of file LogNormalFull.cpp.
| 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
| cosmology | the input cosmology |
| redshift_min | the minimum redshift |
| redshift_max | the maximum redshift |
| n_redshift_bins | the number or redshift bins |
| author | the linear power spectrum |
Definition at line 77 of file LogNormalFull.cpp.
| 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
| rmin | cell size |
| xMin | the minimum x-value |
| xMax | the minimum x-value |
| yMin | the maximum y-value |
| yMax | the maximum x-value |
| zMin | the minimum z-value |
| zMax | the maximum z-value |
Definition at line 135 of file LogNormalFull.cpp.
| 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
| rmin | cell size |
| random | vector containing random samples |
| pad | the size of padding area around grid |
Definition at line 154 of file LogNormalFull.cpp.