wll745881210 / CLPT_GSRSD

Convolution Lagrangian Perturbation Theory (CLPT) and Gaussian Streaming Redshift-Space Distortions (GSRSD)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README: Convolution Lagrangian Perturbation Theory (CLPT) and Gaussian Streaming Redshift-Space Distortions (GSRSD)

Copyright and warranty info

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The following people also contributed to this code:

  • Alejandro Aviles
  • Martin White

Introduction

This package contains two separated programs: CLPT and GSRSD. Those two programs are coded separately, but GSRSD uses the output of CLPT directly. For the overall reference, please refer to:

http://adsabs.harvard.edu/abs/2014MNRAS.437..588W

Important changes

Compared to the previous version, the $σ^2$ (velocity dispersion) output files, generated by the CLPT part, are merged into one file (and the GSRSD part has already been modified accordingly). See the corresponding section in this README for details.

The two packages are now parallelized with OpenMP.

Compilation and dependencies

CLPT and GSRSD are both written in standard C++-11 (also works with C++-0x; gcc version > 4.4 will do this correctly)–and nothing else. If you are working under Linux and have g++ and GNUMake in your computer, you can just get into each directory and type “make” respectively.

Both packages contain OpenMP parallelization. If you are using Clang/LLVM, which does not officialy support OpenMP today, you may want to remove the ”#include <omp.h>” and ”omp_set_num_threads( n_threads );” statements in both ”main.cpp” files. Or, instead, you may want to try this:

https://clang-omp.github.io

The makefiles are written by a human, so you should find it easy to modify them as needed (e.g. if you have gcc 4.4, you may want to use the flag “-std=c++0x” instead of “-std=c++11” therein).

I named the output binary files as “.exe” files–the only purpose of this is for git to recogize them easily and clearly.

CLPT

This program gives real-space statistics, including correlation functions and pairwise velocity statistics, coming from the CLPT.

For CLPT, please refer to:

http://adsabs.harvard.edu/abs/2013MNRAS.429.1674C

Input

Parameter file

The CLPT code uses a parameter file to specify the parameters. There is an example of parameter file (“par.txt”) in the CLPT folder. You can modify the parameter file (e.g. adjust the values or the sequence of the keys), but please leave the header “CORR_FUNC” and “Init” intact.

Some explanations:

Key Value
r_max Maximum value of real-space separation that is calculated
r_min Minimum value of real-space separation
r_bin_num Number of data points between r_min and r_max
pow_spec_file Path to the input file: Linear power spectrum
xi_file Path to the output file: real-space $ξ(r)$
v12_file Path to the output file: real-space pairwise infall velocity
s12_file Path to the output file: real-space pairwise velocity dispersion
k_input If specified, functions of k are read from file; if “none” or missing, they will
be calculated and stored into the file specified in key “k_output”.
k_output The path for the $k$-function output file.
q_input Similar to “k_input”. Note: Functions of q depend on functions of $k$
q_output Similar to “k_output”.
n_thread Number of threads that you will be using. If negative or missing, the number
of threads will be determined by the env variable $OMP_NUM_THREADS

The file for the velocity dispersions will be attached a suffix: “_p” for the parallel component, and “_v” for the perpandicular component.

Linear power spectrum

The CLPT program also needs a liear power spectrum as input, whose path should be specified in the parameter file.

Definition of the file:

Column Value
1 Wave number (in $\mathrm{h\ Mpc}^{-1}$)
2 Power [in $(\mathrm{Mpc\ h})^{-3}]$

Run!

The name of the parameter file should be used as the parameter of command-line input. For example, if you are using Linux and your parameter file is named “par.txt”, you may want to type the followings in the terminal:

$ ./clpt.exe par.txt

Output

In our CLPT model, we use $\langle F’\rangle$ and $\langle F”\rangle$ as first- and second-order Lagrangian bias parameters. For a specific statistics A, we calculate the value of A for biased tracers as:

$A = A_0 + A_{10} \langle F’ \rangle + A_{01} \langle F” \rangle + A_{20} \langle F’ \rangle^2 + A_{11} \langle F’ \rangle\langle F” \rangle + A_{02} \langle F” \rangle^2$

In this section we will use this notation.

Real-space correlation function

Column Value
1 $r$ (in $\mathrm{Mpc\ h}^{-1}$)
2 $ξ_L$ (linear correlation function)
3 $ξ_0$
4 $ξ_{10}$
5 $ξ_{01}$
6 $ξ_{20}$
7 $ξ_{11}$
8 $ξ_{02}$

Real-space pairwise infall velocity.

Veolicties are given in units of $v/(a H(a) f_v)$ (this gives the results a dimension of distance), where a is the scale factor, $H(a)$ is the Hubble parameter and $f_v$ is the growth factor.

Column Value
1 $r$ (in $\mathrm{Mpc\ h}^{-1}$)
2 $v_{12,L}$ (linear pairwise velocity)
3 $v_{12,0}$
4 $v_{12,10}$
5 $v_{12,01}$
6 $v_{12,20}$
7 $v_{12,11}$
8 $v_{12,02}$

Real-space pairwise velocity dispersion

Column Value
1 $r$ (in $\mathrm{Mpc\ h}^{-1}$)
2 $σ^2_{\parallel, 12,0}$ (in $\mathrm{Mpc}^2/\mathrm{h}^2$)
3 $σ^2_{\parallel, 12,10}$
4 $σ^2_{\parallel, 12,01}$
5 $σ^2_{\parallel, 12,20}$
6 $σ^2_{\bot, 12,0}$ (in $\mathrm{Mpc}^2/\mathrm{h}^2$)
7 $σ^2_{\bot, 12,10}$
8 $σ^2_{\bot, 12,01}$
9 $σ^2_{\bot, 12,20}$

Other components vanish at the desired (one-loop) order.

GSRSD

This program gives redshift-space statistics, including Legendre expansion of correlation function and wedge statistics, coming from the Gaussian streaming model.

For Gaussian streaming model, please refer to Beth & White (2011):

http://adsabs.harvard.edu/abs/2011MNRAS.417.1913R

For the “wedge” statistcis, you may find it in, such as,

http://adsabs.harvard.edu/abs/2011MNRAS.414..596W

Input

Parameter file

The GSRSD code uses a parameter file to specify the parameters. There is an example of parameter file (“par.txt”) in the GSRSD folder. You can modify the parameter file (e.g. adjust the values or the sequence of the keys), but please leave the header “CORR_FUNC” and “Init” intact.

Some explanations:

Key Value
fb11b20 $\langle F’ \rangle$
fb10b21 $\langle F” \rangle$
fb11b21 $\langle F’ \rangle \langle F” \rangle$
fb12b20 $\langle F’ \rangle^2$
fb10b22 $\langle F” \rangle^2$
sigma_p_100 The value of $σ^2_\parallel$ at $100\ \mathrm{Mpc\ h}^{-1}$
s_max Maximum separation in the redshift-space
s_min Minimum separation
s_bin Number of data points between s_min and s_max
wedge_bin Number of data points for the “wedge” statistics
y_spanning The integration range of y (see Beth and White 2011)
dy The integration step of y
f_v Structure growth rate, $(\mathrm{d} log D / \mathrm{d} log a)$
xi_file_name Path to the input file: real-space $ξ$
v_file_name Path to the input file: real-space $v_{12}$
s_file_name Path to the input file: real-space velocity dispersion
out_file_name Path to the output file
n_thread Number of threads that you will be using. If negative or missing, the number
of threads will be determined by the env variable $OMP_NUM_THREADS

The wedge statistics will be given by “<out_file_name>_wedge”, 2-D plot by “<out_file_name>_2d”, and some appendices will be given in “<out_file_name>_appendix”.

“fb1*b2*” are separately specified for the convenience of cross-correlation.

Run!

Similar to the CLPT code… E.g.:

$ ./xi_stream.exe par.txt

Output

<out_file_name>

All for biased tracers…

Column Value
1 $s$ (redshift-space separation, in $\mathrm{Mpc\ h}^{-1}$)
2 $ξ^s_0$ (monopole)
3 $ξ^s_2$ (quadrupole)
4 $ξ^s_4$ (hexadecapole)

<out_file_name>_appendix

All for biased tracers…

Column Value
1 $r$ (real-space separation, in $\mathrm{Mpc\ h}^{-1}$)
2 $ξ_L(r)$ (linear real-space correlation)
3 $ξ(r)$ (real-space correlation)
4 $v_L(r)$ (linear real-space pairwise infall velocity, in $a H(a) f_v$ )
5 $v(r)$ (real-space pairwise infall velocity )
6 $σ^2_p(s)$ (real-space velocity dispersion: parallel component, in $(a H(a) f_v)^2 )$
7 $σ^2_v(s)$ (real-space velocity dispersion: perpandicular component)

<out_file_name>_wedge

All for biased tracers…

Column Value
1 $s$ (redshift-space separation in $\mathrm{Mpc\ h}^{-1}$)
Following “Wedges”

<out_file_name>_2d

All for biased tracers…

Column Value
1 $s$ (redshift-space separation in \mathrm{Mpc\ h}^{-1})
2 $μ$ (the cosine of the angle between LOS and separation)
3 $ξ^s(s,μ)$

About

Convolution Lagrangian Perturbation Theory (CLPT) and Gaussian Streaming Redshift-Space Distortions (GSRSD)

License:GNU General Public License v3.0


Languages

Language:C++ 91.5%Language:C 6.2%Language:Makefile 2.3%