Skip to main content

JAX implementation of the Capse emulator.

Project description

jaxcapse

codecov arXiv

Repo containing the jaxcapse emulator.

Installation and usage

In order to install jaxcapse, you can just run

pip install jaxcapse

If you prefer to use the latest version from the repository, you can clone it, enter it, and run

pip install .

In order to use the emulators, you have to import jaxcapse and load a trained emulator

import jaxcapse
import jax.numpy as np
trained_emu = jaxcapse.load_emulator("/path/to/emu/")

Then you are good to! You have to create an input array and retrieve your calculation result

input_array = np.array([...]) #write in the relevant numbers
result = trained_emu.get_Cl(input_array)

For a more detailed explanation, check the tutorial in the notebooks folder, which also shows a comparison with the standard CAMB Boltzmann solver.

Citing

Free usage of the software in this repository is provided, given that you cite our release paper.

M. Bonici, F. Bianchini, J. Ruiz-Zapatero, Capse: efficient and auto-differentiable CMB power spectra emulation

Project details


Download files

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

Source Distribution

jaxcapse-0.1.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

jaxcapse-0.1.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file jaxcapse-0.1.2.tar.gz.

File metadata

  • Download URL: jaxcapse-0.1.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jaxcapse-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ed8ee4c50ea5784c29c387fa3587f7b11926bfedf2b55fdae881de03136a43b4
MD5 35fd1ff88e9b97ce8ea0e32a9c0f706b
BLAKE2b-256 ebf48a6b959ce03be26c993e24810cc7f12aaf142d43590c447a555be56a1381

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaxcapse-0.1.2.tar.gz:

Publisher: publish.yml on CosmologicalEmulators/jaxcapse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jaxcapse-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: jaxcapse-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jaxcapse-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ab29168dc961fdbe79f0cadd23954335cc25b7591a934bce9cedc62f59ec0c19
MD5 66b6fbdd0cbf6ce4c1e21f86889f688c
BLAKE2b-256 d9b245cf4dd6d63d75204c31431fd7f3be69793a1ce6f23919ef0511d3b35932

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaxcapse-0.1.2-py3-none-any.whl:

Publisher: publish.yml on CosmologicalEmulators/jaxcapse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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