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, clone this repository, 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.1.tar.gz (4.2 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.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jaxcapse-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 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.1.tar.gz
Algorithm Hash digest
SHA256 58d5edc7d3cac59bd9bf4ce7c6163d87072f104aa7b7641da5ca8a695ef0110c
MD5 aef59827f0a690be4cc5d556426ee5b6
BLAKE2b-256 bb068a14b30499b870b8a8211da21dee27102bf939410bb6e5bbff5b86fc2695

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaxcapse-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: jaxcapse-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ab43490bb62f5ddb7d34295398145b4166a247f3e063dfec288de7cd0ea75fc
MD5 d60dd7eb7facc908d0385c60fedd0044
BLAKE2b-256 05ebad21272a36617a45afd2ba46b9805223d9a6296c05943c5ad1f609ba5a01

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaxcapse-0.1.1-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