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 (which must be absolute). 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 is inferred from the config is present in the metadata of the collider. Otherwise, must be provided as "proton" or "lead".--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, for instance, 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).
Collider metadata
The dashboard will work with or without a configuration file embedded as metadata in the collider json file. If the metadata is present, the dashboard will use it to infer the type of particles, the filling scheme path, etc. Otherwise, some data and tabs might not be available. Note that the filling scheme tab will be available if the filling scheme is provided as an argument, even if the metadata is not present.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for collider-dashboard 1.5.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| collider_dashboard-1.5.2.0.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| collider_dashboard-1.5.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.5 MB
Release files / collider_dashboard-1.5.2.0.tar.gz
| Download URL | collider_dashboard-1.5.2.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7408f26e4755e34eae343fd85c38e2a91e029f9cf26e2d97edc18348d30528bf
|
|
BLAKE2b-256 checksum How to use checksums |
c40af449d6d6e290b27f8e0aef6c834aea9fc1d880e18d96dfc70ee0b7cfa2fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.8.10 Linux/5.15.0-124-generic
|
Release files / collider_dashboard-1.5.2.0-py3-none-any.whl
| Download URL | collider_dashboard-1.5.2.0-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d01cc932860251646091cb7d5cfcb6e2dc7df7da2801e98a650c695c9f6e756
|
|
BLAKE2b-256 checksum How to use checksums |
e0f938ca2dd38f71b6b679640dd1225f8caf1542ed73cfad49d49e65e2bdd1c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.8.10 Linux/5.15.0-124-generic
|