Skip to main content

framework for defining, building, and evaluating generalized shape observables for collider physics

Project description

SHAPER (v1.0.0)

SHAPER is a framework for defining, building, and evaluating generalized shape observables for collider physics, as defined in "SHAPER: Can You Hear the Shape of a Jet?" (arxiv:2302.12266). 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.

3-point-ellipsiness-plus-pileup_event_0

Pictured: Example of a custom jet algorithm, "3-(Ellipse+Point)iness+Pileup", as evaluated on an example top jet, as the SHAPER algorithm computes the value of the observable and optimal parameters.

The SHAPER framework contains::

  • Pre-built observables, including N-subjettiness and isotropy.
  • Novel pre-built observables and jet algorithms for finding ring, disk, or ellipse-like jets, with optional centers for collinear radiation and optional pileup radiation
  • Modules for defining arbitrary shape observables using parameterized manifolds, and building new complex observables from old ones.
  • Modules for evaluating defined shape observables on event data, using the Sinkhorn divergence approximation of the Wasserstein metric. This returns both the shape value ("shapiness") and the optimal shape parameters.
  • Modules for visualizing shape observables and their optimization, as in the GIF above.

Installation

From this repository locally

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

python -m pip install numpy torch  # c.f. https://github.com/jeanfeydy/geomloss/issues/69
python -m pip install .
# python -m pip install --upgrade '.[all]'  # for all extras

From GitHub

In your Python environment run

python -m pip install numpy torch  # c.f. https://github.com/jeanfeydy/geomloss/issues/69
python -m pip install "pyshaper @ git+https://github.com/rikab/shaper.git"
# python -m pip install --upgrade "pyshaper[all] @ git+https://github.com/rikab/shaper.git"  # for all extras

Example Usage

For an example of how to use SHAPER, see the notebook examples/example.ipynb. This notebook contains example code for loading data, using pre-built shape observables, defining custom shape observables, running the SHAPER algorithm to evaluate these observables, and making plots.

Dependencies

To use SHAPER, the following packages must be installed as prerequisites:

  • PyTorch: A standard tensor operation library.
  • GeomLoss: A library for optimal transport.
  • pyjet: A package for jet clustering, needed for default observable definitions.
  • Energyflow: A suite of particle physics tools. This package is OPTIONAL; however, many of the example datasets within SHAPER require this package to load. Not necessary if you provide and format your own data. Included as part of the 'energyflow' extra.
  • imageio: An image manipulation package. Needed for automatic gif creation -- not needed otherwise. Included as part of the 'viz' extra.
  • Standard python packages: numpy, scipy, matplotlib

Citation

If you use SHAPER, please cite:

 @article{Ba:2023hix,
author = "Ba, Demba and Dogra, Akshunna S. and Gambhir, Rikab and Tasissa, Abiy and Thaler, Jesse",
title = "{SHAPER: Can You Hear the Shape of a Jet?}",
eprint = "2302.12266",
archivePrefix = "arXiv",
primaryClass = "hep-ph",
reportNumber = "MIT-CTP 5535",
month = "2",
year = "2023"
}

Changelog

  • v1.0.0: 24 February 2023. Official public release.

Based on the work in "SHAPER: Can You Hear the Shape of a Jet?" (arxiv:2302.12266)

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

To discuss finer mathematical details (model convergence, optimization guarantees, etc), you may also contact Akshunna S. Dogra at adogra@nyu.edu

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

pyshaper-1.0.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

pyshaper-1.0.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file pyshaper-1.0.0.tar.gz.

File metadata

  • Download URL: pyshaper-1.0.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.3

File hashes

Hashes for pyshaper-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f4d8754c459d8b4f7350879ee0e735886e5f1d8f5f7c86aabe7c5beec5ae235a
MD5 1bf4118d9a0d638093667c752385b403
BLAKE2b-256 b708ec20ced50b77e278a5a012ba3abfc6fb208a54eddab28939ba9c9d5160ed

See more details on using hashes here.

File details

Details for the file pyshaper-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyshaper-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.3

File hashes

Hashes for pyshaper-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c27c2d1b9b2397f9aff659c0e551867597c20b75ebe38d3a6718ab5221adb2d
MD5 bc46d181d9143c6f4c6193e857dbf4d2
BLAKE2b-256 4db29eb305900fa0dec445389a953e9d5f95b3e7d18216763cfe41beec7a89d2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page