CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::catalogue Namespace Reference

The namespace of the functions and classes used to handle catalogues of astronomical sources More...

Classes

struct  MaskObject
 object that encapsulate the mask function. More...
 
struct  Gadget_Header
 This structure allows to store GADGET header. More...
 
struct  SubFindTab_Header
 This structure allows to store SUBFIND Tab file header. More...
 
class  Catalogue
 The class Catalogue. More...
 
class  ChainMeshCell
 The class ChainMeshCell. More...
 
class  Cluster
 The class Cluster. More...
 
class  Galaxy
 The class Galaxy. More...
 
class  Halo
 The class CatalogueChainMesh. More...
 
class  HostHalo
 The class HostHalo. More...
 
class  Mock
 The class Mock. More...
 
class  Object
 The class Object. More...
 
class  RandomObject
 The class RandomObject. More...
 
class  Void
 The class Void. More...
 

Typedefs

typedef std::function< bool(const std::shared_ptr< Object > obj)> mask_function
 Definition of a new type to manage mask function. More...
 

Enumerations

enum class  Var {
  _X_ , _Y_ , _Z_ , _RA_ ,
  _Dec_ , _TileRA_ , _TileDec_ , _SN_ ,
  _Redshift_ , _RedshiftMin_ , _RedshiftMax_ , _Shear1_ ,
  _Shear2_ , _ODDS_ , _LensingWeight_ , _LensingCalib_ ,
  _Dc_ , _Weight_ , _Mass_ , _Magnitude_ ,
  _MagnitudeU_ , _MagnitudeG_ , _MagnitudeR_ , _MagnitudeI_ ,
  _SFR_ , _sSFR_ , _MassProxy_ , _MassProxyError_ ,
  _Mstar_ , _MassInfall_ , _IDHOST_ , _GalaxyTag_ ,
  _Vx_ , _Vy_ , _Vz_ , _Region_ ,
  _Radius_ , _DensityContrast_ , _CentralDensity_ , _X_displacement_ ,
  _Y_displacement_ , _Z_displacement_ , _MassEstimate_ , _RadiusEstimate_ ,
  _VeldispEstimate_ , _XCM_ , _YCM_ , _ZCM_ ,
  _XSpin_ , _YSpin_ , _ZSpin_ , _VelDisp_ ,
  _Vmax_ , _VmaxRad_ , _TotMass_ , _ID_ ,
  _Nsub_ , _Parent_ , _Generic_
}
 the catalogue variables More...
 
enum class  RandomType {
  _createRandom_box_ , _createRandom_square_ , _createRandom_shuffle_ , _createRandom_shuffleTOT_ ,
  _createRandom_cone_ , _createRandom_MANGLE_ , _createRandom_VIPERS_ , _createRandom_SDSS_stripes_ ,
  _createRandom_homogeneous_LC_
}
 the type of random catalogue More...
 
enum class  HODType { _Zehavi05_ , _Zehavi11_ , _Moster10_ }
 type of HOD catalogue, which corresponds to the authors of the calibrated HOD model More...
 
enum class  VoidAlgorithm { _LaZeVo_ , _Exact_ }
 the algorithm used to look for Voids More...
 
enum class  CharEncode { _ascii_ , _binary_ }
 character encoding of input file More...
 
enum class  EstimateCriterion { _m200_ , _c200_ , _t200_ }
 method used to estimate mass, radius and velocity of a halo
 
enum class  ObjectType {
  _Random_ , _Mock_ , _Halo_ , _Galaxy_ ,
  _Cluster_ , _Void_ , _HostHalo_ , _ChainMeshCell_
}
 the object types More...
 

Functions

std::vector< std::string > VarNames ()
 return a vector containing the Var names More...
 
Var VarCast (const int varIndex)
 cast an enum of type Var from its index More...
 
Var VarCast (const std::string varName)
 cast an enum of type Var from its name More...
 
std::vector< VarVarCast (const std::vector< int > varIndeces)
 cast an enum of type Var from indeces More...
 
std::vector< VarVarCast (const std::vector< std::string > varNames)
 cast an enum of type Var from thier names More...
 
std::vector< std::string > RandomTypeNames ()
 return a vector containing the RandomType names More...
 
RandomType RandomTypeCast (const int randomTypeIndex)
 cast an enum of type RandomType from its index More...
 
RandomType RandomTypeCast (const std::string randomTypeName)
 cast an enum of type RandomType from its name More...
 
std::vector< RandomTypeRandomTypeCast (const std::vector< int > randomTypeIndeces)
 cast an enum of type RandomType from indeces More...
 
std::vector< RandomTypeRandomTypeCast (const std::vector< std::string > randomTypeNames)
 cast an enum of type RandomType from thier names More...
 
std::vector< std::string > HODTypeNames ()
 return a vector containing the HODTypes names More...
 
std::vector< std::string > VoidAlgorithmNames ()
 return a vector containing the VoidAlgorithm names More...
 
std::vector< std::string > CharEncodeNames ()
 return a vector containing the CharEncode names More...
 
std::vector< std::string > EstimateCriterionNames ()
 return a vector containing the EstimateCriterion names More...
 
EstimateCriterion EstimateCriterionCast (const int estimateCriterionIndex)
 cast an enum of type EstimateCriterion from its index More...
 
EstimateCriterion EstimateCriterionCast (const std::string estimateCriterionName)
 cast an enum of type EstimateCriterion from its name More...
 
std::vector< EstimateCriterionEstimateCriterionCast (const std::vector< int > estimateCriterionIndeces)
 cast an enum of type EstimateCriterion from indeces More...
 
std::vector< EstimateCriterionEstimateCriterionCast (const std::vector< std::string > estimateCriterionNames)
 cast an enum of type EstimateCriterion from thier names More...
 
double Average_c_Zehavi_2011 (const double x, const double logMmin, const double logsigma_c)
 return the average number of central galaies inside an halo of mass x More...
 
double Average_s_Zehavi_2011 (const double x, const double M0, const double M1, const double alpha)
 return the average number of satellite galaies per halo of mass x More...
 
double Average_c_Zehavi_2005 (const double x, const double Mmin)
 return the average number of central galaies inside an halo of mass x More...
 
double Average_s_Zehavi_2005 (const double x, const double alpha, const double M1)
 return the average number of satellite galaies per halo of mass x More...
 
std::vector< std::string > ObjectTypeNames ()
 return a vector containing the ObjectType names More...
 
ObjectType ObjectTypeCast (const int objectTypeIndex)
 cast an enum of type ObjectType from its index More...
 
ObjectType ObjectTypeCast (const std::string objectTypeName)
 cast an enum of type ObjectType from its name More...
 
std::vector< ObjectTypeObjectTypeCast (const std::vector< int > objectTypeIndeces)
 cast an enum of type ObjectType from indeces More...
 
std::vector< ObjectTypeObjectTypeCast (const std::vector< std::string > objectTypeNames)
 cast an enum of type ObjectType from thier names More...
 

Detailed Description

The namespace of the functions and classes used to handle catalogues of astronomical sources

The catalogue namespace contains all the functions and classes used to handle catalogues of astronomical sources

Typedef Documentation

◆ mask_function

typedef std::function<bool(const std::shared_ptr<Object> obj)> cbl::catalogue::mask_function

Definition of a new type to manage mask function.

This function can contain one or more checks on object variables, returning a bool

Parameters
objpointer to an object of type cbl::catalogue::Object
Returns
bool

Definition at line 266 of file Catalogue.h.

Enumeration Type Documentation

◆ CharEncode

character encoding of input file

Enumerator
_ascii_ 

Format ASCII file.

_binary_ 

Format binary file.

Definition at line 476 of file Catalogue.h.

◆ HODType

type of HOD catalogue, which corresponds to the authors of the calibrated HOD model

catalogue

Enumerator
_Zehavi05_ 

Zehavi et al. (2005)

_Zehavi11_ 

Zehavi et al. (2011)

_Moster10_ 

Moster et al. (2010)

Definition at line 426 of file Catalogue.h.

◆ ObjectType

the object types

Enumerator
_Random_ 

random object

_Mock_ 

mock object

_Halo_ 

dark matter halo

_Galaxy_ 

galaxy

_Cluster_ 

galaxy cluster

_Void_ 

cosmic void

_HostHalo_ 

host halo

Definition at line 51 of file Object.h.

◆ RandomType

the type of random catalogue

Enumerator
_createRandom_box_ 

random catalogue with cubic geometry (or parallelepiped) in comoving coordinates

_createRandom_square_ 

random catalogue with square geometry in observed coordinates (R.A., Dec)

_createRandom_shuffle_ 

random catalogue obtained with shuffling in observed coordinates (R.A., Dec)

_createRandom_shuffleTOT_ 

random catalogue obtained with shuffling in observed coordinates (R.A., Dec) and redshift

_createRandom_cone_ 

random catalogue with conic geometry

_createRandom_MANGLE_ 

random catalogue using mangle

_createRandom_VIPERS_ 

random catalogue for VIPERS

_createRandom_SDSS_stripes_ 

create random for SDSS, using stripes

_createRandom_homogeneous_LC_ 

homogeneous random catalogue in ra and dec with redshift dependent density

Definition at line 345 of file Catalogue.h.

◆ Var

enum cbl::catalogue::Var
strong

the catalogue variables

Enumerator
_X_ 

coordinate x

_Y_ 

coordinate y

_Z_ 

coordinate z

_RA_ 

Right Ascension.

_Dec_ 

Declination.

_TileRA_ 

Central value of the tile Right Ascension.

_TileDec_ 

Central value of the tile Declination.

_SN_ 

Signal-to-noise ratio.

_Redshift_ 

redshift

_RedshiftMin_ 

minimum redshift

_RedshiftMax_ 

maximum redshift

_Shear1_ 

first component of the shear signal

_Shear2_ 

second component of the shear signal

_ODDS_ 

the ODDS parameter quantifies which fraction of the redshift distribution, p(z), is concentrated around the peak value, allowing the construction of a threshold useful in excluding distributions with significant secondary solutions or wide tails (Coe et al. 2006; Bellagamba et al. 2012)

_LensingWeight_ 

lensing weight

_LensingCalib_ 

lensing calibration factor

_Dc_ 

comoving distance

_Weight_ 

weight

_Mass_ 

mass

_Magnitude_ 

magnitude

_MagnitudeU_ 

u-band magnitude

_MagnitudeG_ 

g-band magnitude

_MagnitudeR_ 

r-band magnitude

_MagnitudeI_ 

i-band magnitude

_SFR_ 

star formation rate

_sSFR_ 

specific star formation rate

_MassProxy_ 

mass proxy

_MassProxyError_ 

mass proxy error

_Mstar_ 

stellar mass

_MassInfall_ 

Infall mass of substructures.

_IDHOST_ 

unique identification number of the halo that host galaxy

_GalaxyTag_ 

tag of galaxy "central" or "satellite"

_Vx_ 

velocity along the x direction

_Vy_ 

velocity along the y direction

_Vz_ 

velocity along the z direction

_Region_ 

region

_Radius_ 

radius

_DensityContrast_ 

densityContrast

_CentralDensity_ 

centralDensity

_X_displacement_ 

xx displacement

_Y_displacement_ 

yy displacement

_Z_displacement_ 

zz displacement

_MassEstimate_ 

mass estimate

_RadiusEstimate_ 

radius estimate

_VeldispEstimate_ 

velocity dispersion estimate

_XCM_ 

centre of mass x-coordinate

_YCM_ 

centre of mass y-coordinate

_ZCM_ 

centre of mass z-coordinate

_XSpin_ 

spin x-coordinate

_YSpin_ 

spin y-coordinate

_ZSpin_ 

spin z-coordinate

_VelDisp_ 

velocity dispersion

_Vmax_ 

maximum velocity

_VmaxRad_ 

maximum radial velocity

_TotMass_ 

total halo mass

_ID_ 

unique identification number

_Nsub_ 

number of sub-groups

_Parent_ 

parent unique identification number

_Generic_ 

generic property

Definition at line 70 of file Catalogue.h.

◆ VoidAlgorithm

the algorithm used to look for Voids

Enumerator
_LaZeVo_ 

Lagrangian Zel'dovich approximation Void algorithm used to move particles.

_Exact_ 

Void Algorithm used to connect positions at present times with positions at high redshift in simulations

Definition at line 452 of file Catalogue.h.

Function Documentation

◆ Average_c_Zehavi_2005()

double cbl::catalogue::Average_c_Zehavi_2005 ( const double  x,
const double  Mmin 
)

return the average number of central galaies inside an halo of mass x

Parameters
xthe halo mass
Mminis the value of the minimum halo mass that host a central galaxy
Returns
the mean occupation number of central galaxy

Definition at line 66 of file HODCatalogue.cpp.

◆ Average_c_Zehavi_2011()

double cbl::catalogue::Average_c_Zehavi_2011 ( const double  x,
const double  logMmin,
const double  logsigma_c 
)

return the average number of central galaies inside an halo of mass x

Parameters
xthe halo mass
logMminlogarithmic value of minimum halo mass that host a central galaxy
logsigma_clogarithmic value of sigma in the lognormal distribution
Returns
the mean occupation number of central galaxy

Definition at line 48 of file HODCatalogue.cpp.

◆ Average_s_Zehavi_2005()

double cbl::catalogue::Average_s_Zehavi_2005 ( const double  x,
const double  alpha,
const double  M1 
)

return the average number of satellite galaies per halo of mass x

Parameters
xthe halo mass
M1is the halo mass that host at least a satellite galaxy
alphaexponent of the power law
Returns
the mean occupation number of central galaxy

Definition at line 75 of file HODCatalogue.cpp.

◆ Average_s_Zehavi_2011()

double cbl::catalogue::Average_s_Zehavi_2011 ( const double  x,
const double  M0,
const double  M1,
const double  alpha 
)

return the average number of satellite galaies per halo of mass x

Parameters
xthe halo mass
M0HOD parameter
M1HOD parameter
alphaexponent of the power law
Returns
the mean occupation number of central galaxy

Definition at line 57 of file HODCatalogue.cpp.

◆ CharEncodeNames()

std::vector<std::string> cbl::catalogue::CharEncodeNames ( )
inline

return a vector containing the CharEncode names

Returns
a vector containing the CharEncode names

Definition at line 492 of file Catalogue.h.

◆ EstimateCriterionCast() [1/4]

EstimateCriterion cbl::catalogue::EstimateCriterionCast ( const int  estimateCriterionIndex)
inline

cast an enum of type EstimateCriterion from its index

Parameters
estimateCriterionIndexthe estimateCriterion index
Returns
object of class EstimateCriterion

Definition at line 527 of file Catalogue.h.

◆ EstimateCriterionCast() [2/4]

EstimateCriterion cbl::catalogue::EstimateCriterionCast ( const std::string  estimateCriterionName)
inline

cast an enum of type EstimateCriterion from its name

Parameters
estimateCriterionNamethe estimateCriterion name
Returns
object of class EstimateCriterion

Definition at line 536 of file Catalogue.h.

◆ EstimateCriterionCast() [3/4]

std::vector<EstimateCriterion> cbl::catalogue::EstimateCriterionCast ( const std::vector< int >  estimateCriterionIndeces)
inline

cast an enum of type EstimateCriterion from indeces

Parameters
estimateCriterionIndecesthe estimateCriterion indeces
Returns
vector of objects of class EstimateCriterion

Definition at line 545 of file Catalogue.h.

◆ EstimateCriterionCast() [4/4]

std::vector<EstimateCriterion> cbl::catalogue::EstimateCriterionCast ( const std::vector< std::string >  estimateCriterionNames)
inline

cast an enum of type EstimateCriterion from thier names

Parameters
estimateCriterionNamesthe estimateCriterion names
Returns
vector of objects of class EstimateCriterion

Definition at line 554 of file Catalogue.h.

◆ EstimateCriterionNames()

std::vector<std::string> cbl::catalogue::EstimateCriterionNames ( )
inline

return a vector containing the EstimateCriterion names

Returns
a vector containing the EstimateCriterion names

Definition at line 518 of file Catalogue.h.

◆ HODTypeNames()

std::vector<std::string> cbl::catalogue::HODTypeNames ( )
inline

return a vector containing the HODTypes names

Returns
a vector containing the HODTypes names

Definition at line 445 of file Catalogue.h.

◆ ObjectTypeCast() [1/4]

ObjectType cbl::catalogue::ObjectTypeCast ( const int  objectTypeIndex)
inline

cast an enum of type ObjectType from its index

Parameters
objectTypeIndexthe objectType index
Returns
object of class ObjectType

Definition at line 94 of file Object.h.

◆ ObjectTypeCast() [2/4]

ObjectType cbl::catalogue::ObjectTypeCast ( const std::string  objectTypeName)
inline

cast an enum of type ObjectType from its name

Parameters
objectTypeNamethe objectType name
Returns
object of class ObjectType

Definition at line 103 of file Object.h.

◆ ObjectTypeCast() [3/4]

std::vector<ObjectType> cbl::catalogue::ObjectTypeCast ( const std::vector< int >  objectTypeIndeces)
inline

cast an enum of type ObjectType from indeces

Parameters
objectTypeIndecesthe objectType indeces
Returns
vector of objects of class ObjectType

Definition at line 112 of file Object.h.

◆ ObjectTypeCast() [4/4]

std::vector<ObjectType> cbl::catalogue::ObjectTypeCast ( const std::vector< std::string >  objectTypeNames)
inline

cast an enum of type ObjectType from thier names

Parameters
objectTypeNamesthe objectType names
Returns
vector of objects of class ObjectType

Definition at line 121 of file Object.h.

◆ ObjectTypeNames()

std::vector<std::string> cbl::catalogue::ObjectTypeNames ( )
inline

return a vector containing the ObjectType names

Returns
a vector containing the ObjectType names

Definition at line 85 of file Object.h.

◆ RandomTypeCast() [1/4]

RandomType cbl::catalogue::RandomTypeCast ( const int  randomTypeIndex)
inline

cast an enum of type RandomType from its index

Parameters
randomTypeIndexthe randomType index
Returns
object of class RandomType

Definition at line 390 of file Catalogue.h.

◆ RandomTypeCast() [2/4]

RandomType cbl::catalogue::RandomTypeCast ( const std::string  randomTypeName)
inline

cast an enum of type RandomType from its name

Parameters
randomTypeNamethe randomType name
Returns
object of class RandomType

Definition at line 399 of file Catalogue.h.

◆ RandomTypeCast() [3/4]

std::vector<RandomType> cbl::catalogue::RandomTypeCast ( const std::vector< int >  randomTypeIndeces)
inline

cast an enum of type RandomType from indeces

Parameters
randomTypeIndecesthe randomType indeces
Returns
vector of objects of class RandomType

Definition at line 408 of file Catalogue.h.

◆ RandomTypeCast() [4/4]

std::vector<RandomType> cbl::catalogue::RandomTypeCast ( const std::vector< std::string >  randomTypeNames)
inline

cast an enum of type RandomType from thier names

Parameters
randomTypeNamesthe randomType names
Returns
vector of objects of class RandomType

Definition at line 417 of file Catalogue.h.

◆ RandomTypeNames()

std::vector<std::string> cbl::catalogue::RandomTypeNames ( )
inline

return a vector containing the RandomType names

Returns
a vector containing the RandomType names

Definition at line 381 of file Catalogue.h.

◆ VarCast() [1/4]

Var cbl::catalogue::VarCast ( const int  varIndex)
inline

cast an enum of type Var from its index

Parameters
varIndexthe var index
Returns
object of class Var

Definition at line 311 of file Catalogue.h.

◆ VarCast() [2/4]

Var cbl::catalogue::VarCast ( const std::string  varName)
inline

cast an enum of type Var from its name

Parameters
varNamethe var name
Returns
object of class Var

Definition at line 320 of file Catalogue.h.

◆ VarCast() [3/4]

std::vector<Var> cbl::catalogue::VarCast ( const std::vector< int >  varIndeces)
inline

cast an enum of type Var from indeces

Parameters
varIndecesthe var indeces
Returns
vector of objects of class Var

Definition at line 329 of file Catalogue.h.

◆ VarCast() [4/4]

std::vector<Var> cbl::catalogue::VarCast ( const std::vector< std::string >  varNames)
inline

cast an enum of type Var from thier names

Parameters
varNamesthe var names
Returns
vector of objects of class Var

Definition at line 338 of file Catalogue.h.

◆ VarNames()

std::vector<std::string> cbl::catalogue::VarNames ( )
inline

return a vector containing the Var names

Returns
a vector containing the Var names

Definition at line 302 of file Catalogue.h.

◆ VoidAlgorithmNames()

std::vector<std::string> cbl::catalogue::VoidAlgorithmNames ( )
inline

return a vector containing the VoidAlgorithm names

Returns
a vector containing the VoidAlgorithm names

Definition at line 469 of file Catalogue.h.