View on GitHub

AstroPGH

2023 Python Boot Camp & Seminar Series

2020: GitHub / website (inc., Astropy, Pandas, Altair, Git/Github, linear regression, resampling, and debugging)

2021: GitHub / website (inc., Astropy and Pandas)

2022: GitHub / website (inc., Astropy and Pandas)

2023: GitHub / website

2024: GitHub / website

Welcome to the 2023 AstroPGH Python Boot Camp for summer undergraduate students and early PhD students new to Python. This 3 day program is designed to help you learn the basics of using Python for astrophysics and physics research.

Boot Camp

Installation and Setup

Python

Please install Python 3 before the Boot Camp. I recommend using the Anaconda package manager for Python 3.10 and then install the following packages in the terminal:

conda install numpy scipy astropy matplotlib jupyter ipython pandas
conda install -c conda-forge jupyterlab

Test Your Installation

  1. Open a new terminal.
  2. Type ipython into the terminal to open an interactive python session (the prompt should say In [1]:).
  3. Copy this code:
    import numpy
    import scipy
    import matplotlib
    import astropy
    import pandas
    
  4. Type into the iPython shell the word paste, and press enter.
  5. If no errors are raised, you’re ready for bootcamp. You may close the terminal window.

If you are having difficulties with installation, please do not hesitate to reach out to Brett Andrews on Slack or via email.

Instructors

Schedule

Time (EDT) Monday (5/22) Tuesday (5/23) Wednesday (5/24)
10:00-11:15 Python Basics Numpy 1a Numpy 3a
11:45-1:00 Data Structures Numpy 1b Numpy 3b
2:00-3:15 Functions and Modules Numpy 2a Numpy 4a
3:45-5:00 Matplotlib Numpy 2b Numpy 4b

This material is based upon work supported by the National Science Foundation grant number AST-2009251. Any opinions, findings, and conclusions or recommendations expressed on this website are those of the participants and do not necessarily reflect the views of the National Science Foundation or the participating institutions.