Skip to main content

A Dash application to visualize the observables and parameters of a collider built and configured with Xsuite.

Project description

Collider Dashboard

A Dash application to visualize the observables and parameters of a collider built and configured with Xsuite.

Installation

The dashboard can be installed from PyPI with pip:

pip install collider-dashboard

This will install the required packages and build the application. If you haven't done it already, it is recommended to prebuild the Xsuite kernel to gain some computation time:

xsuite-prebuild regenerate

Usage

For personal usage, the simplest way to use the dashboard is to run the package as a development server from the command line, providing a few arguments:

python -m collider_dashboard --collider-path path_to_collider.json --filling-path path_to_scheme.json --port 8080 --force-reload --ignore-footprint --full-twiss --type-particles proton --debug
  • --collider-path, or -c, sets the path to the collider configuration file. Default value to the path of a dummy collider used for testing.
  • --filling-path, or -f, sets the path to the filling scheme, instead of using the one in the collider configuration file. Optional.
  • --port, or -p, sets the port on which the dashboard will be deployed. Default value to `8080``.
  • --force-reload, or -r, sets a boolean indicating whether the collider dashboard data should be reloaded if already existing. Optional.
  • --ignore-footprint, or -i, sets a boolean indicating whether the footprint should be ignored to gain computation time. Optional.
  • --full-twiss, or -t, sets a boolean indicating whether the Twiss/Survey tables should be computed fully (not removing duplicates and entry/exit elements), at the expense of computation time. Optional.
  • --type-particles, or -a, sets the type of particles to be used for the collider. Default value to proton.
  • --debug, or -d, sets a boolean indicating whether the dashboard should be run in debug mode. Optional.

After computing some temporary variables (this may take a while the first time), this will deploy a local server and open the dashboard in a browser window.

Alternatively, one can import the dashboard as a module and use it in a custom script:

# my-awesome-dashboard.py

from collider_dashboard import build_app
app, server = build_app(path_to_collider.json, 
                        path_scheme=path_to_scheme.json, 
                        port=8080, 
                        force_reload=False, 
                        ignore_footprint=False, 
                        debug = False, 
                        simplify_tw=True
                        type_particles='proton'
                )

The dashboard can then be deployed e.g. with gunicorn:

gunicorn my-awesome-dashboard:server -b :8080

Note that, as the dashboard deals with global variables, it is not thread-safe. It is therefore recommended to run it with a single worker (it's the case by default).

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

collider_dashboard-1.4.5.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

collider_dashboard-1.4.5.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file collider_dashboard-1.4.5.0.tar.gz.

File metadata

  • Download URL: collider_dashboard-1.4.5.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.10 Linux/5.15.0-124-generic

File hashes

Hashes for collider_dashboard-1.4.5.0.tar.gz
Algorithm Hash digest
SHA256 d0dd9672fb14424164cb0f4c825b67e8b24eb503f8bdcf9d94a1b4c4a4cb33f7
MD5 50b2f615394f82deae457991b93e72e7
BLAKE2b-256 c2b56c243c3d2eb79708acd49d815e03db454486160cd8ce472a2984d5c25b4f

See more details on using hashes here.

File details

Details for the file collider_dashboard-1.4.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for collider_dashboard-1.4.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da70754e5958a60dfc55b2a25cab6e520fca9d68447e856b6979bfefb3cfe171
MD5 1018cb5cc915593468bb0fd85aedfbe9
BLAKE2b-256 fb1f0e96255be823fa116ff1d5c6c4fa9ec98f477577d8141f55ddc35b87a1d7

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