Skip to main content

Emulator for f(R) gravity

Project description


$\texttt{FREmu}$ offers fast and accurate predictions of non-linear power spectra for the specific Hu-Sawicki $f(R)$ gravity model. $\texttt{FREmu}$ employs principal component analysis and artificial neural networks to establish a parameter-to-power-spectrum map, with training data sourced from the Quijote-MG simulation suite. With a parameter space encompassing 7 dimensions, including $\Omega_m$, $\Omega_b$, $h$, $n_s$, $\sigma_8$, $M_{\nu}$, and $f_{R_0}$, the emulator achieves an accuracy better than 5% for the majority of cases and it's proved highly efficient for parameter constraints.

Installation

You can install $\texttt{FREmu}$ via pip:

pip install fremu

Usage

from fremu import fremu

# Initialize the emulator
emu = fremu.emulator()

# 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=-1e-5)

# Get power spectrum
k_values = emu.get_k_values()
power_spectrum = emu.get_power_spectrum(k=k_values, z=0.5)

# Get boost factor
boost_factor = emu.get_boost(k=k_values, z=0.5)

Documentation

You can find the documentation of the emulator here: FREmu documentation.

Contributing

If you find any issues or have any suggestions for improvement, feel free to submit an issue or pull request on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fremu-0.0.9-py3-none-any.whl (866.5 kB view details)

Uploaded Python 3

File details

Details for the file fremu-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: fremu-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 866.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for fremu-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 fd338bbad8e7a70d4807941d370fad068c59410d65abc72726abfb85fb112c4a
MD5 d69ae769ae2f837bdcdeac9bcdb789b8
BLAKE2b-256 53b422f54561d0258a2258899a173d52730e398040080da602e8607201a37889

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page