# wll745881210/CLPT_GSRSD

Convolution Lagrangian Perturbation Theory (CLPT) and Gaussian Streaming Redshift-Space Distortions (GSRSD)
C++ C Makefile
Switch branches/tags
Nothing to show
Latest commit bae1e80 May 29, 2015
 Failed to load latest commit information. CLPT May 29, 2015 GSRSD May 29, 2015 data May 29, 2015 .gitignore May 29, 2015 LICENSE.md May 22, 2015 README.html May 29, 2015 README.org May 29, 2015

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

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:

## 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.

## 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:

KeyValue
r_maxMaximum value of real-space separation that is calculated
r_minMinimum value of real-space separation
r_bin_numNumber of data points between r_min and r_max
pow_spec_filePath to the input file: Linear power spectrum
xi_filePath to the output file: real-space $ξ(r)$
v12_filePath to the output file: real-space pairwise infall velocity
s12_filePath to the output file: real-space pairwise velocity dispersion
k_inputIf 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_outputThe path for the $k$-function output file.
q_inputSimilar to “k_input”. Note: Functions of q depend on functions of $k$
q_outputSimilar to “k_output”.
n_threadNumber of threads that you will be using. If negative or missing, the number

## 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

ColumnValue
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.

ColumnValue
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

ColumnValue
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):

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

## 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:

KeyValue
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_100The value of $σ^2_\parallel$ at $100\ \mathrm{Mpc\ h}^{-1}$
s_maxMaximum separation in the redshift-space
s_minMinimum separation
s_binNumber of data points between s_min and s_max
wedge_binNumber of data points for the “wedge” statistics
y_spanningThe integration range of y (see Beth and White 2011)
dyThe integration step of y
f_vStructure growth rate, $(\mathrm{d} log D / \mathrm{d} log a)$
xi_file_namePath to the input file: real-space $ξ$
v_file_namePath to the input file: real-space $v_{12}$
s_file_namePath to the input file: real-space velocity dispersion
out_file_namePath to the output file
n_threadNumber of threads that you will be using. If negative or missing, the number

## Output

### <out_file_name>

All for biased tracers…

ColumnValue
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…

ColumnValue
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…

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

### <out_file_name>_2d

All for biased tracers…

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