Python Bootcamp

Python Bootcamp

I created a Python tuturial for the Cornell Department of Astronomy, 2024 REU program. It focused on practical Python usage for astronomy research.

This past summer I developed a Python Bootcamp for the 2024 Cornell Department of Astronomy REU program. Over two days I aimed to give a comprehensive, yet brief, overview of the most fundamental practices to become a proficient and readable programmer. I aimed to also provide the tools necessary to help the students overcome programming roadblocks and bottlenecks.

My bootcamp was heavily inspired by The Ohio State University’s Python Workshop and the 1221 astronomy Python data analysis course by Prof. Donald Terndrup. The bootcamp begins by showing students numerous methods, some better than others, to import and read data within Python and do some basic manipulation. It then shifts into a comprehensive overview on how to create publication quality figures using their data with the Python package matplotlib.

Day two of the workshop began with the student favorite: using astropy to make EVERYONE’s life easier. I introduced the power of astropy.units to do astronomical computation and mathematics, as well doing coordinate transformations and fits file handling with astropy.coordinates and astropy.io, respectively. Later in this session, I gave the students a subset of data I used in my own research to practice using scipy to do data reduction and produce results. This was also a favorite of the students, as it gave them a tangible and realistic example of how everything they learned can be put together. I ended the bootcamp with a very brief introduction to classes in Python and how to use code from other files they create.

While the bootcamp was a success, I really want to expand upon it and create the most near-beginner friendly guide to astronomical coding as I can. I also want it to be easy to digest and not overwhelming by treading the fine line between comprehensive and confusing. That being said, all the code can be found in the repository linked to this project page and it will be regularly updated. Update will pick up again during the next summer research term as I begin planning for the next group!