June 6 - 9, 2023
Instructor: Alex Correia
Welcome to the Python Primer section of the SAO Fellowship Program! This series of notebooks should act as an introduction to scientific programming in Python in preparation for the rest of the summer. Over the course of the week we'll cover:
- Basic Python syntax
- Loops
- Functions
- Advanced arithmetic with
numpy
andscipy
- Python I/O with
pandas
- Data visualization with
matplotlib
- Error handling
- Home-brewing libraries
- If time allows: Symbolic math with
sympy
, object-oriented programming
There are two directories containing Jupyter Notebooks. All of the material I intend to cover is in here. The notebooks in lectures
give basic tutorials and examples on each aspect of Python I intend to cover, and will form the basis of the lectures I give. The notebooks in exercises
are sets of problems that apply the strategies outlined in the corresponding lectures. The third directory, files
, contains data files that I've compiled for use in later lectures. Feel free to look through these notebooks at your leisure, although you're by no means required to.
I've tried to tailor the content of this course to a STEM undergraduate who has no experience with Python but has a decent grasp on mathematical methods (mainly calculus concepts like integrals, derivatives, series, etc.). Some of the exercises also delve into specialized STEM topics, primarily in physics or astrophysics. I've tried my best to explain these concepts as thoroughly as possible, but don't worry if you come across a concept that you're unfamiliar with; I'll be happy to give more thorough explanations as needed.
There are twelve pairs of lectures and exercise sets total. My goal is to get through the first ten; we should get through the first eight at a minimum, and the last two contain more advanced/specialized material if we get through the rest quickly enough. My initial plan will be to present each lecture for no more than an hour, allowing the majority of each session for working on the exercises. Feel free during these working sessions to use your peers, myself, or the Internet (provided you don't copy and paste code naively) as guides. At the end of the day, this course is entirely for your benefit, and as such I'd be happy to amend this schedule to accommodate however you learn best.