Skip to main content

SPECTER (v1.0.0)

GitHub Project

PyPI version Supported Python versions

SPECTER is an implementation of the Spectral EMD (SEMD) and Spectral Shape Observables as outlined in "SPECTER: fficient Evaluation of the Spectral EMD" (arxiv:2410.2410.05379). This package can be used for evaluating an extremely large class of IRC-safe observables, with modules in place to define custom observables and jet algorithms using an intuitive geometric language. Compared to ordinary EMD methods, this package is extremely fast, precise, and accurate. The SEMD is first defined in (arxiv:2305.03751)[https://arxiv.org/abs/2305.03751].

Example Usage

Several end-to-end examples of how to use SPECTER can be found in the examples subfolder of this repository. This examples include computing pairwise SEMDs, computing spectral shape observables, and some basic image manipulation.

The code used to perform all of the studies in "SPECTER: fficient Evaluation of the Spectral EMD" (arxiv:2410.2410.05379) can be found in the studies subfolder.

Installation

From PyPI

In your Python environment run

python -m pip install specterpy

From this repository locally

In your Python environment from the top level of this repository run:

pip install -.

Dependencies

The primary dependencies are jax and jaxlib.

To install jax and jaxlib, run the following commands:

pip install --upgrade pip
pip install --upgrade jax jaxlib==0.1.69+cuda111 -f https://storage.googleapis.com/jax-releases/jax_releases.html

Many of the examples and studies depend on the ParticleLoader package for downloading particle physics datasets. However, this package is not necessary for general usage of SPECTER

Changelog

  • v1.2.0: 8 July 2026. Rewrote the spectral EMD evaluation as a direct sum over the monotone coupling: float32 precision improved by several orders of magnitude (self-distances now exactly zero), roughly 4x faster on GPU. Previous implementation kept as ds2_old. Added optional float64 mode via SPECTER(dtype=jax.numpy.float64). Fixed compatibility with jax >= 0.6.
  • v1.1.0: 13 May 2025. Added support for cylindrical metrics. Added support for unbalanced OT. Resolved bugs relating to zero-padding.
  • v1.0.0: 8 October 2024. Official public release.

Based on the work in "SPECTER: fficient Evaluation of the Spectral EMD" (arxiv:2410.XXXXX)

Bugs, Fixes, Ideas, or Questions? Contact me at rikab@mit.edu

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

specterpy-1.2.0.tar.gz (903.9 kB view details)

Uploaded Source

Built Distribution

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

specterpy-1.2.0-py3-none-any.whl (909.9 kB view details)

Uploaded Python 3

File details

Details for the file specterpy-1.2.0.tar.gz.

File metadata

  • Download URL: specterpy-1.2.0.tar.gz
  • Upload date:
  • Size: 903.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for specterpy-1.2.0.tar.gz
Algorithm Hash digest
SHA256 6da20490a0483f17b4aafecc3a64f43eb10fac3ec442e2cdda3af29db2bb2649
MD5 64d4c1a834de6580640c36eeba882aee
BLAKE2b-256 64b8aaecd0fc43df829f31446345f0841b40b2526ba6cccb0dd5c8bf95a1bd8f

See more details on using hashes here.

File details

Details for the file specterpy-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: specterpy-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 909.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for specterpy-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13789cba243ede3b1e5fd873d1c2c10b9c22b04dbf8513f3cc630067ccf26bb8
MD5 52f3fba9bd0a96c71e497d9f3678b402
BLAKE2b-256 2eb7186fe19351a9bb9c5d801626201c85ccc27df06550967c7df05722d980cd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 files

1.1.0

2 files

1.0.6

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page