Nonparametric reconstructions of dynamical dark energy using flexknots
收藏资源简介:
This repository contains the nested sampling chains and python code for the papers "Nonparametric reconstructions of dynamical dark energy via flexknots" arXiv:2503.08658 and "Comparison of dynamical dark energy with ΛCDM in light of DESI DR2" arXiv:2503.17342. Python code The code is not intended as a "pip installable" package to run immediately, but as a starting point to guide future work.The flexknot package contains convenience functions which are used in this code, which would not be required for work which does not use flexknots. common.py contains run() which wraps the pypolychord.run() function, and is used in desi.py, pantheon.py, des5y and desi_des5y.py.desi.py demonstrates how to construct a BAO likelihood from the DESI DR1 data using cosmological distance calculations imported from distances.py. As the supernova datasets require more preparation, common work is contained in ia.py.desi_des5y.py demonstrates how to use BAO and SNe data together. NOTE: The luminosity distance calculation relies on the supernovae being sorted in z_HD, which DES5Y is not by default (see des5y.py, remember to also sort the covariance matrix). Take care when using other SNe datasets. Nested sampling chains The chains directory contains a subset of the files produced by PolyChordLite, sufficient for post-processing with anesthetic.More detail on the contents of each of the files can be found in the PolyChordLite README. For example, the ΛCDM chains for DESI DR2 could be read as follows: from anesthetic import read_chains from anesthetic.samples import merge_samples_weighted lcdm = read_chains("chains/desidr2/desidr2_lcdm") flexknot = merge_samples_weighted([read_chains(f"chains/desidr2/desidr2_{i}") for i in range(1, 21)]) where merge_samples_weighted is used to combine the twenty chains from PolyChordLite into a single set of samples.



