Astro 410: Computational Astrophysics

  • Fall 2026
  • 9:05-10:20 AM, Tuesday and Thursday
  • Davey Lab 541
  • Instructor: John (J. J.) Zanazzi
  • Email: jxz224@psu.edu (preferred) jjzanazzi54@gmail.com (personal/GitHub)
  • Teaching Assistant: TBD
  • Email: TBD
  • Office Hours: TDB

Course Description

Computational methods underpin almost all research methods in astronomy and astrophysics, from data analysis used in observations, to numerical simulations used in theory. The purpose of this course is not only to survey these methods, but gain an appreciation for good software practices in astrophysical research. Topics to be covered range from an introduction to scientific computing with python, to solving systems of linear equations, algorithms used in data analysis and modelling, ordinary and partial differential equation solvers, with machine learning touched upon at the end. Direct connections to astronomical disciplines will be made through the course materials.

Course Goals

  • Understand how to apply foundational numerical computing methods to astrophysical research
  • Learn good coding practices, to be used in a variety of disciplines

Learning Objectives

  • Write programs that are understandable and usable by collegues
  • Gain insight into numerical algorithms, so that their uses and limitations are apparent
  • Communicate results of numerical calculations through clear plots and programs
  • Apply High Performance Computing resources at Penn State to real research problems

Topics Covered

Topics discussed in this course may include, in chronological order

  • Programming with Python: data types, operators, errors and debugging, Numpy, functions and classes, loops, parallelization
  • Computing Fundamentals: Floating point and truncation errors, differentiation, integration, root finding
  • Linear Algebra: Matrix operations, solving systems of equations, matrix solvers, eigenvalue methods
  • Data Analysis Techniques: Linear regression, interpolation, fourier analysis
  • Ordinary Differential Equations: Euler and Runge-Kutta method, symplectic integrators, adaptive timestep
  • Partial Differential Equations: Equation differencing schemes, numerical stability
  • Machine Learning: If time allows, classification, regression, clustering

This list is subject to change, announced with Canvas.

Class structure

All students are required to bring laptops every day to class. Lectures will include in-class Jupyter Notebooks distributed through GitHub to be downloaded before class, to be completed and submitted at the end of class on GitHub. Notebooks will include all discussed lecture materials, to serve as a working code reference for homework assignments and exams. Any in-class exercises not completed by the end of class can be submitted before the next class for the student to recieve full credit on the assignment.

Homework assignments will be distributed and submitted via GitHub, with assignments posted at least one week prior to its due date. Collaboration between peers is encouraged. Although use of Generative AI is not forbidden (Claude, ChatGBT, Gemini, etc.), any use must be stated upon submission of the homework assinment with an attached pdf of the chat, along with a statement of elements used in the homework assignment. Ethical AI use will be covered early. Because homework problems are designed to be pedagogical, directly copying and pasting homework questions into AI prompts is forbidden.

On submission days for homework assignments, students will be given in-class pencil and paper quizzes, where students answer coding questions, and write test pseudo code. Example quizzes with pseudo code will be given in class prior to the first exam.

Note: details subject to change until first day of class. Midterm and final exams will be completed in-class in separate computer labs, with room locations announced at least one week prior to exam date. Students will be able to access Jupyter and python on the Roar Interactive Server through a web browser, edit python scripts with their text editors of choice, access single student-prepared text (.txt) study guide document, and all other materials on each student’s personal Roar account. Use of any other resources (on the internet or using AI) is forbidden, students caught taking advantage of such resources are subject to recieving no credit for exams.

Students will also submit a final project at the end of the semester. Details TBD

Course Grade

  • 10% Homework
  • 10% Quizzes
  • 20% In-Class Exercises
  • 15% Midterm Exam
  • 20% Final Exam
  • 25% Student Project

The lowest scores on 1 homework assignment, 2 quizes, and 4 in-class exercises will be dropped from the course grade.

Expected Student Preparation

Students are expected to have taken an introductory programming course, and have foundational physics knowledge (mechanics, electricity & magnetism, fluids & thermodynamics). Although course materials will code in python, and make frequent applications to different fields of astrophysics, no prior python or astrophysics background will be assumed. Coding fundamentals in python will be covered early, and applications to astrophysics will focus on the implementation of numerical algorithms.

The formal prerequisites for this course are

  • CMPSC 201 or CMPSC 121 or CMPSC 131 or CMPSC 204
  • PHYS 212
  • PHYS 213
  • PHYS 214

Any student who has not taken one of these courses should contact the instructor prior to submitting an enrollment override via LionPath, to discuss their background in regards to course preparation.

Course Materials

Although there are no required textbooks, this course will ask students to read and work through online materials available for free. We will use most heavily

Other reading materials, and useful resources, include

Course materials may be added or removed to the syllabus and/or Canvas webpage throughout the semester. Students are encouraged to recommend additional resources they find useful.

Lectures and In-Class Exercises

Jupyter Notebooks with lecture materials and in-class exercises will be distributed before lecture via GitHub, so that students can interactively follow along during lecture, and test their understanding of computing concepts through exercises. Students are encouraged to follow along with the lecture materials, and complete in-class exercises before the end of class. Exercises can be completed with the help of peers, the instructor or TA, online materials, and ethical AI use.

Any un-completed exercises should be completed and submitted before the next class for full credit. All exercises are submitted by pushing to GitHub. Late exercises recieve a 10% grade deduction for every day past the deadline that they are late (if lecture Thursday, exercises due next Tuesday, recieve 90% credit for Wednesday submission, 80% for Thursday, 70% for Friday, …). The lowest four in-class exercise scores will be dropped from the final grade.

Homework Assignments

Homework assignments will be typically completed on a weekly basis pre-midterm, and bi-weekly post-midterm, to help students gain deeper understanding of course material. Students will directly apply numerical methods learned during lecture to real astrophysical problems, and gain appreciation for how widely different numerical techniques are used in the field. Homeworks can be completed with the help of peers and internet resources, with assistance by the instructor and TA during office hours. AI can be used to generate “example code” for analogous (but not identical) applications asked by the assignment, and assistance debugging code. Copying and pasting homework questions into AI prompts is forbidden. Any AI use to complete homeworks should be documented, with a full chat history submitted along with the homework assignment.

Homeworks will typically be due Tuesdays, submitted by pushing onto GitHub. Homeworks will be directly followed by short, in-class quizzes on the same material (see next section). Late submissions will recieve score reductions of 10% for every day late. The lowest homework score will be dropped from the class grade.

Quizzes

To act as an additional check-in on student understanding on course material, in-class quizzes will be given on subject matter directly related to homework questions. All quizzes will be done during the first 10 minutes of class with pencil and paper, the same day as homework submissions, typically writing pseudo-code. The lowest two quiz scores will be dropped from the course grade, meant to cover missed days and general bad vibes.

Exams

One summative assessment for the course material will be two in-person exams completed in computer labs, one for the midterm on Oct. 8, and another for the final exam. Students will use lab computer browsers to connect to the Roar Collab Interactive Desktop, download exams from GitHub, complete exams written in python on Jupyter Notebooks, and submitted at the end of class by pushing exams onto GitHub. Students are allowed access to a single .txt file study guide, and all course materials on their personal Roar accounts. Any other use of browsers to view other materials, and to use generative AI, is not allowed.

Make-up exams can be scheduled only in one of two special circumstances:

  1. If you know in advance that you will have to miss a midterm exam for a religious observance or university sponsored trip (e.g., athletics, research field work, class field trip), then you must request a makeup midterm in advance of the exam and as early in the semester as possible, to facilitate scheduling.
  2. If you are injured or ill or in isolation or quarantine during the midterm exam, you should request a makeup exam as soon as practical. If any of the above cases, documentation may be requested. Please email the instructor as soon as you are able to request scheduling a makeup exam. The timing and format of a makeup midterm exam will depend on the circumstances and be at the instructor’s discretion. For a religious holiday, the instructor would likely recommend taking the same exam early.

Project

Another summative assessment, to allow students to demonstrate their ability to apply course concepts to an astrophysical application of their choice, will be course projects. Although project outlines, checkpoints, and write-ups will have due dates in the middle and end of the semester, students are encouraged to brainstorm project ideas early. Students interested in a honors option should contact the instructor early.

During the middle and end portions of the semester, the frequency of homework assignments will decrease, replaced by project deadlines. We will discuss project requirements more in class, see also the project portion of the course website for more details.

Privacy

By enrolling in this course, I understand and consent to having my Access ID (username) visible to all users within the ICDS computing and storage systems for the purposes of course participation. I acknowledge that no additional personally identifiable information or educational records will be shared without my explicit written consent, in accordance with FERPA guidelines.

Safety

While attendance and participation in class is important to the class and your learning, it is more important that we all stay safe and healthy. All students must follow all health and safety protocols required or recommended by the university. University policies and recommendations may change during the semester. The most up-to-date information can be accessed at https://virusinfo.psu.edu/university-status/.

As of August 2026, the university policy is:

Stay home and away from others if you are experiencing fever or respiratory symptoms such as but not limited to cough, sore throat, runny nose, chills, fatigue, headache, body aches. Return to normal activities when, for at least 24 hours, both are true:

  • Your symptoms are getting better overall, AND
  • You have not had a fever (and are not using fever-reducing medication)

Then, take these additional precautions for the next five days to limit the spread of infection:

  • Wear a well-fitting mask
  • Keep a distance from others and/or
  • Get tested to inform your actions to prevent the spread to others

If you begin feeling worse and/or fever returns, stay home and away from others for at least 24 hours until both are true:

  • Your symptoms are getting better overall, and
  • You have not had a fever (and are not using fever-reducing medication)

If you are unable to attend class, then you can still earn full credit for in-class exercises by submitting Notebooks via GitHub before the next class. Students should make plans to get a classmate’s notes for any missed class sessions. Some class sessions may be moved online based on community conditions. Dropping the two lowest quizzes and four lowest in-class exercises can also cover days missed when sick.

Academic Integrity

All Penn State and Eberly College of Science policies regarding academic integrity, ethics and honorable behavior apply to this course. In light of the fact that group work is highly encouraged, and to fully facilitate best ethical practices and academic integrity, the following rules apply:

The intellectual content of all submitted assignments should be the student’s own work and not the output of AI tool. Using an AI-based grammar checker is acceptible and does not need to be disclosed for the labs or project in this course. Otherwise, students must fully disclose any and all use of artificial intelligence (AI) in completing their assignemnts at the time of submission. Students may receive reduced credit for assignments where AI tools were used. If you’re unsure what’s appropriate, then ask in advance of submission.Limited AI Use

All work submitted for an exam must be entirely the student’s own work. For other assignments (i.e., homework, in-class exercises, and class project), all ideas and work derived from resources beyond class notes must properly acknowledge or reference sources including: assigned readings (including textbooks and online sources), websites, classmates, other students, and solution sets from other or prior courses, etc. This means you should work together on labs/homework assignments, but each student should respond to questions individually and make liberal use of acknowledgments. For the class project, students will be encouraged to work in small teams of two or three students. In the final report, students are required to describe their contributions to the project accurately and to give credit to their teammates for their contributions.

Academic integrity is the pursuit of scholarly activity in an open, honest and responsible manner. Academic integrity is a basic guiding principle for all academic activity at The Pennsylvania State University, and all members of the University community are expected to act in accordance with this principle. Consistent with this expectation, the University’s Code of Conduct states that all students should act with personal integrity, respect other students’ dignity, rights and property, and help create and maintain an environment in which all can succeed through the fruits of their efforts.

Course Recordings

Some classes may be recorded. Ay students who prefer to not ask questions while being recorded are encouraged to submit questions in advance of class.

Video and audio recordings of classes are part of the class activities. Any video and audio recordings are used for educational use/purposes and only may be made available to all students presently enrolled in the class. For purposes where the recordings will be used in future class sessions/lectures beyond this class, any type of identifying information will be adequately removed.

According to University Policy, students must get express permission from their instructor to record class sessions. Screenshots showing instructors and students are considered recordings. Even if permission is granted, student-initiated recordings must be used only for educational purposes for the students enrolled in the initiating student’s class. Recordings may be used only during the period in which the student is enrolled in the class. Authorized student-initiated recordings may not be posted or shared in any fashion outside of the class, including online or through other media, without the express written consent of the course instructor or appropriate University administrator. Students who engage in the unauthorized distribution of class recordings may be held in violation of the University’s Code of Conduct, and/or liable under Federal and State laws.

Academic integrity includes a commitment by all members of the University community not to engage in or tolerate acts of falsification, misrepresentation or deception. Such acts of dishonesty violate the fundamental ethical principles of the University community and compromise the worth of work completed by others.

Lecture Adjustment due to Campus Closure, Instructor Illness, etc.

In the event of any changes to the schedule (e.g., due to a campus closure or delayed start, instructor illness, etc.), any changes in class meeting times, class format (in-person or Zoom), assignment deadlines, submission procedures, exam procedures, or any other necessary instructions will be communicated via an announcement in Canvas. Students should make a habit of checking their Canvas inbox at least daily.

Code of Mutual Respect and Cooperation

The Eberly College of Science Code of Mutual Respect and Cooperation embodies the values that we hope our faculty, staff, and students possess and will endorse to make The Eberly College of Science a place where every individual feels respected and valued, as well as challenged and rewarded. Please visit the link to review the 12 points that comprise this code.

Academic Support

The Eberly College of Science is committed to the academic success of students enrolled in the College’s courses and undergraduate programs. When in need of help, students can utilize various College and University wide resources for learning assistance. https://science.psu.edu/current-students/support-network

Dissability Accomidations

Regardless of whether you have a documented disability, please feel free to let the instructor know if you have a suggestion for how an assignment’s accessiblity could be improved.

Penn State welcomes students with disabilities into the University’s educational programs. Every Penn State campus has an office for students with disabilities. Student Disability Resources (SDR) website provides contact information for every Penn State campus. For further information, please visit Student Disability Resources website.

In order to receive consideration for reasonable accommodations, you must contact the appropriate disability services office at the campus where you are officially enrolled, participate in an intake interview, and provide documentation: see documentation guidelines. If the documentation supports your request for reasonable accommodations, your campus disability services office will provide you with an accommodation letter. Please share this letter with your instructors and discuss the accommodations with them as early as possible. You must follow this process for every semester that you request accommodations.

Counciling and Psychological Services

Many students at Penn State face personal challenges or have psychological needs that may interfere with their academic progress, social development, or emotional wellbeing. The university offers a variety of confidential services to help you through difficult times, including individual and group counseling, crisis intervention, consultations, online chats, and mental health screenings. These services are provided by staff who welcome all students and embrace a philosophy respectful of clients’ cultural and religious backgrounds, and sensitive to differences in race, ability, gender identity and sexual orientation.

  • Counseling and Psychological Services at University Park (CAPS): http://studentaffairs.psu.edu/counseling/, 814-863-0395
  • Penn State Crisis Line (24 hours/7 days/week): 877-229-6400
  • Crisis Text Line (24 hours/7 days/week): Text LIONS to 741741

Equity and Bias Concerns

Penn State takes great pride to foster a diverse and inclusive environment for students, faculty, and staff. Acts of intolerance, discrimination, or harassment due to age, ancestry, color, disability, gender, gender identity, national origin, race, religious belief, sexual orientation, or veteran status are not tolerated and can be reported through Educational Equity via the Report Bias webpage.