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.0.tar.gz (46.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.0-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spectracles-0.6.0.tar.gz
  • Upload date:
  • Size: 46.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.0.tar.gz
Algorithm Hash digest
SHA256 7d174ccf200f57ab10d6241ef3f084a9dc6f9dead70ac6d8ae56e2f252ba9faa
MD5 b24b6ff75a715952e6f6ca86036f6a9a
BLAKE2b-256 33920a6689db24ae4ae25510327830a758f6d0e1bc35f523203bf8848043e7a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracles-0.6.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: spectracles-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 58.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b294197f8890e911384ef9c7104de7ab6adb21be2f8f3fd38ddcc23cdf8f26ec
MD5 5eba4e90c8c20201c9a11a01171fd054
BLAKE2b-256 fe0c2598bf966942ce3a9c335e49601902faeb0921ce74c842217a7131089f04

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracles-0.6.0-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