Foundations of Astronomical Data Science
Instructor Onboarding
Jan 2022
Azalee Bostroem
Motivation
Working with astronomical data is challenging.
It requires computational tools and good practices.
Who is this for?
Tools
Practices
Important files
student_download
episode_functions.py
gd1_isochrone.hdf5
az-paper-twocol.mplstyle
environment.yml
test_setup.ipynb
backup-data
gd1_data.csv gd1_data.hdf gd1_results.fits
Provide Scientific Background
Dataset: Stellar Streams: Gaia DR2 + Pan-STARRS
ESA
Workshop Overview: Figure 1
Why this dataset?
Connect Back to the Big Picture Frequently
Connect Back to the Big Picture Frequently
Advice for Every Episode
Day 1
Episode 1: Big Picture
Episode 1: Summary
Notebook intro
Select and download data from the Gaia Database:
SELECT TOP 10
source_id, ra, dec, pmra, pmdec, parallax, parallax_error, radial_velocity
FROM gaiadr2.gaia_source
WHERE parallax < 1
AND bp_rp >-0.75 AND bp_rp < 2
Far away
Exclude red M dwarfs
Episode 1: Best Practices
Episode 1: Beyond this workshop/use case: SQL
SELECT <columns>
FROM <table>
WHERE <condition>
Episode 1: Pitfalls
Episode 2: Summary
Episode 2 Skills
Episode 2: Best Practices
Episode 2: Pitfalls
cone_query = """SELECT
TOP 10
source_id
FROM gaiadr2.gaia_source
WHERE 1=CONTAINS(
POINT(ra, dec),
CIRCLE(88.8, 7.4, 0.08333333))
"""
Episode 3: Summary
ICRS Reference Frame
GD-1 Reference Frame
Episode 3: Skills
Episode 3: Best Practices
Episode 3: Pitfalls
Episode 4: Summary
Space
Space
Space
Motion
GD-1
Episode 4: Skills
Episode 4: Best Practices
Episode 4: Pitfalls
Day 2
Episode 5: Summary
Motion
GD-1 Frame
Motion
ICRS Frame
Episode 5: Skills
Episode 5: Best Practices
Episode 5: Pitfalls
Episode 6: Summary
Episode 6: Summary
Episode 6: Skills
SELECT col1, … coln
FROM table1
JOIN table2
ON table1.key1 = table2.key2
WHERE
conditions
Episode 6: Best Practices
Episode 6: Pitfalls
Episode 7: Summary
Episode 7: Skills
Matplotlib tricks: using contains, making a polygon
More practice using Pandas and HDF5
Episode 7: Best Practices
Episode 7: Pitfalls
Episode 8: Summary
Episode 8: Skills
Episode 8: Best Practices
Episode 8: Pitfalls
Think about Workshop Mechanics
This is a lot of cumulative material
If you’re running short on time…
Very little of this material can be skipped
Recommendations for speeding things up:
More advice? Check out the Instructor Notes
https://datacarpentry.org/astronomy-python/guide/index.html