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.2.tar.gz (47.1 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.2-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spectracles-0.6.2.tar.gz
  • Upload date:
  • Size: 47.1 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.2.tar.gz
Algorithm Hash digest
SHA256 73e3a6ac0af5f9cd16743c54c025c17ba75ee96847b0494d1015bd1db795d1b1
MD5 e430156e4f5cd79400ba9bd52a3aee73
BLAKE2b-256 1ef47a66514047bfe166f6e3cb9f4991be698e808d9cd0df257ad7e14d2bea9f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: spectracles-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 58.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da2f3a386ba15d29c228da3490ec630aa65efc7ae2171949e17bb2f9f2e6c7c0
MD5 2b286858836ae0edb96c8c12d041cf89
BLAKE2b-256 de496d7ddb3aa20f5bc81b6267384d56c3aad978b2de60d4d3de83f73265574e

See more details on using hashes here.

Provenance

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