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.1.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.1-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spectracles-0.6.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3dbac03f0ef91b4352a238982a5d1a268367bb23f7eed82085497b807b19a5b8
MD5 817e33d1903f6f6d60de3c85297b73e8
BLAKE2b-256 4d60f8fe3a438a3b763bddf16f8de4a44195577f3dc6df780f6ddea4e1ee7cca

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: spectracles-0.6.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b032ce52d1e0648915b97c44a734c34c9d10c70760ba8e6bc05b0f9f4979cb29
MD5 6adfc474d11c72171bf44607efa6a044
BLAKE2b-256 9b23db94129f1ea74584bcc808ebbac77f2585b8bd85032495a53874b6ff4ed3

See more details on using hashes here.

Provenance

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