Authors: Andy Tzanidakis, James Davenport Date: 03.01.2022 For general questions or inquiries, please reach out to Andy ([email protected]) Solutions were kindly provided by Professor Davenport ⚠️
Probably one of the coolest topics in stellar astronomy are the equations of state (EOS) that can give us some intuitive/simple understanding about the interior of stars. If you need a reminder about the motivation behind this homework I suggest you rewatch lecture 13 that does into depth about the stellar structure equations and how we can use Polytropes and the Lane-Emden equations to describe the EOS.
https://www.youtube.com/watch?v=HKEHN2abLtg&ab_channel=JamesDavenport
You’re asked to plot the data from the BP2000 model file provided in the homework. Let’s begin with all the imports that I will be using for this notebook:
import numpy as np
from astropy.io import ascii
import matplotlib.pyplot as plt
from tqdm import tqdm
import astropy.units as u
import os
import pandas as pd
from astropy.table import Table
import astropy.constants as cc
from matplotlib import rcParams
# Make fancy looking plots with LARGE fonts!
%matplotlib inline
%config InlineBackend.figure_format = "retina"
rcParams["savefig.dpi"] = 100
rcParams["font.size"] = 20
Step one will be to read the data into your favorite tabulated data structure:
# Load data
df = ascii.read("<http://jradavenport.github.io/astr421src/bp2000_ssm.txt>")
Okay, now we can begin by plotting the following from the BP2000 file as a function of radius: