- UNIX, Filesystems, Environments and the Python Ecosystem
- In this module we will familiarize students with the command line interface of computer operating systems, teach common unix commands, and discuss the installation of environments with Python, and where that is situated in the broader coding ecosystem.
- Discussion of the differences between CS and DS/astronomy analysis
- Pure Python Programming, Calculations, Variables, Datatypes and Scripts
- In this module, we introduce the basic python syntax, including variable declaration, basic mathematical operations, and the built-in datatypes (+numpy). We will transition from the iPython interpreter to standalone python scripts.3/
- Control flow, Loops, Program Logic, and an introduction to Libraries (astropy+matplotlib)
- In this module we will first expand the set of applications by discussing package imports (beyond numpy), including matplotlib and astropy. We will then use relevant examples from these packages to teach program logic and control flow (if/else, try/except) and looping (for/while).
- We will also take time here to discuss the parsing of error messages and how to debug errors in code.
- Functions and Functional Programming, Notebooks
- Using examples from astropy+matplotlib+numpy, we will introduce the creation of user-defined functions in Python, their benefits, and best practices for documentation, including type annotations.
- At this point, we will introduce the concept of jupyter notebooks, how they differ from standard scripts, and common pitfalls. We will provide a framework for development in notebooks by which functions are created and tested and then moved to a python module for import and use.
- Vectorization, Program Efficiency, and Final Project Introductions
- In this module we will discuss common programming pitfalls that lead to inefficient (slow) code, and we will formally introduce several methods to write code that will run as quickly as possible.
- We will also introduce the final projects and get students thinking about ideas.
- Working with Astrophysical Datasets (Loading, Analyzing, Fitting, Visualizing)
- In this module, we will discuss several different libraries (including pandas) in the context of loading and working with more complex astronomical data (beyond individual fits images or simple two column tables) and different file types (csv, fits, hdf5, json). Additionally, retrieving data from online servers and catalogs (e.g., astroquery and sql).
- We will discuss real statistical analyses one would apply to these data, and demonstrate several ways of carrying out model fits (e.g., with polyfit, spline fits, chi^2 grid searches, or mcmc).
- Finally, we will touch on more advanced plotting techniques for “publication” plots and figures which capture rich datasets.
Spring Break (end of regular seminar content/assignments)
- Introduction to Object Oriented Programming
- We return to introductory discussions of objects in python and the OOP paradigm of creating objects with methods and attributes. We will show how to create simple classes that may be useful to students. Note there is no explicit lab for this; students are working on their final projects in class.
- Introduction to Github and Version Control + Bonus Content
- We will introduce the students to the basic use of github for version control. This will in turn prepare them to upload their final projects to github.
- We have several “Bonus Content” Topics that we will allow the students to choose from during these last few weeks while the focus is on their final projects. There are no “regular” assignments for these weeks. Topics include:
- HTML/CSS and building a personal website
- LaTeX typesettings (for papers or homework)
- More OOP discussion
- Final Project Presentations
- Finally, we invite the students to present their final project demonstrations to the class. These projects represent several weeks of coding effort. Students are encouraged to choose any topic that interests them; we have had projects spanning the range from implementing a game like chess or battleship, to astronomy themed projects such as writing a simple integrator or simulating galaxy collisions. We will (potentially) be inviting the department at large to attend these presentations.