ASTR 596: Modeling the Universe
SDSU | Fall 2025 | Fridays 11:00 AM - 1:40 PM | PS 256

Welcome to ASTR 596: Modeling the Universe! This course takes you on a journey from Python fundamentals to neural networks and JAX, building transparent “glass box” models that reveal the physics within astronomical phenomena.
Our projects follow a deliberate progression from deterministic simulation → stochastic methods → statistical inference → machine learning, mirroring how computational astrophysics evolved as a field. Each project builds on previous code and concepts, reducing cognitive load through scaffolding.
Act I: Deterministic simulation (Python → OOP → N-body dynamics)
Act II: Stochastic methods & statistical inference (Monte Carlo → Bayesian/MCMC)
Act III: Machine learning & autodifferentiation (Gaussian Processes → Neural Networks → JAX)
Project Timeline & Core Concepts¶
| Project | Duration | Core Concepts | Key Connection |
|---|---|---|---|
| 🐍 Project 1: Stellar Populations | 1.5 weeks | Object-oriented design, vectorization, simple plotting | Builds Star & StellarPopulation classes |
| 🪐 Project 2: N-Body Star Clusters | 2 weeks | Numerical integration, Monte Carlo sampling, realistic stellar dynamics | Uses P1’s StellarPopulation to simulate actual clusters |
| ☀️ Project 3: Monte Carlo Radiative Transfer | 3 weeks | Radiative transfer physics, Monte Carlo methods, photon transport | Builds on stellar physics from earlier projects |
| 🌌 Project 4: Cosmological Inference | 3 weeks | Bayesian inference, MCMC, parameter estimation | P2’s leapfrog → HMC sampler! |
| 📊 Project 5: Gaussian Processes | 3 weeks | Surrogate modeling, kernel methods, uncertainty quantification | Emulates/analyzes P2’s N-body simulations |
| 🧠 Final: Neural Networks + JAX | 4 weeks | Deep learning, automatic differentiation, GPU acceleration | Learns from N-body dynamics + accelerates everything |
The Scaffolding Architecture¶
Friday Class Structure¶
Every Friday follows a consistent rhythm designed for active learning:
Interactive Lecture
Concept review & clarification
Q&A on required readings
Live coding demonstrations
Project requirement discussion
Hands-On Implementation
Collaborative work time with project partners
Discuss approaches and debug together
Everyone writes their own implementation
Instructor support rounds
Course Highlights & Features¶
Build every algorithm from scratch before using libraries
Project partners for discussion & debugging (individual code)
Bridge from NumPy to JAX ecosystem by course end
Every project addresses genuine astrophysical problems
Strategic three-phase approach that builds authentic AI literacy for modern computational research careers
Progress over perfection, productive struggle as pedagogy
Responsible AI: Three-Phase Scaffolding¶
Strategic three-phase approach that builds authentic AI literacy for modern computational research careers:
AI as a Learning Partner, Not a Replacement
Phase | Weeks | Permitted Usage |
|---|---|---|
Phase 1 | Weeks 1-7 | Foundation building with limited AI (30-min rule before debugging help) |
Phase 2 | Weeks 8-13 | Strategic integration with critical evaluation (refactoring after baseline works) |
Phase 3 | Weeks 14-16 | Professional practice (acceleration while maintaining understanding) |
Quick Navigation¶
Complete course policies & expectations
Six progressive computational projects
Detailed scaffolding framework
Environment setup & tools
Expected Learning Outcomes¶
By course end, you will have:
✅ Built every algorithm from scratch – No black boxes remain
✅ Discovered algorithm generality – Tools transfer across domains
✅ Developed computational intuition – Know why methods fail/succeed
✅ Created a portfolio – 6 working projects demonstrating progression
✅ Mastered modern tools – JAX, autodiff, GPU acceleration potential
✅ Practiced research skills – Git, testing, documentation, scientific writing
Instructor & Support¶
Instructor | Dr. Anna Rosen |
Office | Physics 239 |
Student Hacking Hours | Wednesdays 1-2 PM (P-239) or by appointment |
Course Website | |
Issues & Questions |
✨ Welcome to a transformative journey from Python basics to the frontiers of computational astrophysics. Together, we’ll model the universe, one algorithm at a time. ✨