Skip to content
/ hdPk Public

CMB-HD Matter Power Spectrum and Non-CDM Forecast Code

License

Notifications You must be signed in to change notification settings

CMB-HD/hdPk

Repository files navigation

CMB-HD Matter Power Spectrum and Non-CDM Forecast Code

This repository contains the code used in the forecasts of MacInnis & Sehgal (2024). Please cite that work if you use this software or the associated data.

Installation

Requirements

To use this software, you must have Python (version >=3) installed, along with the following Python packages:

Installation instructions

Simply clone this repository and install with pip:

git clone https://github.com/CMB-HD/hdPk.git
cd hdPk
pip install . --user

Reproducing the plots and tables in MacInnis & Sehgal (2024)

We provide three Jupyter notebooks that can be run to reproduce the results of MacInnis & Sehgal (2024):

  • hd_lensing_snr.ipynb: Calculates the CMB-HD lensing SNR and reproduces the associated plot (Figure 6).
  • hd_pk_plot.ipynb: Reproduces the matter power spectrum plot (Figure 2).
  • hd_non_cdm_forecasts.ipynb: Reproduces the CMB-HD parameter forecasts for two dark matter models, each with or without baryonic feedback: cold dark matter (CDM-only) or warm dark matter (WDM-only).

Running new Fisher forecasts

The Jupyter notebook examples.ipynb provides general instructions along with various specific examples of how to run new Fisher forecasts. The python script run_examples.py can be used to run the examples in parallel with MPI, instead of inside the examples.ipynb notebook; see that notebook for instructions. The python file example_calculate_derivatives.py provides a more general "template" you can use as a guide, along with the instructions in examples.ipynb.

We provide the Python code used to calculate the power spectra and Fisher matrices used in MacInnis & Sehgal (2024) for CDM or WDM models, with or without baryonic feedback. We also provide an option to vary two parameters in our Fisher forecast that characterize the ampltide and slope of the kSZ power spectrum.

You may vary any additional parameters that can be passed to the CAMB set_params function.

There is also an option to provide your own non-CDM transfer function for the nonlinear matter power spectrum. This can be a single fixed function of wavenumber $k$ and redshift $z$, or it can depend on any number of parameters. In this case, you may also vary the additional parameters that your transfer function depends on (they do not necessarily need to be CAMB parameters). See the example in examples.ipynb for more information.

About

CMB-HD Matter Power Spectrum and Non-CDM Forecast Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages