Skip to main content

Unified spectrospatial models: glasses for your spectra.

Project description

Tests Coverage PyPI Python Docs


spectracles

Unified spectrospatial models for integral field spectroscopy in JAX

Glasses for your spectra

Spectracles is a Python library for inferring properties of IFU/IFS spectra as continuous functions of sky position.

It can also be used as a general-purpose statistical model library that extends equinox to allow for composable models that may have coupled parameters. It also implements some other nice features that are a bit awkward in equinox out of the box, like easily updating model parameters between fixed and varying.

Installation

From PyPI with pip:

pip install spectracles

Or with uv (recommended):

uv add spectracles

From source:

git clone git@github.com:TomHilder/spectracles.git
cd spectracles
pip install -e .

Note: fftw must be installed or the dependency jax-finufft will fail to build.

Features

  • Parameter sharing - Couple parameters across model components
  • Declarative optimization schedules - Specify which parameters are free/fixed per phase
  • Glob patterns - Use wildcards like "gp.kernel.*" to match parameters
  • JAX integration - Built on equinox, fully compatible with JAX transformations
  • Rich output - Pretty-printed model trees and gradient diagnostics

Documentation

Full documentation: tomhilder.github.io/spectracles

Citation

Coming soon.

License

MIT

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

spectracles-0.6.3.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

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

spectracles-0.6.3-py3-none-any.whl (59.8 kB view details)

Uploaded Python 3

File details

Details for the file spectracles-0.6.3.tar.gz.

File metadata

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

File hashes

Hashes for spectracles-0.6.3.tar.gz
Algorithm Hash digest
SHA256 f840dafc1885ce361880082f40d277d73af109078d7f88db3d1e0ad99b2667c1
MD5 74bfd420c57579262d98e65328fcb7e4
BLAKE2b-256 c4a007f9a9dcb18a9fe8163a1a26de775868fe94bca8ce3ea1962475e2715456

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracles-0.6.3.tar.gz:

Publisher: release.yml on TomHilder/spectracles

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

File details

Details for the file spectracles-0.6.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for spectracles-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8261ea9062e133f677b870e5f3783af5c1fe43ed1bc474c77d91ef60dc8ed64b
MD5 9271f743688b6c939e9c4f159f407062
BLAKE2b-256 879306c0340ab98dd94b116b9cf39febc9f7d898fcf05ebf45b94e15a20a6cfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracles-0.6.3-py3-none-any.whl:

Publisher: release.yml on TomHilder/spectracles

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