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

Metadata

Release files for specterpy 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for specterpy 1.2.0
File Size Uploaded
specterpy-1.2.0.tar.gz 903.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for specterpy 1.2.0
File Interpreter ABI Platform
specterpy-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / specterpy-1.2.0.tar.gz

Download URL specterpy-1.2.0.tar.gz
Size 903.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6da20490a0483f17b4aafecc3a64f43eb10fac3ec442e2cdda3af29db2bb2649
BLAKE2b-256 checksum
How to use checksums
64b8aaecd0fc43df829f31446345f0841b40b2526ba6cccb0dd5c8bf95a1bd8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / specterpy-1.2.0-py3-none-any.whl

Download URL specterpy-1.2.0-py3-none-any.whl
Size 909.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13789cba243ede3b1e5fd873d1c2c10b9c22b04dbf8513f3cc630067ccf26bb8
BLAKE2b-256 checksum
How to use checksums
2eb7186fe19351a9bb9c5d801626201c85ccc27df06550967c7df05722d980cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.6

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page