Skip to main content

JAX implementation of AbstractCosmologicalEmulators.jl interface with artifact support

Project description

jaxace

Tests Documentation Documentation codecov

JAX/Flax implementation of cosmological emulators with automatic JIT compilation.

Installation

pip install -e .

Usage

import jaxace
import jax.numpy as jnp

# Cosmology
cosmo = jaxace.w0waCDMCosmology(
    ln10As=3.044, ns=0.9649, h=0.6736,
    omega_b=0.02237, omega_c=0.1200,
    m_nu=0.06, w0=-1.0, wa=0.0
)

# Background functions
z = jnp.array([0.0, 0.5, 1.0])
growth = jaxace.D_z_from_cosmo(z, cosmo)
distance = jaxace.r_z_from_cosmo(z, cosmo)

# Neural network emulator
emulator = jaxace.init_emulator(nn_dict, weights, jaxace.FlaxEmulator)
output = emulator(input_data)  # Auto-JIT + batch detection

Features

  • Background cosmology (growth, distances, Hubble)
  • Neural network emulators with auto-JIT
  • Massive neutrinos and dark energy support
  • Full JAX integration (grad, vmap, jit)

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

jaxace-0.5.0.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

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

jaxace-0.5.0-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file jaxace-0.5.0.tar.gz.

File metadata

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

File hashes

Hashes for jaxace-0.5.0.tar.gz
Algorithm Hash digest
SHA256 41981372aae6f7d21ca395ceb43a287d162c38469c225498cf0567ae458030d8
MD5 2498a7969fa4de562ed46ac958104d5f
BLAKE2b-256 8b6a6bed5c7c0435b1fdb77427517a5d636a5ea731b375d69c3e6a0ff9d12d89

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaxace-0.5.0.tar.gz:

Publisher: publish.yml on CosmologicalEmulators/jaxace

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

File details

Details for the file jaxace-0.5.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for jaxace-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e8908cff1b829a7466c5460a91505eb83a73563a13f66d6e07d733c7309b9fb
MD5 a3eb754fa309e714b8d60ca2780c3207
BLAKE2b-256 8a9ac1a6988bdfc254ac5fa913d4c5e1d7c165965bf4f0e29e526ed8e2cebdf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaxace-0.5.0-py3-none-any.whl:

Publisher: publish.yml on CosmologicalEmulators/jaxace

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