Written by Beth Reid.
This is a copy of the SVN product originally released through the SDSS3 collaboration: http://www.sdss3.org/svn/repo/cosmoxi2d/
This code numerically evaluates the model described in detail in Reid and White 2011 (arxiv:1105.4165) and Reid et al. 2012 (arxiv:1203.6641) for the multipole moments (up to ell = 4) for the observed redshift space correlation function of biased tracers as a function of cosmological (though an input linear matter power spectrum, growth rate f, and Alcock-Paczynski geometric factors alphaperp and alphapar) as well as nuisance parameters describing the tracers (bias and small scale additive velocity dispersion, isotropicdisp1d).
Many caveats regarding the accuracy of this code at reproducing N-body halo clustering results are described in the papers mentioned above. Briefly, our theoretical model works best for highly biased tracers where the 2nd order bias term is small. On scales larger than 100 Mpc, the code relies on 2nd order Lagrangian Perturbation theory as detailed in Matsubara 2008 (PRD 78, 083519), and uses the analytic version of Reid and White 2011 on smaller scales.
=============================================================================== Downloading and compiling
This code requires the GNU scientific library (GSL) and has been tested on v1.14. In what follows below, GSL_DIR refers to the top-level directory where GSL is installed. For example, if the GSL libraries are in /usr/local/lib, then GSL_DIR=/usr/local.
If you have sdss3tools installed, this product may be installed with sdss3install. If you are using this method, make sure GSL is already installed in your EUPS system.
If you are installing manually, follow the instructions below.
The code may be obtained from:
svn export http://www.sdss3.org/svn/repo/cosmoxi2d/tags/1.0 cosmoxi2d-1.0
After you have obtained the code, cd to the directory containing the code.
If you use bash:
$ export COSMOXI2D_DIR=$(pwd) $ export GSL_DIR=/usr/local $ make
If you use tcsh:
pwdsetenv GSL_DIR /usr/local make
If the 'make' is successfull, the cosmoxi2d executable will appear in the bin directory.
Various parameters are specified in a parameters file. Two example files are provided in the examples directory.
To run the examples, type
bin/cosmoxi2d examples/p6new.params bin/cosmoxi2d examples/p6bestfitBOSSDR9.params
The prediction for xi multipoles are output in the file you specified in the params file. Compare with the expected output in p6iso21.xi024.true and p6bestfitBOSSDR9.xi024.true. Difference in the last few digits are expected.
=============================================================================== Important details
- The internal units of cosmoxi2d are in Mpc, while the units in the input power spectrum are assumed to be with k in h/Mpc and P(k) in units of (Mpc/h)^3, consistent with the output of camb. You must specify the value of h you assumed to compute P(k) in the paramter 'pkhval' in the paramter file. The bins in which the theory correlation function is computed are specified in units of Mpc, so you need to do some bookkeeping yourself if you integrate this code into an MCMC. The best way to account for your fiducial choice of h (in order to specify observed correlation function bins in Mpc) is through the Alcock-Paczynski parameters alphaperp and alphapar.
=============================================================================== Input parameters
-- 'ptcalcopt' Calculation of the relevant perturbation theory integrals is one of the slowest portions of the code; if you are working a fixed input linear matter power spectrum and fixed 'pkampscale', these integrals only need to be output once. 0: read both PT integral sets from input files ('qrintsfname' and 'sptvelfname') 1: compute sptvel integrals, read qr integrals 2: compute qr integrals, read spt integrals 3: compute both spt and qr integrals (output to 'qrintsfname' and 'sptvelfname' for later use)
-- 'pklinfname' This is the data file containing the input linear matter power spectrum (generated by, e.g., camb) at the redshift of interest. Column 1 is k in (h/Mpc), Column 2 is P(k) in (Mpc/h)^3. This will be converted to Mpc^-1 and (Mpc)^3 units within the code using the parameter 'pkhval'; this must be properly specified to agree with the input linear matter power spectrum if you want the BAO to show up in the right place!
-- 'pkhval' Value of h used to compute P(k) in pklinfname. If your k,P(k) is already in pure Mpc units, set this to 1.
-- 'pkampscale' For your convenience, use this parameter to rescale the input linear power spectrum. If you want the second order corrections to be correct, all the PT integrals should we recomputed with 'ptcalcopt' set to 3.
-- 'qrintsfname' If ptcalcopt = 0 or 1, this specifies the file containing the PT qr integrals to read from. If ptcalcopt = 2 or 3, the code computes the qr integrals and outputs them to this file.
-- 'sptvelfname' If ptcalcopt = 0 or 2, this specifies the file containing the PT sptvel integrals to read from. If ptcalcopt = 1 or 3, the code computes the sptvel integrals and outputs them to this file.
-- 'bias' The Eulerian bias of your tracer for which you wish to predict the correlation function. Eulerian bias = 1 + Lagrangian bias.
-- 'fvel' Logarithmic growth rate d ln D/ d ln a. This specifies the amplitude of the redshift space distortions where beta = fvel/bias. This should be evaluated in the same cosmological model at the same redshift as your input power spectrum.
-- 'isotropicdisp1d' Additive constant contribution (in units of Mpc^2!!) to the pairwise velocity dispersion; the same constant is added to the dispersion perpendicular and along the pair separation vector.
-- 'xi024outfname' File name where the predicted correlation function is written. The first five lines give values of all relevant parameters used to compute the correlation function. Columns are bin center (Mpc), xi0, [xi2, xi4, ...]. The number of columns is determined by ellmax.
-- 'alphaperp' and 'alphapar' These parameters convert the correlation function in your cosmological model to be tested to the one predicted given the cosmological parameters you used to convert the observed angles and redshifts to comoving distances. Confusingly, the parameters in the code are inverses of the parameters with the same name defined in Eqn. 14 of Reid et al. 2012. BE WARNED! If the cosmological model to be tested has angular diameter distance DA(z) and expansion rate H(z) at the redshift of interest, and the cosmological model used to compute the observed correlation function had DAfid(z) and Hfid(z), set
alphaperp = DA(z)/DAfid(z) and alphapar = Hfid(z)/H(z)
where z is also the redshift at which you evaluate the input power spectrum.
-- 'deltasfine' Intermediate versions of xi are computed with spacing deltasfine (2.0) and then subsequently splined. Larger values should make the code run faster but convergence of all quantities of interest should be carefully checked.
-- 'databinfile' This file describes the bins in which to compute the theory correlation function. The columns are central, minimum, and maximum redshift space pair separations to include in the bin. The units are in Mpc (!!) AMHERE, IS HFID needed??
-- 'ellmax' Maximum multipole to compute; code is faster for lower values of ellmax. Allowed values are 0,2,4.