Correlation functions versus field-level inference in cosmology: example with log-normal fields
This is a companion repository to Leclercq & Heavens 2021, On the accuracy and precision of correlation functions and field-level inference in cosmology, arXiv:2103.04158.
The code contains a python library for log-normal fields, libLN.py and two example configuration files: config_10.py (alpha=1.0, beta=0.5) and config_02.py (alpha=0.2, beta=0.5). The main part of the code is split into several Jupyter notebooks:
- Inference_LBA.ipynb: likelihood-based analysis of the two-point correlation function (section 3 in Leclercq & Heavens 2021)
- Inference_SBI.ipynb: simulation-based inference using the two-point correlation function (section 4 in Leclercq & Heavens 2021)
- Inference_DA_*.ipynb: field-level inference with data assimilation (section 5 in Leclercq & Heavens 2021)
- Fisher_forecasts.ipynb: Fisher forecasts for the the two-point correlation function and field-level analyses (appendices E and F in Leclercq & Heavens 2021)
- Plots.ipynb: code to produce the plots of the paper, and some more
The raw data (pools of simulations for simulation-based inference and Markov Chains for data assimilation) are not stored in this repository due to their large size. They are available upon reasonable request to the corresponding author.
In addition to usual python packages such as numpy, scipy, matplotlib, pickle, the code has the following dependencies:
- pydelfi and ELFI for simulation-based inference (Inference_SBI.ipynb)
- pymc3 for data assimilation (Inference_DA_*.ipynb)
- Florent Leclercq, florent.leclercq@polytechnique.org
- Alan Heavens
To acknowledge the use of this software, please cite the paper Leclercq & Heavens (2021):
On the accuracy and precision of correlation functions and field-level inference in cosmology
F. Leclercq, A. Heavens
arXiv:2103.04158 [astro-ph.CO] [ADS] [pdf]
@ARTICLE{correlations_vs_field,
author = {{Leclercq}, Florent and {Heavens}, Alan},
title = "{On the accuracy and precision of correlation functions and field-level inference in cosmology}",
journal = {arXiv e-prints},
keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics, Statistics - Applications},
year = 2021,
month = mar,
eid = {arXiv:2103.04158},
pages = {arXiv:2103.04158},
archivePrefix = {arXiv},
eprint = {2103.04158},
primaryClass = {astro-ph.CO},
adsurl = {https://ui.adsabs.harvard.edu/abs/2021arXiv210304158L},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
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. By downloading and using pySELFI, you agree to the LICENSE, distributed with the source code in a text file of the same name.