Interactive Accelerator Timeline

This script allows you to interactively explore the accelerator data, either by running the script and viewing the plots in a browser, by running the script in interactive-mode e.g. in vscode or by checking the from this script generated gallery.

To run the script, make sure your environment has the requirements of requirements_interactive_charts.txt installed.

Preparations

Import modules and define plotting function. This code is omitted in the interactive gallery, so that you can immediately enjoy the interactive plots below. Check interactive.py for the full example code.

# No code to see here in the interactive gallery or the generated jupyter notebook.

Energy Timeline

fig_com = plot(data, EnergyConfiguration)


Luminosity timeline

fig_lumi = plot(data, LuminosityConfiguration)


Luminosity vs. Energy

fig_lumi_energy = plot(data, LuminosityOverEnergyConfiguration)


Save plots

Save the plots as PDF and PNG.

output_dir = Path("images")

plotly.io.write_image(fig_com, output_dir / "energy-plotly.pdf", format="pdf")
plotly.io.write_image(fig_com, output_dir / "energy-plotly.png", format="png")
plotly.io.write_image(fig_lumi, output_dir / "luminosity-plotly.pdf", format="pdf")
plotly.io.write_image(fig_lumi, output_dir / "luminosity-plotly.png", format="png")
plotly.io.write_image(fig_lumi_energy, output_dir / "luminosity-vs-energy-plotly.pdf", format="pdf")
plotly.io.write_image(fig_lumi_energy, output_dir / "luminosity-vs-energy-plotly.png", format="png")

Gallery generated by Sphinx-Gallery