In-Class Assignment 29#

Note due for credit, in-class participation only

Spectral Classification of Stars using Ultraviolet Spectra#

Learning Objectives#

  • learn to normalize flux from stellar spectra of stars

  • identify key characteristics of spectra to determine their classification

  • practice producing combined stellar spectra plots

  • practice working with spectral data

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

Download the following model files locally. These data were produced using obtained from the online MAST archive. They are of three main-sequence (V) stars of different spectral type.

These data are described here, in particular their column labels are defined here.

# load data and see which variables are available
#spectra_1 = pd.read_table('spectra_1.txt',header=18,sep='\s+')
#spectra_2 = pd.read_table('spectra_2.txt',header=18,sep='\s+')
#spectra_3 = pd.read_table('spectra_3.txt',header=18,sep='\s+')
#spectra_1.head(5)

a. - Spectrum 1#

Below, we will work to identify characteristic properties of all of these spectra to make a determination as to the classification of the star.

  1. plot the wavelength (x-axis) vs. flux for spectra_1. You may want to change the figure size to help view the lines:

plt.figure(figsize=(12,8))

Hint: you can access columns of table data using pandas with iloc.

For example, one could access the first element or (row) of the second column using iloc as:

first_element_second_colummn = df.iloc[0, 1] # [row,column]
  1. In this spectrum we want to identify two key line features, you may identify three, one of which is Lyman\(-\alpha\) but that is not the one we are interested in for this star.

Hint: A helpful reference for this question and the follow are Figure 2.6 from the reading.

  1. Label these features either using axvline or annotate and your guess for its spectral type.

What are the type line features you have identifed? What do they suggest is occuring for this star? What is the spectral classification most likely for this star?

Super duper last hint:

The features are at wavelength less than 2000 Angstrom and one is right next to the Lyman\(-\alpha\) line.

## a results here

b. - Spectrum 2#

  1. plot the wavelength vs. flux

For this spectrum, it can be classified in the UV by it single, most significant absorption feature alone.

  1. label this feature.

Hint: For this spectrum the UV is not the best range to classify, but based off of this feature, the lack of features at longer wavelengths, and the spectrum not being dominated by the same feature found in 1. We can make a best guess as to its type.

What spectral type does this spectrum suggest the star belongs to?

# b result here

c. - Spectrum 3#

  1. plot the wavelength vs. flux

Hint: the first thing we notice is the decrease in far (short wavelength) UV, due in part to this spectrum belonging to a cooler star.

We want to identify two key absorption due a metal, well, actually a blending of the h and k lines of a metal found in the atmosphere for this class of stars.

You can reference this table for one of the lines here

  1. label those absorption line

What spectral class doed this star probably belong to?

d. - Combine all spectra#

  1. plot the wavelength vs. flux for all three spectra normalized by (either min or max of one of the spectrum)

  2. add integer shifts in to the spectra flux to move them up or down and place them in order according to decresing spectral type.

Compare to Fig 2.6

## d result here