ASTR 427


This is a hands-on course to learn methods for numerically solving problems that arise in astrophysics. Some programming experience is required. Teaching programming is not the primary goal, nevertheless it is hoped that techniques for writing and debugging programs will be a useful side effect.

Reference Texts

Numerical Recipes by Press et al. (3rd edition is best, but earlier editions are OK) For tips on good practices for writing scientific software, I recommend Writing Scientific Software: A Guide to Good Style by Oliveira and Stewart. This book is somewhat language neutral. For a book that specifically focusses on object oriented C++ (not what I recommend for this course), I suggest Scientific and Engineering C++: An Introduction with Advanced Techniques and Examples by Barton and Nackman. I also have a Coding Guidelines document for a large C++ project I work on; it includes links to other style guides.



The grades will be entirely based on 5 programming assignments. Correctness of results, program performance, and readability will be used as grading criteria.

Learning Goals/Objectives:

The student will understand performance issues and limitations of floating point arithmetic on computers.

The student will be able to express and solve several types of astrophysics calculations within a computer program.

The student will have skills to assess correctness of computed results.


Paper copies are OK, but assignments must be turned in electronically, preferably via email to the instructor's address below. Github repositories are also welcome. My github handle is trquinn.

Hyak GPU node access:

For general Hyak access for UW undergraduates, see the Research Computing Club website. For instructions specific to GPU usage, see the Hyak GPU HOWTO

Instructor Contact Information

Office: PAB 380, email:, phone: 206-685-9009, and fax: 206-685-0403