Skip to content

This repository contains all material used during the python version of the Hands-On Lattice Calculations course at the CERN Accelerator School (CAS)

License

Notifications You must be signed in to change notification settings

cerncas/hands-on-lattice-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hands-On Lattice and Longitudinal Calculations - Python version

D. Gamba, A. Latina, T. Prebibaj, A. Poyet, G. Russo, F. Soubelet, G. Sterbini, V. Ziemann

During the CAS 2024 in Santa Susanna (Spain), we will be using Python as scripting languages for the Hands-On Lattice Calculation course.

This repository contains all material used during the the course. The repository is based on the material prepared and updated during previous courses by G. Sterbini, A. Latina, A. Poyet, CERN and V. Ziemann, Uppsala University.

Before to start, please make sure you have a working Python installation. You can find setup instruction in a dedicated repository. We kindly ask the student to read this document before coming to CAS to prepare yourself (and your laptop) for the course.

  • The *.ipynb notebooks will be the "canvas" used during the course. They contain all exercise with "incomplete" parts that the student will have to fill in. Solutions to all the exercises are also provided in solutions/*_solutions.ipynb. These notebooks are provided for the student convenience, but they are clearly not expected to be used before and/or during the course itself...
  • Additional Optional*.ipynb notebooks are also provided for who is fast and/or wants to explore deeper either some physics concepts or the phython implementation of our libraries.
  • The tracking_library*.py files contain simple functions to ease implementing simple tracking of particle in Python.

NOTE: the material in this repository is expected to evolve over time thanks to the feedback received from you! Please don't hesitate to transmit us your comments, suggestions, and complains!

NOTE 2: if you have troubles running those notebooks on your computer, you can also try to run them on Binder. Mind that in this case you loose your work, if you don't save the data later on to your computer!

Known schools using this material

Notes for the maintainer and presenter

Edit the material

The material is hosted on github under the cerncas organisation and mirrored (for backup purposes) to the CERN GitLab CAS group. One is expected to edit the material:

  1. from github directly using the github editor
  2. from one's computer cloning the repository, editing/adding/deleting the desired content, finally pushing the content to github

(CERN) GitLab vs GitHub

See article KB0003132 to learn about CERN policy. To setup a "Pull mirroring" on the CERN GitLab to retrieve a copy of GitHub repository, see the official documentation.

Create a pdf of an .md file

The typically suggested way is to use pandoc package:

pandoc Setup_Instructions.md -o Setup_Instructions.pdf

unfortunately, this doesn't work when you have HTML inside your .md file, as we presently have... A solution could be to use the Print extension for VisualStudio...

Update links to events

E.g. update all the links to CAS school event of the year using sed

sed -i -e 's/1117526\/contributions\/4978192/1356988\/contributions\/5713241/g' 01_Single_Particle_solutions.ipynb

During the course

The students are expected to download the whole repository on their computer, and open the various notebooks using Jupyter Lab. The presenter can also use Jupyter Lab and do the exercise with the students. To launch Jupyter Lab, move in a terminal to this folder and execute:

jupyter lab

One can also present 00_Introduction.ipynb in presentation mode:

jupyter nbconvert 00_Introduction.ipynb --to slides --post serve

Alternatively, one can:

  • create a html of the slides:
    jupyter nbconvert 00_Introduction.ipynb --to slides
  • create a pdf of the slides:
    conda install pandoc
    jupyter nbconvert 00_Introduction.ipynb --to pdf

About

This repository contains all material used during the python version of the Hands-On Lattice Calculations course at the CERN Accelerator School (CAS)

Topics

Resources

License

Stars

Watchers

Forks