In-Class Assignment 1#
Thursday, August 28, 2025
Color magnitude diagrams and Hertzsprung–Russell diagram#
Work in groups of 2
Learning Objectives#
develop skills using jupyter notebooks for data analysis
build color-magnitude diagrams using Gaia data
be able to describe and annotate stellar populations
compare observational data to theoretical isochrones
produce theoretical HR diagrams
be able to label theoritcal HR diagrams
To read in these files, we will use Pandas
Note
Install pandas via conda using
conda install conda-forge::pandas
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
a. - Color magnitude diagrams#
Download the following model files locally. These data were produced using an ADQL from the Gaia Archive here.
Load the data using pandas as a CSV.
Details here.
Plot the data to create a CMD scatterplot of the color \(G_{BP}-G_{RP}\) bands on the x-axis and \(G\) absolute magnitude on the y-axis.
Hint: be sure to invert the y-axis
Label three evolution epochs from our discussion in lecture: MS, RGB, HB, etc.
Hint: set axis limits to help zoom in on the data Hint: you can reduce the marker size with scatter plots using
s=0.1
# 1. load the data here
# you can see which column names are available by calling `mydata.columns` for example
# load cmd data here
# get column variables for plotting here
# save your final plot
b. - HR Diagram#
Download the following data locally.
\(1 M_\odot\): M1_default_trimmed_history.data
\(8 M_\odot\): M8_basic_co_trimmed_history.data
\(15 M_\odot\): M15_aprox21_trimmed_history.data
Lets start with an HR diagram. Below are some possible steps to do that. For reference, here are some common commands working with Pandas CSV and here.
The matplotlib reference page is linked here.
Load the MESA data using pandas.
Plot and label the axis for a HR diagram with each stellar model on the same plot.
Next, plotting only the 1m HR diagram, label the approximate location of the main sequence?
# load data and see which variables are available
# load additional files here
# set variables for HR diagram 
# make sure to set your limit appropriately!
# especially the x axis. 
# plot your HR diagram here
# save your final plot
# part b3 here
# save your final plot