Michigan State University
Python Programming and Applications for Accelerator Science and Engineering
This class is full.
Jeff Eldred and Adam Watts, Fermilab
TA: Brandon Cathey, Oak Ridge National Lab
Purpose and Audience
Computer programming has become an essential skill for laboratory physics, with applications including in instrumentation, control, data analysis, simulation, mathematics, and optimization.
In this course we will cover basic code writing in Python including the use of the matplotlib, numpy, sympy, scipy, and pandas packages. Accelerator applications will be emphasized in classroom examples. Student exercises will demonstrate mastery of basic code writing techniques, and there will be a final project of the student’s choice (with instructor approval).
This course is designed for graduate students, advanced undergraduates in physics and engineering, and professionals working on accelerator systems who want to gain more experience with programming.
Prerequisites
Courses in classical mechanics, special relativity, electrodynamics and mathematical methods for scientists and engineers at a senior undergraduate level or higher. Familiarity with accelerator science at the level of the USPAS course Fundamentals of Accelerator Physics and Technology with Simulations and Measurements Lab is encouraged but not required.
Prior programming experience with Python is not required. Although prior exposure to at least one programming language is highly encouraged.
It is the responsibility of the student to ensure that they meet the course prerequisites or have equivalent experience.
Objectives
On completion of this course, the students are expected to better understand the physical principles of the accelerator systems covered. Students will learn to execute and/or write Python scripts to analyze a variety of accelerator concepts. This will provide a firm basis to extrapolate what they learn to other accelerator systems after completion of the course.
Instructional Method
The course features morning and early afternoon lectures and examples on how to write code in Python. There will be three daily homework exercises to write code in Python, with homework graded and solutions presented the following afternoons. There will also be an individual final projects to write and present a detailed physics program. Students should bring their own laptop or tablet computer to the school to install Python and to access Jupyterhub servers.
Use of Github and git commands will also be demonstrated.
Course Content
Python coding exercises will cover (at least) the following methods: