{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Star Formation in Galaxies \n",
"\n",
"[Chris Richardson, Elon University](https://facstaff.elon.edu/crichardson17/) \n",
"\n",
"Funding for this tutorial made possible through the [CATL Scholars Program](https://www.elon.edu/u/academics/catl/sotl/catl-scholars-program/)\n",
"\n",
"This tutorial is intended for students to complete in groups. A version with solutions is available to instructors upon request."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Objectives\n",
"\n",
"- To explore scaling relationships among star forming galaxies in SDSS\n",
"- To understand how SDSS galaxy images and spectra can help us understand star formation rate (SFR) metrics\n",
"- To make a connection between the current SFR of a galaxy and its star formation history\n",
"- To provide a foundation to explore your own questions about star formation in galaxies"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Learning Outcomes\n",
"\n",
"By the end of this tutorial you should be able to:\n",
"\n",
"- Use H$\\alpha$ to find the star formation rate in SDSS galaxies\n",
"- Use the star forming main sequence to identify starburst galaxies and quiescent galaxies\n",
"- Use SDSS image cutouts to explain bias in SFR metrics \n",
"- Use D4000 as a proxy for star formation history"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Prerequisites\n",
"\n",
"- Computational\n",
" - Basic Python skills (e.g., for loops, conditional statements, defining functions)\n",
" - Basics of matplotlib
visualization, SQL queries, and SciServer platform (e.g., see [Britt Lundgren's notebook](https://escip.io/notebooks/sdss_tutorial_1.html) which inspired the format for this notebook)\n",
" - Using the [astropy](https://docs.astropy.org/en/stable/units/index.html)
package for fundamental constants and unit conversion\n",
"\n",
"- Astrophysics\n",
" - Introductory knowledge of [galaxy classification](https://www.britannica.com/science/galaxy/Types-of-galaxies)\n",
" - Introductory understanding of [stellar lifetimes and the HR diagram](https://openstax.org/books/astronomy/pages/22-1-evolution-from-the-main-sequence-to-red-giants)\n",
" - Advanced conceptual understanding of applying the Case B approximation to counting photons"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# Import relevant libraries\n",
"\n",
"import pandas as pd # data analysis \n",
"import numpy as np # more data analysis\n",
"\n",
"from matplotlib import pyplot as plt # another plotting library\n",
"from matplotlib.image import imread\n",
"\n",
"from astropy.constants import c # useful constants\n",
"from astropy import units as u # useful for unit conversions\n",
"from astropy import coordinates as coords\n",
"from astropy.coordinates import SkyCoord\n",
"from astropy.io import fits\n",
"from astropy.io import ascii\n",
"\n",
"from astroquery.sdss import SDSS\n",
"from astroquery.simbad import Simbad\n",
"\n",
"# Python standard-libraries to download data from the web\n",
"from urllib.parse import urlencode\n",
"from urllib.request import urlretrieve\n",
"\n",
"#only here to display images\n",
"from IPython.display import Image"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# Make notebook have a clean appearance\n",
"\n",
"pd.set_option('display.max_colwidth', None)\n",
"import warnings\n",
"warnings.filterwarnings('ignore')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Choosing a Sample of Galaxies\n",
"\n",
"Several SDSS schema will be used in this tutorial, each with unique data products helpful to investigate star formation. The [SpecObj
](http://skyserver.sdss.org/dr16/en/help/browser/browser.aspx#&&history=description+galSpecLine+U) schema contains basic information about the observation and the object, such as the redshift $z$. The [galaxy
](http://skyserver.sdss.org/dr16/en/help/browser/browser.aspx#&&history=description+PhotoObjAll+U) schema provides useful photometric measurements for colors and images. The three GalSpec
schema each give products derived from spectroscopy. As you should know, the H$\\alpha$ emission line is a convienient indicator of the star formation rate. We want galaxies with quality measurements of this line strength, so a S/N restriction is specified. We also want the H$\\beta$ emission line, because as we will see below, this will assist us in accounting for dust absorption along our line of sight.\n",
"\n",
"- By using H$\\alpha$ as indicator of star formation, how does this limit your analysis?\n",
"- How do you expect highly star forming galaxies to look?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Your answers to these questions:\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n", " | plate | \n", "fiberid | \n", "mjd | \n", "ra | \n", "dec | \n", "z | \n", "zwarning | \n", "h_beta_flux | \n", "h_alpha_flux | \n", "h_beta_flux_err | \n", "h_alpha_flux_err | \n", "bptclass | \n", "lgm_tot_p50 | \n", "lick_hd_a_sub | \n", "d4000_n_sub | \n", "lick_hd_a_sub_err | \n", "d4000_n_sub_err | \n", "petror90_r | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "329 | \n", "6 | \n", "52056 | \n", "177.62908 | \n", "-3.326442 | \n", "0.078031 | \n", "0 | \n", "45.879730 | \n", "273.12190 | \n", "3.291739 | \n", "4.542729 | \n", "1 | \n", "10.661870 | \n", "3.828772 | \n", "1.453698 | \n", "1.001100 | \n", "0.028119 | \n", "6.909836 | \n", "
1 | \n", "326 | \n", "147 | \n", "52375 | \n", "172.07771 | \n", "-2.878846 | \n", "0.095268 | \n", "0 | \n", "257.521400 | \n", "785.83600 | \n", "4.412366 | \n", "7.641911 | \n", "1 | \n", "9.859731 | \n", "7.313367 | \n", "1.139154 | \n", "1.037312 | \n", "0.020886 | \n", "6.646070 | \n", "
2 | \n", "335 | \n", "190 | \n", "52000 | \n", "189.26213 | \n", "-2.982288 | \n", "0.088555 | \n", "0 | \n", "54.240750 | \n", "203.45360 | \n", "2.292731 | \n", "3.075485 | \n", "1 | \n", "9.830482 | \n", "6.429802 | \n", "1.246805 | \n", "1.304015 | \n", "0.028645 | \n", "4.525309 | \n", "
3 | \n", "337 | \n", "27 | \n", "51997 | \n", "194.14905 | \n", "-2.919338 | \n", "0.052390 | \n", "0 | \n", "59.298840 | \n", "234.12340 | \n", "2.860254 | \n", "3.917636 | \n", "1 | \n", "10.147940 | \n", "4.229728 | \n", "1.323284 | \n", "1.003340 | \n", "0.024767 | \n", "6.746436 | \n", "
4 | \n", "330 | \n", "316 | \n", "52370 | \n", "176.92980 | \n", "-2.563193 | \n", "0.076802 | \n", "0 | \n", "112.538500 | \n", "510.88790 | \n", "3.626529 | \n", "6.436479 | \n", "1 | \n", "10.251690 | \n", "4.821437 | \n", "1.284835 | \n", "1.115302 | \n", "0.026129 | \n", "4.442664 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
9995 | \n", "1719 | \n", "586 | \n", "53876 | \n", "229.20211 | \n", "9.636919 | \n", "0.085698 | \n", "0 | \n", "41.080730 | \n", "162.25520 | \n", "2.143597 | \n", "2.654202 | \n", "1 | \n", "9.889796 | \n", "4.391088 | \n", "1.267068 | \n", "1.423546 | \n", "0.032088 | \n", "6.319391 | \n", "
9996 | \n", "1798 | \n", "499 | \n", "53851 | \n", "199.25717 | \n", "9.936388 | \n", "0.052416 | \n", "0 | \n", "27.837730 | \n", "209.10180 | \n", "1.961622 | \n", "3.422518 | \n", "1 | \n", "10.730490 | \n", "0.963644 | \n", "1.536464 | \n", "1.222649 | \n", "0.036792 | \n", "7.227845 | \n", "
9997 | \n", "1806 | \n", "586 | \n", "53559 | \n", "208.88008 | \n", "9.501891 | \n", "0.070048 | \n", "0 | \n", "9.401968 | \n", "40.19081 | \n", "1.542465 | \n", "1.394677 | \n", "1 | \n", "9.787393 | \n", "1.583487 | \n", "1.501869 | \n", "1.816120 | \n", "0.050408 | \n", "10.510790 | \n", "
9998 | \n", "1809 | \n", "616 | \n", "53792 | \n", "212.79641 | \n", "9.220711 | \n", "0.079386 | \n", "0 | \n", "41.077510 | \n", "190.89150 | \n", "1.806039 | \n", "2.547210 | \n", "1 | \n", "10.244090 | \n", "5.054030 | \n", "1.380123 | \n", "1.052414 | \n", "0.027612 | \n", "4.488715 | \n", "
9999 | \n", "1810 | \n", "450 | \n", "53794 | \n", "213.27146 | \n", "9.215585 | \n", "0.062881 | \n", "0 | \n", "77.005220 | \n", "273.67080 | \n", "1.896502 | \n", "2.989808 | \n", "1 | \n", "9.121378 | \n", "3.194716 | \n", "1.223580 | \n", "1.290285 | \n", "0.026648 | \n", "2.047930 | \n", "
10000 rows × 18 columns
\n", "GalSpecLine
](http://skyserver.sdss.org/dr16/en/help/browser/browser.aspx#&&history=description+galSpecLine+U) schema, the line flux is returned as 10$^{-17}$ erg/s/cm$^2$, so we first need to multiply our dereddened $F$(H$\\alpha$) by 10$^{-17}$ to get actual flux value. Luminosity has units of energy / second, and an erg is a unit of energy, so we're almost there. Use the space provided below to convert $F$(H$\\alpha$) to $L$(H$\\alpha$) and name that variable Halpha_lum_dr
.\n",
"\n",
"- How can you get the distance to the galaxy in cm?\n",
"- How does distance factor into converting flux to luminosity?"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# your code for calculating Halpha_lum_dr\n",
"\n",
"# Halpha_lum_dr = "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can now use the $L$(H$\\alpha$) to determine the SFR in units of M$_{\\odot}$/yr using the conversion from [Kennicutt+ 1998](https://ui.adsabs.harvard.edu/abs/1998ApJ...498..541K/abstract)."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'Halpha_lum_dr' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m\u001b[0m",
"\u001b[0;31mNameError\u001b[0mTraceback (most recent call last)",
"\u001b[0;32m