## Interactive Tutorials

### Python Bootcamp: Day 1

We all have to start somewhere! Start with this bootcamp if you've never used Python before, and want a crash-course ride through the basics.

### Python Bootcamp: Day 2

A continuation of the Day 1 Bootcamp, here we use some of the concepts covered before and begin digging into Python as a language. You'll need to download this dataset.

### Loops and Conditionals: Centroiding Spectra

A basic task in astronomy is wavelength calibration -- and a basic coding practice is writing the for-loop, while-loop, and conditional statements. Let's practice! You'll need this dataset.

### Linear Regression: Fitting a line to data

MUCH has been said on this topic; in fact, it can get (surprisingly) mind-bogglingly advanced. But for now, let's focus on the basics: How does one fit a line (or any polynomial) to some data in Python? And how do we know if our "fit" is any good? You'll need this dataset.

### Data I/O: Working with SDSS Data

I/O (input/output) refers to the task of getting data (in its various stored means) into our code to do analysis with. Here, we'll be reading in several catalogs from SDSS and combining them to learn something about galaxy scaling relations! Here's The SDSS DR7 Catalog.

### Markov Chain Monte Carlo: An Introduction using Ice Core Data

MCMC is a powerful tool for many aspects of astronomy. In this tutorial, we'll cover when one might want to use an MCMC, and then setup and run one on some historical ice core data to fit the Earth's Milankovich Cycles! Here's the Ice Core Data File.

### Building an RK4 Orbit Integrator Part 1 of 2

In this tutorial, I cover the classic N-body orbit integration problem in detail, showing you how to use classes and a 4th order integrator.

### Building an RK4 Orbit Integrator Part 2 of 2

In Part 2, we adjust our RK4 orbital N-body integrator from last tutorial to integrate particles in potentials as well.

### Writing a Metropolis-Hastings Sampler

In this tutorial we learn some of the statistics underlying MCMC and then write our own sampler using classes!

## Python Guides

### Intermediate matplotlib: Towards Publication-Ready Plots

The easiest way to start plotting things in Python (plt.plot) is just not good enough to make real research grade plots. Here, I'll talk about the first steps you'll want to take in controlling every detail of your figures.

### Object Oriented Python: Building a Pipeline

Python is inherently an "object-oriented" language -- often, we don't have to write our codes that way, but it can actually make things better sometimes! Here, I'll attempt to explain why classes are useful, via the example of a data reduction pipeline.

What does all that mean?

### Personal Use

You are always free to download, keep, and reference any of the materials posted here for your own personal use.

### Modification

You are free to modify and/or use any aspect of these materials in your own teaching, as long as you cite this website as a source -- I even have a DOI to make it handy (see below)! You are not allowed to use re-mixed or re-purposed versions of these materials for any commerical purpose. If you make modified versions of these materials available for free, you must do so under the this license.

### Sharing and Dissemination

Feel free to share the textbook / materials with anyone who'd find them useful! I recommend sharing links rather than downloaded versions, as I update things regularly. You are not allowed to sell or otherwise use these materials for any commercial purpose, even with attribution.

### Citing Usage

If you use or modify and use materials from this site, please just cite us using our DOI: