Skip to main content

Interactively explore MADX lattices by tweaking lattice parameters and observing the effect on lattice functions.

Project description

This is an application to interactively visualize MADX lattices by tweaking corresponding lattice parameters and observing the effect on lattice functions such as Beta functions or the resulting orbit.

Installation

The application can be installed from the Python Package Index (PyPI):

pip install lattice-explorer

Usage

The application can be started by invoking the installed package from the command line:

python -m lattice_explorer <path-to-madx-file>

It requires a single argument which is a file path to the MADX file containing the lattice definition.

The application then spawns two windows, one containing the lattice plots and general control elements and the other containing specific control elements for the lattice parameters (e.g. kicker and quadrupole strength). Changing a lattice parameter in the controls window, automatically updates the plots in the other window.

The plot window contains options for toggling usage of BETA0 command, or activating aperture or envelope elements in the plot orbit canvas.

The option “Freeze” copies the current plots in either the Twiss or the Orbit canvas and diplays them as dashed lines. When lattice parameters are changed now, only the continuous lines change, and the dashed lines remain to indicate the previous lattice functions which helps to compare two settings.

Customization

The application can be customized by providing various parameters, an overview of which can be obtained via

python -m lattice_explorer --help

These parameters can be provided as optional arguments like the following:

python -m lattice_explorer <path-to-madx-file> --canvas-figsize-inches 9.6 4.8

Example Screenshots

The Plots Window:

https://gitlab.com/Dominik1123/lattice-explorer/-/raw/master/screenshot_plot_window.png?inline=false

The Controls Window:

https://gitlab.com/Dominik1123/lattice-explorer/-/raw/master/screenshot_controls_window.png?inline=false

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

lattice-explorer-1.0.tar.gz (12.0 kB view hashes)

Uploaded Source

Built Distribution

lattice_explorer-1.0-py3-none-any.whl (25.9 kB view hashes)

Uploaded Python 3

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