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

The class LogNormal. More...

#include "Headers/LogNormal.h"

Collaboration diagram for cbl::lognormal::LogNormal:

Public Member Functions

Constructors/destructors
 LogNormal ()=default
 default constructor
 
 ~LogNormal ()=default
 default destructor
 
 LogNormal (const catalogue::Catalogue random, const cosmology::Cosmology cosmology, const int nObjects, const double redshift, const double bias, const double cell_size, const bool real=true, const std::string method_Pk="CAMB", const bool NL=false)
 constructor More...
 
Functions to get the private members of the class
std::shared_ptr< catalogue::Cataloguecatalogue (const size_t i)
 get the private member LogNormal::m_LNCat[i] More...
 
int nObjects () const
 get the private member LogNormal::m_nObjects More...
 
int redshift () const
 get the private member LogNormal::m_redshift More...
 
double bias () const
 get the private member LogNormal::m_bias More...
 
bool real () const
 get the private member LogNormal::m_real More...
 
std::string method_Pk () const
 get the private member LogNormal::m_method_Pk More...
 
bool NL () const
 get the private member LogNormal::m_NL More...
 
Functions to set the private members of the class
void set_nObjects (const int nObjects)
 set the private member LogNormal::m_nObjects More...
 
void set_redshift (const double redshift)
 set the private member LogNormal::m_redshift More...
 
void set_bias (const double bias)
 set the private member LogNormal::m_bias More...
 
void set_real (const bool real)
 set the private member LogNormal::m_real More...
 
void set_method_Pk (const std::string method_Pk)
 set the private member LogNormal::m_method_Pk More...
 
void set_NL (const bool NL)
 set the private member LogNormal::m_NL More...
 
Functions to generate the log-normal mock catalogues
void generate (const int n_lognormal_mocks, const std::string output_dir, const std::string filename="lognormal", const int start=1, const int seed=3213)
 generate the log-normal mock catalogues More...
 

Protected Attributes

std::vector< std::shared_ptr< catalogue::Catalogue > > m_catalogue = {}
 vector containing pointers to the log-normal realizations
 
catalogue::Catalogue m_random
 the random catalogues used to construct the mask
 
cosmology::Cosmology m_cosmology
 the assumed cosmological model
 
int m_nObjects
 the mean total number of objects in the log-normal catalogues
 
double m_redshift
 the mean redshift the log-normal catalogues
 
double m_bias
 the bias of the log-normal density field catalogues
 
double m_cell_size
 the cell size in comoving scale
 
bool m_real
 true → real space; false → redshift space (only monopole distortions)
 
std::string m_method_Pk
 the method to compute the model power spectrum (i.e. the Boltzmann solver)
 
bool m_NL
 true → compute the non-linear power spectrum; false → compute the linear power spectrum
 

Detailed Description

The class LogNormal.

This class is used to handle objects of type LogNormal

Examples
lognormal.cpp.

Definition at line 58 of file LogNormal.h.

Constructor & Destructor Documentation

◆ LogNormal()

cbl::lognormal::LogNormal::LogNormal ( const catalogue::Catalogue  random,
const cosmology::Cosmology  cosmology,
const int  nObjects,
const double  redshift,
const double  bias,
const double  cell_size,
const bool  real = true,
const std::string  method_Pk = "CAMB",
const bool  NL = false 
)
inline

constructor

Parameters
randominput random catalogue (should be much larger than the random catalogue used to measure the two-point correlation function)
cosmologythe assumed cosmological model
nObjectsmean total number of objects in the log-normal catalogues
redshiftmean redshift the log-normal catalogues
biasbias of the log-normal density field catalogues
cell_sizethe cell size of the density field in comoving coordinates
realtrue → real space; false → redshift space (only monopole distortions)
method_Pkthe method to compute the model power spectrum (i.e. the Boltzmann solver)
NLtrue → compute the non-linear power spectrum; false → compute the linear power spectrum

Definition at line 138 of file LogNormal.h.

Member Function Documentation

◆ bias()

double cbl::lognormal::LogNormal::bias ( ) const
inline

get the private member LogNormal::m_bias

Returns
the bias of the log-normal density field catalogues

Definition at line 179 of file LogNormal.h.

◆ catalogue()

std::shared_ptr< catalogue::Catalogue > cbl::lognormal::LogNormal::catalogue ( const size_t  i)

get the private member LogNormal::m_LNCat[i]

Parameters
iindex of the log-normal realization
Returns
the i-th log-normal realization
Examples
lognormal.cpp.

Definition at line 47 of file LogNormal.cpp.

◆ generate()

void cbl::lognormal::LogNormal::generate ( const int  n_lognormal_mocks,
const std::string  output_dir,
const std::string  filename = "lognormal",
const int  start = 1,
const int  seed = 3213 
)

generate the log-normal mock catalogues

Parameters
n_lognormal_mocksnumber of log-normal mock catalogues to be constructed
output_dirthe output directory
filenamethe prefix of the ouput file containing the LogNormal realizations
startthe starting index of the mock to be created
seedthe seed for random number generation
Examples
lognormal.cpp.

Definition at line 62 of file LogNormal.cpp.

◆ method_Pk()

std::string cbl::lognormal::LogNormal::method_Pk ( ) const
inline

get the private member LogNormal::m_method_Pk

Returns
the method to compute the model power spectrum (i.e. the Boltzmann solver)

Definition at line 195 of file LogNormal.h.

◆ NL()

bool cbl::lognormal::LogNormal::NL ( ) const
inline

get the private member LogNormal::m_NL

Returns
true → compute the non-linear power spectrum; false → compute the linear power spectrum

Definition at line 203 of file LogNormal.h.

◆ nObjects()

int cbl::lognormal::LogNormal::nObjects ( ) const
inline

get the private member LogNormal::m_nObjects

Returns
the mean total number of objects in the log-normal catalogues

Definition at line 164 of file LogNormal.h.

◆ real()

bool cbl::lognormal::LogNormal::real ( ) const
inline

get the private member LogNormal::m_real

Returns
true → real space; false → redshift space (only monopole distortions)

Definition at line 187 of file LogNormal.h.

◆ redshift()

int cbl::lognormal::LogNormal::redshift ( ) const
inline

get the private member LogNormal::m_redshift

Returns
the mean redshift the log-normal catalogues catalogues

Definition at line 172 of file LogNormal.h.

◆ set_bias()

void cbl::lognormal::LogNormal::set_bias ( const double  bias)
inline

set the private member LogNormal::m_bias

Parameters
biasthe bias of the log-normal density field catalogues

Definition at line 235 of file LogNormal.h.

◆ set_method_Pk()

void cbl::lognormal::LogNormal::set_method_Pk ( const std::string  method_Pk)
inline

set the private member LogNormal::m_method_Pk

Parameters
method_Pkthe method to compute the model power spectrum (i.e. the Boltzmann solver)

Definition at line 251 of file LogNormal.h.

◆ set_NL()

void cbl::lognormal::LogNormal::set_NL ( const bool  NL)
inline

set the private member LogNormal::m_NL

Parameters
NLtrue → compute the non-linear power spectrum; false → compute the linear power spectrum

Definition at line 259 of file LogNormal.h.

◆ set_nObjects()

void cbl::lognormal::LogNormal::set_nObjects ( const int  nObjects)
inline

set the private member LogNormal::m_nObjects

Parameters
nObjectsthe mean total number of objects in the log-normal catalogues

Definition at line 219 of file LogNormal.h.

◆ set_real()

void cbl::lognormal::LogNormal::set_real ( const bool  real)
inline

set the private member LogNormal::m_real

Parameters
realtrue → real space; false → redshift space (only monopole distortions)

Definition at line 243 of file LogNormal.h.

◆ set_redshift()

void cbl::lognormal::LogNormal::set_redshift ( const double  redshift)
inline

set the private member LogNormal::m_redshift

Parameters
redshiftthe mean redshift the log-normal catalogues catalogues

Definition at line 227 of file LogNormal.h.


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