An Introduction to Computing in Physics
Physics 298 owl, Spring 2018
Loomis 276, Thursday afternoons, 4 pm  5:50 pm
2 credit hours
Textbooks and so forth
There are no required texts for Physics 298owl. You should buy the course packet from the university bookstore, which should be available before the start of the semester. You must come to each class (including the first) with the course packet and a Windows or Mac OS laptop. You'll need to have a couple of gigabytes of available disk space for the firstday installation of the version of Python that we'll be using. Please be sure to bring your power adapter too.
I will have a handful of USB memory sticks for Mac and Windows machines to loan you the first day. They'll hold an installation package for Anaconda's python developer's environment, a folder of useful python scripts, and a PDF file of the course material.
You must buy the course packet at the bookstore. There isn't anything else you'll need to buy, but if you'd like a Python text (at a highly reduced price), consider picking up a copy of Hans Petter Langtangen, A Primer on Scientific Programming with Python, 5th ed. (2016). It is the required text for CS 101. Quoting from the CS 101 web site, "Please note that softcover copies are also available through Springer at a price much reduced relative to the hardcover edition. (You'll need to be on the campus network or log in via the library to see the offer.) An ebook is also available through the SpringerLink service, although we highly recommend acquiring a physical textbook."
Click here for the entire course packet and a folder of Python scripts (33 MB).
Syllabus

Unit 1 and homework (class #1; homework due at the start of class #2)
Using Python to generate numerical solutions to problems that are not suitable for analytic resolution.
Science: relativistic starship undergoing uniform proper acceleration; infinite series representations of π .
Programming: a simple model for what goes on inside a computer. An introduction to the Python programming language. Loops, variable types, arrays, conditionals, Spyder development environment.
Numerical methods: discrete sums as approximations to integrals of continuous functions.

Unit 2 and homework (class #2; homework due at the start of class #3)
Graphical representations of functions of one and two dimensions: a warmup to representations of spacetime curvature.
Science: a couple of functions relating to spacetime curvature.
Programming: software libraries, drawing curves and surfaces, graphing functions of one and two variables.
Numerical methods: more of the same.

Unit 3 and homework (class #3; homework due at the start of class #4)
Creating graphical representations of spacetime curvature.
Science: nonEuclidian geometry, spacetime curvature, Schwarzschild metric.
Programming: more of the same.
Numerical methods: more of the same.

Unit 4a and homework (class #4; homework due at the start of class #6)
Numerical integration of differential equations of motion 1.
Science: linear and nonlinear oscillators, phase space trajectories.
Programming: using the debugger.
Numerical methods: numerical integration of differential equations, accuracy vs. step size, comparison of first and higherorder methods.

Unit 4b and homework (class #5; homework due at the start of class #6)
Numerical integration of differential equations of motion 2.
Science: continuation of last unit.
Programming: continuation of last unit.
Numerical methods: continuation of last unit.

Unit 5 and homework (class #6; homework due at the start of class #7)
Relativistic corrections to GPS satellite clocks.
Science: relativistic corrections to GPS satellite clocks in elliptical orbits.
Programming: managing programs built from multiple functions in multiple files.
Numerical methods: numerical integration of differential equations in two dimensions.

Unit 6a and homework (class #7; homework due at the start of class #8)
Precision orbital dynamics 1: highly eccentric satellite orbits; general relativistic effects.
Science: general relativistic modifications to Newtonian gravitation, observable astronomical effects.
Programming: adaptive integration techniques.
Numerical methods: Extended precision variables and machine precision issues.

Unit 6b and homework (class #8; homework due at the start of class #9)
Precision orbital dynamics 2: general relativistic modifications to Keplerian orbits; effects of the other planets on Mercury's orbit.
Science: precession of Mercury's perihelion, planetary perturbation of the orbit.
Programming: More of the same.
Numerical methods: More of the same.

Unit 7 and homework (class #9; homework due at the start of class #10)
Searching for exoplanets.
Science: Identifying stars with planetary systems through periodic fluctuations in the Doppler shifts of stellar spectra.
Programming: file and data I/O.
Numerical methods: integral transforms.

Unit 8 and homework (class #10; homework due at the start of class #11)
Monte Carlo simulations 1: evaluating π and a warmup to simulating a particle physics experiment.
Science: introduction to particle physics phenomenology and Monte Carlo techniques.
Programming: histogramming, working with objects and class functions.
Numerical methods: random number generators, parameter spaces, volume integrals.

Unit 9 and homework (class #11; homework due at the start of class #12)
Monte Carlo simulations 2: there are two parallel paths for you to choose from. The first is
"Maximizing an experiment's geometrical acceptance and modeling its resolution"
(homework is here).
The second is
"Random walks and Markov chains"
(homework is here).
Science: Monte Carlo simulation of geometrical acceptance and experimental resolution in a twoparticle spectrometer OR Markov processes and Markov chains.
Programming: large codes, working with class functions and variables.
Numerical methods: Gaussian random number generators.

Unit 10 and homework (class #12; homework due at the start of class #13)
Monte Carlo simulations 3: once again, there are two parallel paths, which continue the work from the previous unit. The first is
"Extracting physics from experimental data"
(homework is here).
The second is
"Markov chain Monte Carlo in thermal physics"
(homework is here).
Science: exponential decay law; event reconstruction; experimental acceptance and resolution OR Markov chain Monte Carlo as a tool for modeling finitetemperature systems.
Programming: reading, writing binary files.
Numerical methods: an introduction to fitting of data.

Unit 11 and homework (class #13; homework due at the start of class #14)
Statistics, fitting, precision, and uncertainty.
Science: extracting physics from data.
Programming: multitasking when working with long execution times.
Numerical methods: binomial and Poisson distributions, chisquared tests, pizza studies.

Final exam
A workitsolo coding assignment that you'll do in class during the final class of the term.