Home Publications Research Codes Talks CV Notes Gallery Links

FREmu Documentation

FREmu

Overview

FREmu is designed to predict the non-linear power spectrum of large-scale structures in the universe using neural networks. It provides functionalities to set cosmological parameters, retrieve power spectra, boost factors, and error estimates.

Installation

pip install fremu

Usage

from fremu import fremu

# Initialize the emulator
emu = fremu.emulator()

Set Cosmological Parameters

# Set cosmological parameters
emu.set_cosmo(Om=0.3, Ob=0.05, h=0.7, ns=1.0, sigma8=0.8, mnu=0.05, fR0=-3e-5)

Get Power Spectrum

# Get power spectrum at redshift z and wave numbers k
power_spectrum = emu.get_power_spectrum(k=k_values, z=0.5)

Get Boost

# Get boost factor at redshift z and wave numbers k
boost_factor = emu.get_boost(k=k_values, z=0.5)

Get Error Estimate

# Get error estimate at wave number k (experimental)
error_estimate = emu.get_error(k=0.1)

Methods: emulator

get_k_values()

Get the wavenumbers used in the emulator.

set_cosmo(Om=0.3, Ob=0.05, h=0.7, ns=1.0, sigma8=0.8, mnu=0.05, fR0=-3e-5, redshifts=[3.0,2.0,1.0,0.5,0.0])

Set the cosmological parameters for the emulator.

get_boost(k=None, z=None, to_linear=False, return_k_values=False)

Get the boost factor for given wavenumbers and redshift.

get_power_spectrum(k=None, z=None, return_k_values=False, get_fid=False)

Get the power spectrum for given wavenumbers and redshift.

get_error(k=None)

Get the error for given wavenumbers (experimental).

Notes