Welcome to the matryoshka documentation

matryoshka is a Python package for predicting the galaxy power spectrum with a neural network (NN) based emulator.

Installation

The package can be installed by cloning the repository and using pip:

git clone https://github.com/JDonaldM/Matryoshka.git
cd Matryoshka
pip install -e .

The repository contains the directory matryoshka-data which contains all the weights for the NNs along with the data used to train them.

Basic Usage

The example below shows how to generate a prediction for a Planck18 LCDM transfer function using matryoshka.

import numpy as np
import matryoshka.emulator as Matry
from astropy.cosmology import Planck18

COSMO = np.array([
        Planck18.Om0,
        Planck18.Ob0,
        Planck18.H0.value/100,
        Planck18.Neff,
        -1.0
])

TransferEmu = Matry.Transfer()

EmuPred = TransferEmu.emu_predict(COSMO)

See the Examples page for further example usage of matryoshka, and see API Reference for a comprehensive user manual.

New in v0.2.0

In this version of matryoshka we include an emulator for predicicting multipoles of the power spectrum that would be calculated using the EFTofLSS method. This EFT emulator provides a roughly 500X speed up compared to the EFTofLSS code PyBird, and prodcues predictions that are accurate withing 1% (at 68%CI).

New in v0.1.0

In the most recent version of matryoshka we have included an emulator to predict the nonlinear boost for the matter power spectrum that has been trained on the Quijote simulations. We also include a version of the transfer function emulator that has been trained on the Quijote sample space.

License & Attribution

Copyright 2021 Jamie Donald-McCann. matryoshka is free to use under the MIT license, if you find it useful for your research please cite Donald-McCann et al. (2021).