Documented main module, including functions to initilize and cleanup the cosmology structure and calls to fthree main functions to compute the line mean brightness temprature, linear and quadratic biases and clustering and shot contributions to line power spectrum. More...
#include "header.h"
Functions | |
| int | main (int argc, char *argv[]) |
Variables | |
| struct globals | gb |
Documented main module, including functions to initilize and cleanup the cosmology structure and calls to fthree main functions to compute the line mean brightness temprature, linear and quadratic biases and clustering and shot contributions to line power spectrum.
Azadeh Moradinezhad Dizgah, November 4th 2021
In order to call any function from the package, the function calls should be placed in the marked section of main() function.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Initialize various ingredients for the rest of the code.
More specifically, initilize the filename and interpolator of SFR. Read in the values of the parameters from .ini file and set the values of the elements of the glocal structure Furthermore, the initialize() function returns a structure containing parameters such as as mimumum halo mass that are read from the .ini file.
Extract from the return struct of initialize() function, values of the parameters for computing quantities related to spectral lines. Note that these values were read from the .ini file within the initialize() function.
M_min : mimum mass for halos that can host line-emitting galaxies in unit of M_sun mode_mf: switch to set the theoretical mass function to be used, ST: Sheth-Tormen, PSC: Press-Schecter, TK:: Tinker ninterp: how many points to have for z-interpolation of line bias and first and second luminosity moments nlines: the number of emission lines you want to include in the analysis
Note about ninterp: The main line properties used in the calculation of the line power spectrum, which includes first and second moments of line luminosity (weighted by halo mass function) and luminosity-weighted linear and quadratic line biases are computed in function Line_alloc_init(). In that function, these quantities are calculate over an array of redshift values ranging from 0 to line_zmax (a paramter of .ini file). Subsequently, an interpolator for these quantities is initialized. The parameter "ninterp" below, sets the number of interpolation points
for this interpolator. If you set ninterp too low and the redshift range is wide, the redshift-dependance of line properties would not be accurate. In the tests done during code developement, ninterp = 150 give results at the precision needed when comparing with MithraLIMSims. However large values of ninterp results in longer run time. For testing installation and running the code using test.c module, lower value of ninterp is used, to have the code run fast. But remember in your actuall runs, set ninterp to larger numbers.
Note about nlines: If you do not need to compute the line properties for all the 7 lines implemented in the code, you can set nlines in the .ini file to the number of lines you are interested. Note that at the moment you can only call the lines in the order below.
Given the number of lines you chose with nline, the line_type[] array and JJ[] arrays will be initialized here.
set the value of J for the lines. Note that value of J is onlyy important for determining the frequency of CO rotational lines and for CII, J=0 has no physical implication. Here we set the values of J just for labeling of the output files
Set values of cosmological parameter and finger-of-god paramater (peculiar velocity of line emitters) and initialize cosmo_pars array in the cosmology structure Cx_ref
Initialize the cosmology structure, which includes CLASS cosmology and Line structures
At the moment, limHaloPT has three possible outputs; the mean brightness temprature, the clustering power or the shot power. The latter two are computed within halo model. The clustering power is real-space (RSD not included).

| struct globals gb |