mirror of
https://github.com/AllenDowney/AstronomicalData.git
synced 2026-07-28 14:47:02 -07:00
Revisions after day 1
This commit is contained in:
+15
-5
@@ -600,7 +600,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Exercise:** One of the other tables we'll use is `gaiadr2.panstarrs1_original_valid`. Use `load_table` to get the metadata for this table. How many columns are there and what are their names?"
|
||||
"## Exercise\n",
|
||||
"\n",
|
||||
"One of the other tables we'll use is `gaiadr2.panstarrs1_original_valid`. Use `load_table` to get the metadata for this table. How many columns are there and what are their names?"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -974,7 +976,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Exercise:** Read [the documentation of this table](https://gea.esac.esa.int/archive/documentation/GDR2/Gaia_archive/chap_datamodel/sec_dm_main_tables/ssec_dm_gaia_source.html) and choose a column that looks interesting to you. Add the column name to the query and run it again. What are the units of the column you selected? What is its data type?"
|
||||
"## Exercise\n",
|
||||
"\n",
|
||||
"Read [the documentation of this table](https://gea.esac.esa.int/archive/documentation/GDR2/Gaia_archive/chap_datamodel/sec_dm_main_tables/ssec_dm_gaia_source.html) and choose a column that looks interesting to you. Add the column name to the query and run it again. What are the units of the column you selected? What is its data type?"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1146,7 +1150,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Exercise:** The clauses in a query have to be in the right order. Go back and change the order of the clauses in `query2` and run it again. \n",
|
||||
"## Exercise\n",
|
||||
"\n",
|
||||
"The clauses in a query have to be in the right order. Go back and change the order of the clauses in `query2` and run it again. \n",
|
||||
"\n",
|
||||
"The query should fail, but notice that you don't get much useful debugging information. \n",
|
||||
"\n",
|
||||
@@ -1193,7 +1199,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Exercise:** [Read about SQL operators here](https://www.w3schools.com/sql/sql_operators.asp) and then modify the previous query to select rows where `bp_rp` is between `-0.75` and `2`.\n",
|
||||
"## Exercise\n",
|
||||
"\n",
|
||||
"[Read about SQL operators here](https://www.w3schools.com/sql/sql_operators.asp) and then modify the previous query to select rows where `bp_rp` is between `-0.75` and `2`.\n",
|
||||
"\n",
|
||||
"You can [read about this variable here](https://gea.esac.esa.int/archive/documentation/GDR2/Gaia_archive/chap_datamodel/sec_dm_main_tables/ssec_dm_gaia_source.html)."
|
||||
]
|
||||
@@ -1542,7 +1550,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Exercise:** This query always selects sources with `parallax` less than 1. But suppose you want to take that upper bound as an input.\n",
|
||||
"## Exercise\n",
|
||||
"\n",
|
||||
"This query always selects sources with `parallax` less than 1. But suppose you want to take that upper bound as an input.\n",
|
||||
"\n",
|
||||
"Modify `query3_base` to replace `1` with a format specifier like `{max_parallax}`. Now, when you call `format`, add a keyword argument that assigns a value to `max_parallax`, and confirm that the format specifier gets replaced with the value you provide."
|
||||
]
|
||||
|
||||
+3
-1
@@ -203,7 +203,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Exercise:** When you are debugging queries like this, you can use `TOP` to limit the size of the results, but then you still don't know how big the results will be.\n",
|
||||
"## Exercise\n",
|
||||
"\n",
|
||||
"When you are debugging queries like this, you can use `TOP` to limit the size of the results, but then you still don't know how big the results will be.\n",
|
||||
"\n",
|
||||
"An alternative is to use `COUNT`, which asks for the number of rows that would be selected, but it does not return them.\n",
|
||||
"\n",
|
||||
|
||||
+12
-3
@@ -526,9 +526,16 @@
|
||||
"\n",
|
||||
"This scatter plot has a problem. It is \"[overplotted](https://python-graph-gallery.com/134-how-to-avoid-overplotting-with-python/)\", which means that there are so many overlapping points, we can't distinguish between high and low density areas.\n",
|
||||
"\n",
|
||||
"To fix this, we can provide optional arguments to control the size and transparency of the points.\n",
|
||||
"To fix this, we can provide optional arguments to control the size and transparency of the points."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Exercise\n",
|
||||
"\n",
|
||||
"**Exercise:** In the call to `plt.plot`, add the keyword argument `markersize=0.1` to make the markers smaller.\n",
|
||||
"In the call to `plt.plot`, add the keyword argument `markersize=0.1` to make the markers smaller.\n",
|
||||
"\n",
|
||||
"Then add the argument `alpha=0.1` to make the markers nearly transparent.\n",
|
||||
"\n",
|
||||
@@ -1739,7 +1746,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Exercise:** We're going to need `centerline` and `selected` later as well. Write a line or two of code to add it as a second Dataset in the HDF5 file."
|
||||
"## Exercise \n",
|
||||
"\n",
|
||||
"We're going to need `centerline` and `selected` later as well. Write a line or two of code to add it as a second Dataset in the HDF5 file."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user