Skip to main content

Generalised framework for emulating spectral signals.

Project description

astroemu — Next Generation Emulators for Cosmology and Astrophysics

version docs license

Under active development — interfaces may change between versions.

astroemu is a generalised framework for emulating spectral signals in cosmology and astrophysics, inspired by the globalemu package. Neural network emulators are implemented in JAX, with an optax-based training loop and PyTorch-style dataloaders.

Installation

pip install astroemu

How it works

The core idea (shared with globalemu) is to input independent variables alongside physical model parameters, predicting a single spectral value per call. Full spectra are recovered via a vectorised call over all $x$ points.

Given a signal $y = f(x, \theta)$ with $N$ parameter samples and $m$ independent variable points, the training data is tiled so that parameters and independent variables are concatenated as inputs:

Input Output
$[\theta_0,\ x_0]$ $y_0$
$[\theta_0,\ x_1]$ $y_1$
$[\theta_0,\ \ldots]$ $\ldots$
$[\theta_0,\ x_m]$ $y_m$
$[\ldots,\ \ldots]$ $\ldots$
$[\theta_N,\ x_m]$ $y_m$

For more details see the globalemu paper. A paper demonstrating applications of astroemu to a broad range of astrophysical signals is in preparation.

Documentation

git clone git@github.com:htjb/astroemu.git
pip install ".[docs]"
mkdocs serve

or browse the hosted docs at astroemu.readthedocs.io.

Contributions

Contributions are welcome! Please open an issue to discuss and read the contribution guidelines before submitting a pull request.

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

astroemu-0.4.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

astroemu-0.4.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file astroemu-0.4.0.tar.gz.

File metadata

  • Download URL: astroemu-0.4.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for astroemu-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a943b77d147688762fb2cfbba65356d8a3ee157cc58afd85c2f965bb043e2cf6
MD5 7f677f6373883866285514393ea83be6
BLAKE2b-256 a5e33518c4c7dc5d7377a6ae74b29f6c94f892c08f7dcf26618d717313dbfd19

See more details on using hashes here.

File details

Details for the file astroemu-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: astroemu-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for astroemu-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1caf4d28014dce203363c25646d27d71796c3d171315748fd1da9bc245284bbd
MD5 9e4ab7572e2bff92696ca93fdc74267c
BLAKE2b-256 627b603d16a5b31f2c7c25e6e80d9b739a94d870babbb296cd14721978404667

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