Skip to content

Configuration Space Covariances for Projected Galaxy 2-Point Statistics

License

Notifications You must be signed in to change notification settings

xfangcosmo/CosmoCov

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CosmoCov (Cibola Edition) ... for more complex covariances, please go to the CosmoCov_Saguaro_Edition repo

Xiao Fang, Elisabeth Krause, Tim Eifler

Configuration Space Covariances for Projected Galaxy 2-Point Statistics, built on CosmoLike. We provide a flat sky covariance module, computed with the 2D-FFTLog algorithm, and a curved sky covariance module. We also provide a response covariance module written by Alex Barreira and Elisabeth Krause.

The non-Gaussian (NG) covariances (including connected NG and super-sample covariance) are by default evaluated using halo model.

-> Papers to Cite

For more details, see CosmoCov_Notes.pdf.

Quick Guide

CosmoCov require a recent gcc compiler, as well as the gsl and FFTW libraries. To get started with computing covariances, follow the steps below:

  1. Clone this repository to the directory you like;

  2. Navigate to the covs directory and run command:

    $ make covs
  3. Several executables are created: cov_flat_fft is for the flat sky covariances (using 2D-FFTLog algorithm); cov is for the curved sky covariances (using Limber approximation for galaxy-galaxy lensing and cosmic shear angular spectra, but non-Limber for galaxy clustering angular spectra);

  4. As an exmaple, run command:

    $ ./cov 1 ini_files/cov_test_g.ini

    to compute the 1st block of the curved sky 3x2pt Gaussian covariance of the test example, specified by the ini file ini_files/cov_test_g.ini. The result of this block is output to the directory: output/out_cov_test.

  5. There are 66 blocks in total for the example run above. One can compute all of them by running command:

    $ for i in {1..66}; do ./cov $i ini_files/cov_test_g.ini; done

    or

    $ echo {1..66} | xargs -n 1 -I{} ./cov {} ini_files/cov_test_g.ini

    Warning: non-Gaussian covariances can take hours to compute for each block, so one may consider computing different blocks in parallel.

  6. After all the blocks are computed, you can make a plot of the precision matrix by first combining all the blocks and then running the provided plotting script plot.py:

    $ f="cov_test"; cat output/out_cov_test/t* > $f; python plot.py $f

    The combined covariance file is specified by variable f, and the plot (in .pdf) will be saved in the same directory.

Input

The ini files contain all the settings, including

  • Omega_m, Omega_v, sigma_8, n_spec, w0, wa, omb, h0: the cosmological parameters,

  • area: the survey area (in square degrees),

  • c_footprint_file: (optional) a footprint file containing the mask power spectrum, which is read-in in C_survey_window in cosmolike_core/theory/covariances_3D.c; note that the normalization of the power spectrum is automatically adjusted,

  • clustering_REDSHIFT_FILE, shear_REDSHIFT_FILE, lens_tomobins, source_tomobins, lens_n_gal, source_n_gal: the lens and source galaxy samples (file paths, the numbers of tomographic bins, the number densities in each bin). The redshift file has (number of tomo bin + 1) columns, in which the 1st column is the z_min of each z bin.

  • sigma_e: the total shape noise of the weak lensing measurement,

  • lens_tomogbias: the linear galaxy bias parameter of each lens galaxy bin,

  • lens_tomo_bmag: the magnification bias parameter of each lens galaxy bin (with b_mag described in Section 5.1.3 of Fang et al. (arXiv:1911.11947)),

  • IA: 0 or 1, the switch of running the intrinsic alignment NLA model,

  • A_ia, eta_ia: the parameters of the NLA model (see Eq. 4.9 of Fang et al. (arXiv:1911.11947), but with A_ia represented by a_IA in the equation),

  • oneplusz0_ia: 1+z_0 where z_0 is the pivot redshift for IA, usually set as the mean redshift of the source sample,

  • tmin, tmax, ntheta: min and max of the angles in arcmins, and the number of logarithmically spaced bins, specifying the binning of the angular correlation functions,

  • ng: 0 or 1, the switch of running the non-Gaussian covariances,

  • cng: 0 or 1, the switch of including the connected non-Gaussian contribution in the non-Gaussian computation,

  • outdir, filename, ss, ls, ll : the path and filename prefix of the output, the options of computing blocks of the covariance involving the shape-shape (ss), position-shape (ls), position-position (ll) angular correlation functions. Computing 3x2pt covariance means setting all of them as true,

  • linear_binning: 0 (default) or 1, the optional switch of computing covariances in linear angular binning, currently only supported in curved sky covariance routine,

  • full_tomo: 0 (default) or 1, the optional switch of including the full cross tomographic bin clustering correlations, rather than the default auto clustering correlations, currently only supported in curved sky covariance routine.

Output

The covariances will be output as separate blocks in output/out_cov_.../, with each block representing the covariance matrix of two 2-point functions. The header of each file contains a list of papers to be cited based on the module used.

The ordering of the data vector this covariance corresponds to is also output in various order_... files. The columns are

  • column 0: index i;

  • column 1: bin-averaged angular scale (in radians);

  • column 2: the type of the 2-point function w, gammat, xi+, xi-;

  • column 3, 4: the {s: source, l: lens} galaxy tomographic bin index 1 and 2.

The columns of each covariance block (in output/out_cov_.../) are

  • column 0, 1: matrix indices of the element in the full covariance matrix;

  • column 2, 3: the corresponding bin-averaged angular separations (in radians) of the element;

  • column 4, 5, 6, 7: the tomographic bins involved;

  • column 8, 9: the Gaussian part and the non-Gaussian part of the element. The total value is the sum of the two.

Papers to Cite

Please cite the following papers if you use covariances in your research:

  1. E. Krause, T. Eifler; CosmoLike - Cosmological Likelihood Analyses for Photometric Galaxy Surveys; arXiv:1601.05779

  2. X. Fang, T. Eifler, E. Krause; 2D-FFTLog: Efficient computation of real space covariance matrices for galaxy clustering and weak lensing; arXiv:2004.04833

In addition, if you use the the non-Limber galaxy clustering power spectra in the Gaussian covariance included in the curved sky covariance module, please also cite:

If you include an approximate shape/shot noise correction for survey geometry, which requires a power spectrum of the survey mask with sufficiently high resolution (see [Quick Guide]), please also cite:

If you calculate weak lensing covariances using the response model, including the non-Limber super-sample covariance (available for weak lensing only), please also cite:

A list of papers to be cited will be autogenerated based on the modules used, and printed in the header of each covariance file.

If you use the given DES Y3 ini files, they will assume public DES Y1 galaxy redshift distributions from http://desdr-server.ncsa.illinois.edu/despublic/y1a1_files/redshift_bins/y1_redshift_distributions_v1.fits

About

Configuration Space Covariances for Projected Galaxy 2-Point Statistics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.2%
  • Python 5.5%
  • Makefile 0.3%