Prep for jupyterbook

This commit is contained in:
Allen Downey
2020-11-04 09:58:03 -05:00
parent de00d2429b
commit f103683a86
9 changed files with 75 additions and 42 deletions

View File

@@ -4,16 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Lesson 1"
"# Chapter 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Introduction\n",
"\n",
"This workshop is an introduction to tools and practices for working with astronomical data. Topics covered include:\n",
"*Astronomical Data in Python* is an introduction to tools and practices for working with astronomical data. Topics covered include:\n",
"\n",
"* Writing queries that select and download data from a database.\n",
"\n",
@@ -52,19 +50,6 @@
"* \"... the streams are well-positioned to reveal the presence of dark matter ... because the streams are so fragile, theorists say, collisions with marauding clumps of dark matter could leave telltale scars, potential clues to its nature.\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Prerequisites\n",
"\n",
"This workshop is meant for people who are familiar with basic Python, but not necessarily the libraries we will use, like Astropy or Pandas. If you are familiar with Python lists and dictionaries, and you know how to write a function that takes parameters and returns a value, you know enough Python for this workshop.\n",
"\n",
"We assume that you have some familiarity with operating systems, like the ability to use a command-line interface. But we don't assume you have any prior experience with databases.\n",
"\n",
"We assume that you are familiar with astronomy at the undergraduate level, but we will not assume specialized knowledge of the datasets or analysis methods we'll use. "
]
},
{
"cell_type": "markdown",
"metadata": {},
@@ -85,7 +70,20 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lesson 1\n",
"## Prerequisites\n",
"\n",
"These notebooks are meant for people who are familiar with basic Python, but not necessarily the libraries we will use, like Astropy or Pandas. If you are familiar with Python lists and dictionaries, and you know how to write a function that takes parameters and returns a value, you know enough Python to get started.\n",
"\n",
"We assume that you have some familiarity with operating systems, like the ability to use a command-line interface. But we don't assume you have any prior experience with databases.\n",
"\n",
"We assume that you are familiar with astronomy at the undergraduate level, but we will not assume specialized knowledge of the datasets or analysis methods we'll use. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Outline\n",
"\n",
"The first lesson demonstrates the steps for selecting and downloading data from the Gaia Database:\n",
"\n",
@@ -196,7 +194,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Optional detail \n",
"**Optional detail**\n",
"\n",
"> Running this import statement has the effect of creating a [TAP+](http://www.ivoa.net/documents/TAP/) connection; TAP stands for \"Table Access Protocol\". It is a network protocol for sending queries to the database and getting back the results. We're not sure why it seems to create two connections."
]
@@ -1134,14 +1132,16 @@
"source": [
"## Operators\n",
"\n",
"In a `WHERE` clause, you can use any of the [SQL comparison operators](https://www.w3schools.com/sql/sql_operators.asp):\n",
"In a `WHERE` clause, you can use any of the [SQL comparison operators](https://www.w3schools.com/sql/sql_operators.asp); here are the most common ones:\n",
"\n",
"* `>`: greater than\n",
"* `<`: less than\n",
"* `>=`: greater than or equal\n",
"* `<=`: less than or equal\n",
"* `=`: equal\n",
"* `!=` or `<>`: not equal\n",
"| Symbol | Operation\n",
"|--------| :---\n",
"| `>` | greater than\n",
"| `<` | less than\n",
"| `>=` | greater than or equal\n",
"| `<=` | less than or equal\n",
"| `=` | equal\n",
"| `!=` or `<>` | not equal\n",
"\n",
"Most of these are the same as Python, but some are not. In particular, notice that the equality operator is `=`, not `==`.\n",
"Be careful to keep your Python out of your ADQL!\n",

View File

@@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Lesson 2\n",
"# Chapter 2\n",
"\n",
"This is the second in a series of lessons related to astronomy data.\n",
"This is the second in a series of notebooks related to astronomy data.\n",
"\n",
"As a running example, we are replicating parts of the analysis in a recent paper, \"[Off the beaten path: Gaia reveals GD-1 stars outside of the main stream](https://arxiv.org/abs/1805.00425)\" by Adrian M. Price-Whelan and Ana Bonaca.\n",
"\n",
@@ -19,6 +19,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Outline\n",
"\n",
"We'll start with an example that does a \"cone search\"; that is, it selects stars that appear in a circular region of the sky.\n",
"\n",
"Then, to select stars in the vicinity of GD-1, we'll:\n",

View File

@@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Introduction\n",
"# Chapter 3\n",
"\n",
"This is the third in a series of lessons related to astronomy data.\n",
"This is the third in a series of notebooks related to astronomy data.\n",
"\n",
"As a running example, we are replicating parts of the analysis in a recent paper, \"[Off the beaten path: Gaia reveals GD-1 stars outside of the main stream](https://arxiv.org/abs/1805.00425)\" by Adrian M. Price-Whelan and Ana Bonaca.\n",
"\n",
@@ -21,7 +21,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lesson 3\n",
"## Outline\n",
"\n",
"Here are the steps in this lesson:\n",
"\n",
@@ -664,9 +664,9 @@
"\n",
"That might seem like a strange thing to do, but here's the motivation:\n",
"\n",
"* Because the stars in GD-1 are so far away, the distance estimates we get from Gaia, which are based on parallax, are not very precise. So we replace them with our current best estimate of the mean distance to GD-1, about 8 kpc. [Koposov, Rix, and Hogg, 2010](https://ui.adsabs.harvard.edu/abs/2010ApJ...712..260K/abstract)\n",
"* Because the stars in GD-1 are so far away, the distance estimates we get from Gaia, which are based on parallax, are not very precise. So we replace them with our current best estimate of the mean distance to GD-1, about 8 kpc. See [Koposov, Rix, and Hogg, 2010](https://ui.adsabs.harvard.edu/abs/2010ApJ...712..260K/abstract).\n",
"\n",
"* For the other stars in the table, this distance estimate will be inaccurate, so reflect correction will not be correct. But that should have only a small effect on our ability to identify stars with the proper motion we expect for GD-1.\n",
"* For the other stars in the table, this distance estimate will be inaccurate, so reflex correction will not be correct. But that should have only a small effect on our ability to identify stars with the proper motion we expect for GD-1.\n",
"\n",
"* The measurement of radial velocity has no effect on the correction for proper motion; the value we provide is arbitrary, but we have to provide a value to avoid errors in the reflex correction calculation.\n",
"\n",

View File

@@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lesson 4\n",
"# Chapter 4\n",
"\n",
"This is the fourth in a series of lessons related to astronomy data.\n",
"This is the fourth in a series of notebooks related to astronomy data.\n",
"\n",
"As a running example, we are replicating parts of the analysis in a recent paper, \"[Off the beaten path: Gaia reveals GD-1 stars outside of the main stream](https://arxiv.org/abs/1805.00425)\" by Adrian M. Price-Whelan and Ana Bonaca.\n",
"\n",
@@ -21,6 +21,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Outline\n",
"\n",
"Here are the steps in this lesson:\n",
"\n",
"1. Using data from the previous lesson, we'll identify the values of proper motion for stars likely to be in GD-1.\n",

View File

@@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lesson 5\n",
"# Chapter 5\n",
"\n",
"This is the fifth in a series of lessons related to astronomy data.\n",
"This is the fifth in a series of notebooks related to astronomy data.\n",
"\n",
"As a continuing example, we will replicate part of the analysis in a recent paper, \"[Off the beaten path: Gaia reveals GD-1 stars outside of the main stream](https://arxiv.org/abs/1805.00425)\" by Adrian M. Price-Whelan and Ana Bonaca.\n",
"\n",
@@ -23,6 +23,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Outline\n",
"\n",
"Here are the steps in this notebook:\n",
"\n",
"1. We'll reload the candidate stars we identified in the previous notebook.\n",

View File

@@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lesson 6\n",
"# Chapter 6\n",
"\n",
"This is the sixth in a series of lessons related to astronomy data.\n",
"This is the sixth in a series of notebooks related to astronomy data.\n",
"\n",
"As a continuing example, we will replicate part of the analysis in a recent paper, \"[Off the beaten path: Gaia reveals GD-1 stars outside of the main stream](https://arxiv.org/abs/1805.00425)\" by Adrian M. Price-Whelan and Ana Bonaca.\n",
"\n",
@@ -25,6 +25,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Outline\n",
"\n",
"Here are the steps in this notebook:\n",
"\n",
"1. We'll reload the data from the previous notebook and make a color-magnitude diagram.\n",

View File

@@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lesson 7\n",
"# Chapter 7\n",
"\n",
"This is the seventh in a series of lessons related to astronomy data.\n",
"This is the seventh in a series of notebooks related to astronomy data.\n",
"\n",
"As a continuing example, we will replicate part of the analysis in a recent paper, \"[Off the beaten path: Gaia reveals GD-1 stars outside of the main stream](https://arxiv.org/abs/1805.00425)\" by Adrian M. Price-Whelan and Ana Bonaca.\n",
"\n",
@@ -19,6 +19,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Outline\n",
"\n",
"Here are the steps in this notebook:\n",
"\n",
"1. Starting with the figure from the previous notebook, we'll add annotations to present the results more clearly.\n",

View File

@@ -1 +1,15 @@
theme: jekyll-theme-tactile
# Book settings
title: Astronomical Data in Python
author: Allen B. Downey
latex:
latex_documents:
targetname: book.tex
execute:
execute_notebooks: 'off'
repository:
url: https://github.com/AllenDowney/AstronomyDataPython
html:
use_repository_button: true

9
_toc.yml Normal file
View File

@@ -0,0 +1,9 @@
file: README
sections:
- file: 01_query
- file: 02_coords
- file: 03_motion
- file: 04_select
- file: 05_join
- file: 06_photo
- file: 07_plot