ASTRON 98: Introduction to Python For Astronomers
(Fall 2025)
Facilitators:
- Brianna Peck (bpeck114@berkeley.edu)
- Charlie Tolley (tolley412@berkeley.edu)
- Pranathi Kolla (pranathik@berkeley.edu)
- Mahum Khan (mahumkhan@berkeley.edu)
- Mira Bhatt (mirabhatt@berkeley.edu)
- Katherine Mora (katherinemora@berkeley.edu)
- Mariam Helal (mariam.helal@berkeley.edu)
- William Lee (williamlee8@berkeley.edu)
- Safia Barmada (sbarmada@berkeley.edu)
Interns:
- Milana Berhe (milana.berhe@berkeley.edu)
- Olivia Silva (olivia_lsilva@berkeley.edu)
Faculty Sponsor:
- Aaron Parsons (aparsons@berkeley.edu)
Time & Location:
- Mondays & Wednesdays, 4:00-5:00 PM
- 131 Campbell Hall
Office Hours:
- TBD (Posted by Week 2)
Course Number:
- 98
Course Code:
- TBD
Units:
- 2 units, P/NP
Course Description
This course offers an introduction to the Python programming language with an emphasis on data analysis and scientific research in astronomy and physics. Python is one of the most common programming languages used by modern astronomers, and this class focuses on preparing undergraduate intended/declared astronomy students for upper-division laboratory courses and research. However, students from all backgrounds are welcome to apply. Key topics include the command line, VS Code, scripting, version control with Git, documentation, Jupyter Notebooks, and common Python packages/libraries. We’ll also cover advanced topics such as curve-fitting, processing FITS files, querying databases, animation, and object-oriented programming.
The Python DeCal is designed for students with little or no prior programming experience. However, learning the technical material covered in this course—especially for beginners—requires dedication, patience, and regular practice. Many students find this workload more demanding than other lower-division DeCals at UC Berkeley. If you have already taken advanced computer science or data science courses at Berkeley or elsewhere, this class may not be the best fit for you. But if you are excited to explore how coding can be applied to astronomical research, we still encourage you to apply.
Everyone’s “learning to code” journey will be different. Some concepts may click quickly, while others take time. Your effort on homework and the Final Project will directly shape what you gain from the Python DeCal. We strongly recommend attending all lectures and discussions, but attendance is not strictly required since each lecture is recorded and posted to our class YouTube Channel. To get the most out of this course, complete homeworks to the best of your ability (with little to no help from AI tools), attend office hours regularly, and put meaningful effort into your Final Project. If you need help, please reach out. We have a large team, so we can give as many students as possible one-on-one support.
Learning Objectives
Students will be introduced to fundamental programming concepts with the goal of building proficiency in developing software for upper-division astronomy laboratory work and scientific research using Python. In addition to com- pleting weekly homework and lecture engagement assignments, students will demonstrate their understanding of version control, scripting, packages/libraries (i.e., NumPy, Matplotlib, Pandas, SciPy, Astropy), and software structure and flow by designing and creating a Final Project of their choice.
This project will culminate in an open-source GitHub repository containing the Final Project and a Final Presen- tation during the last week of instruction. The presentation will give students practice in scientific communication, a skill required for upper-division astronomy coursework and jobs in academia.
Course Materials & Resources
Students are expected to bring and use their own computers for the duration of this course. If you are unable to obtain a laptop, please consider utilizing the Student Technology Equity Program (STEP) which offers semester-long computer rentals. If the STEP program is not a suitable option, reach out to the Python DeCal course staff and we can help arrange alternative accommodations.
Required Readings
There are no required readings outside of material provided during lecture, discussion, and the guides. However, we recommend two optional textbooks written by former Python DeCal instructors:
Python for Astronomers: An Introduction to Scientific Computing
Written by previous facilitators (Imad Pasha and Christopher Agostino), last updated in 2019.
GitHub LinkAstronomical Python: An Introduction to Modern Scientific Programming
Official textbook by Imad Pasha, published in May 2024.
IOPscience Link
For additional reference on the packages/libraries we use throughout the semester, you may find these optional docu- mentation links helpful:
bCourses
All course-related content will be available on our bCourses site, unless otherwise noted:
- Lecture materials, homeworks, demos, rubrics, and guides −→ posted under the Files section
- Important updates and reminders −→ posted under the Announcements section
- Syllabus −→ posted under the Syllabus section
- Office hours −→ posted under the Home section
- Grades −→ posted under the Grades section
Gradescope
All assignments for the Python DeCal will be submitted via Gradescope. This includes homework, lecture engage- ments, Google Form submissions, and all assignments related to the Final Project.
After the first homework, all homework submissions must be GitHub repositories uploaded to Gradescope.
EdStem
EdStem is our main Q&A platform where students can ask questions and receive timely answers from course staff and peers. We highly recommend using EdStem over email, as it enables collaborative learning and quicker response times.
If you need to contact a staff member directly, please include [PYTHON DECAL] or [ASTRON 98] in the subject line of your email so it can be identified quickly. For logistical or urgent matters, contact the Head Instructor Brianna Peck at bpeck114@berkeley.edu.
YouTube Channel
For supplemental review and asynchronous learning, the Python DeCal records and posts all course videos to our YouTube channel. While these videos are a helpful resource, we highly recommend attending all classes in person to benefit the most from this course.
If you can only participate asynchronously, we strongly recommend attending office hours outside of class to stay on track to get personalized support.
Office Hours
Course staff office hours provide a dedicated space for students to ask questions, collaborate with peers outside of regular class times, and get one-on-one support. We strongly encourage attending office hours weekly and taking the opportunity to connect with staff members. If you are struggling to come up with an idea for your Final Project or implementing your idea, office hours are a great place to get help.
Even if you don’t have course-related questions, our interns and instructors are more than happy to offer guidance on selecting or declaring a major, finding research opportunities, applying to graduate school, or exploring summer programs on and off campus.
The finalized office hours schedule will be posted to bCourses by the end of Week 2. Additional office hours will be held during the first two weeks of the course to help students install the software needed for the semester.
Grading Breakdown
To pass the Python DeCal, you must earn a grade of 70% or above and submit an attempt for all assignments related to the Final Project.
Participation (20% of your grade)
Class meets twice a week, with most weeks following this structure:
- Monday −→ Lecture to introduce new material (more formal, led by instructors/interns with demos)
- Wednesday −→ Discussion to apply lecture material through hands-on practice (more collaborative, with staff assisting as students work through guided problems)
A laptop is required for all lectures and discussions. If you do not bring a computer, you will not be able to follow along easily or participate fully. Laptops should only be brought out after warm-up activities, which must be completed on paper to avoid the temptation of asking Google or ChatGPT directly for answers.
Lecture Engagements
Instead of tracking in-person attendance, we will track your engagement with class material. Lecture engagement assign- ments will make up the most significant portion of your participation grade.
- Students will complete lecture engagement assignments each day of class. These open the day of class and close before the next class begins.
- Students have until the end of the semester to submit late lecture engagement assignments.
- Only 70% completion of lecture engagement assignments (for example, 19 out of 27 assignments) is required for full credit.
- Assignments (5-20 minutes) are submitted via Gradescope.
- These assignments help demonstrate engagement, especially for asynchronous attendance, and reinforce lecture con- cepts.
In order to complete these assignments you will need to either attend class or watch a recording of the lecture/discussion on our YouTube channel. While asynchronous attendance is available, we highly recommend attending in person. Due to technical or human error, some recordings may go missing. While we do have a catalog stretching back to Spring 2021, older recordings may not match the content from this semester.
Additional Participation
Throughout the semester we will request that you fill out Google Forms in a timely manner. You will receive participation credit for these assignments.
Homework (40% of your grade)
Starting in Week 2, homework will be assigned weekly on Mondays and will be due the following Wednesday at 11:59 PM on Gradescope. After the first homework, all submissions must be GitHub repositories uploaded to Gradescope. Homeworks will reinforce lecture material, include questions similar to those in discussion, and introduce additional topics for you to explore on your own.
Important Notes
- There is no penalty for late submissions within a two-week grace period of the original due date. If additional time is needed beyond the grace period, contact a member of the Python DeCal staff or email the Head Instructor Brianna Peck at bpeck114@berkeley.edu.
- Homeworks are graded on effort and accuracy. You will earn most points as long as you show clear thought and honest attempts, even if your answers are not fully correct.
- While independent exploration is encouraged, any submission of AI-generated code will receive an automatic zero. You may use Google or AI-tools to ask questions, but avoid directly copying and pasting code from AI tools. Remember, humans are grading your homework, so please submit human-written code.
- Collaboration is allowed, but all work submitted must be on your own.
While AI has become a powerful tool in recent years, please avoid over-reliance on AI for homework. AI can give you answers easily, but working through problems yourself is what builds skills needed for upper-division labs and research/industry. Misuse of AI-generated content will be treated as a violation of academic integrity and be reported. With great power comes great responsibility
Final Project (40% of your grade)
Instead of a traditional final exam, the Final Project is your chance to apply the skills you’ve gained throughout the semester in a creative, research-relevant and data-driven way. Most projects in the Python DeCal fall into one of three categories: data analysis, simulations/animations, or video game creation. However, we still encourage you to think outside of these boundaries while exploring any topic of interest in astronomy or physics using Python.
You may work individually or in pairs (maximum two students, no exceptions). Completion of the project, updated GitHub repository, check-ins, Google Forms, final report, and presentation is mandatory to pass this course.
Check-ins and Deadlines
- Throughout the semester, you will complete short check-in assignments to update the Python DeCal staff on your project’s status.
- The Final Project, Report, and Presentation are all due before the first class of the last week of instruc- tion. This applies to all students, even if you present on the second day.
- All students must present in person, no exceptions.
More details about the Final Project will be released later in the semester
Academic Misconduct
As with all classes, cheating, plagiarism, and other forms of academic dishonesty will not be tolerated. First violations will result in a zero on the assignment, and any subsequent violations may result in administrative action in accordance with the UC Berkeley Astronomy Department Policy on Academic Misconduct.