mirror of
https://github.com/AllenDowney/AstronomicalData.git
synced 2026-01-09 03:40:36 -08:00
Update documentation
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
"exercises: 0\n",
|
||||
"questions:\n",
|
||||
"- \"How can we select and download the data we want from the Gaia server?\"\n",
|
||||
"\n",
|
||||
"objectives:\n",
|
||||
"- \"Compose a basic query in ADQL/SQL.\"\n",
|
||||
"- \"Use queries to explore a database and its tables.\"\n",
|
||||
@@ -38,7 +39,6 @@
|
||||
"lines, but you should.\"\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"FIXME\n",
|
||||
"\n",
|
||||
"{% include links.md %}\n"
|
||||
]
|
||||
@@ -887,6 +887,15 @@
|
||||
"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?"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Solution"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
@@ -1071,6 +1080,15 @@
|
||||
"* Launching test queries synchronously might make them start faster, too."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Solution"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
"- \"Once you have a query working, save the data in a local file. If you shut down the notebook and come back to it later, you can reload the file; you don't have to run the query again.\"\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"FIXME\n",
|
||||
"\n",
|
||||
"{% include links.md %}\n"
|
||||
]
|
||||
@@ -243,7 +242,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Exercise\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",
|
||||
@@ -252,6 +251,24 @@
|
||||
"In the previous query, replace `TOP 10 source_id` with `COUNT(source_id)` and run the query again. How many stars has Gaia identified in the cone we searched?"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Solution\n",
|
||||
"\n",
|
||||
"query = \"\"\"\n",
|
||||
"SELECT \n",
|
||||
"COUNT(source_id)\n",
|
||||
"FROM gaiadr2.gaia_source\n",
|
||||
"WHERE 1=CONTAINS(\n",
|
||||
" POINT(ra, dec),\n",
|
||||
" CIRCLE(266.41683, -29.00781, 0.08333333))\n",
|
||||
"\"\"\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
||||
@@ -12,11 +12,10 @@
|
||||
"title: \"Plotting and Pandas\"\n",
|
||||
"teaching: 3000\n",
|
||||
"exercises: 0\n",
|
||||
"\n",
|
||||
"questions:\n",
|
||||
"\n",
|
||||
"- \"How do we make scatter plots in Matplotlib?\"\n",
|
||||
"\n",
|
||||
"- \"How do we store data in a Pandas `DataFrame`?\"\n",
|
||||
"- \"How do we make scatter plots in Matplotlib? How do we store data in a Pandas `DataFrame`?\"\n",
|
||||
"\n",
|
||||
"objectives:\n",
|
||||
"\n",
|
||||
@@ -32,14 +31,13 @@
|
||||
"\n",
|
||||
"keypoints:\n",
|
||||
"\n",
|
||||
"- \"When you make a scatter plot, adjust the size of the markers and their transparency so the figure is not overplotted; otherwise it can misrepresent the data badly.\n",
|
||||
"- \"When you make a scatter plot, adjust the size of the markers and their transparency so the figure is not overplotted; otherwise it can misrepresent the data badly.\"\n",
|
||||
"\n",
|
||||
"- \"For simple scatter plots in Matplotlib, `plot` is faster than `scatter`.\n",
|
||||
"- \"For simple scatter plots in Matplotlib, `plot` is faster than `scatter`.\"\n",
|
||||
"\n",
|
||||
"- \"An Astropy `Table` and a Pandas `DataFrame` are similar in many ways and they provide many of the same functions. They have pros and cons, but for many projects, either one would be a reasonable choice.\"\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"FIXME\n",
|
||||
"\n",
|
||||
"{% include links.md %}\n"
|
||||
]
|
||||
@@ -123,7 +121,7 @@
|
||||
"IN_COLAB = 'google.colab' in sys.modules\n",
|
||||
"\n",
|
||||
"if IN_COLAB:\n",
|
||||
" !pip install astroquery astro-gala python-wget"
|
||||
" !pip install astroquery astro-gala wget"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -577,7 +575,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Exercise\n",
|
||||
"### Exercise\n",
|
||||
"\n",
|
||||
"In the call to `plt.plot`, add the keyword argument `markersize=0.1` to make the markers smaller.\n",
|
||||
"\n",
|
||||
@@ -588,6 +586,15 @@
|
||||
"Note: Once you have made these changes, you might notice that the figure shows stripes with lower density of stars. These stripes are caused by the way Gaia scans the sky, which [you can read about here](https://www.cosmos.esa.int/web/gaia/scanning-law). The dataset we are using, [Gaia Data Release 2](https://www.cosmos.esa.int/web/gaia/dr2), covers 22 months of observations; during this time, some parts of the sky were scanned more than others."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Solution"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
@@ -1996,7 +2003,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Exercise \n",
|
||||
"### 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."
|
||||
]
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"exercises: 0\n",
|
||||
"questions:\n",
|
||||
"\n",
|
||||
"- \"Question?\"\n",
|
||||
"- \"How do we transform proper motion from one frame to another?\"\n",
|
||||
"\n",
|
||||
"objectives:\n",
|
||||
"\n",
|
||||
@@ -35,7 +35,6 @@
|
||||
"- \"On the other hand, CSV is a 'least common denominator' format; that is, it can be read by practically any application that works with data.\"\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"FIXME\n",
|
||||
"\n",
|
||||
"{% include links.md %}\n"
|
||||
]
|
||||
@@ -115,7 +114,7 @@
|
||||
"IN_COLAB = 'google.colab' in sys.modules\n",
|
||||
"\n",
|
||||
"if IN_COLAB:\n",
|
||||
" !pip install astroquery astro-gala python-wget"
|
||||
" !pip install astroquery astro-gala wget"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
"\n",
|
||||
"- \"Use `JOIN` operations to combine data from multiple tables in a databased, using some kind of identifier to match up records from one table with records from another.\"\n",
|
||||
"\n",
|
||||
"* \"This is another example of a practice we saw in the previous notebook, moving the computation to the data.\"\n",
|
||||
"- \"This is another example of a practice we saw in the previous notebook, moving the computation to the data.\"\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"FIXME\n",
|
||||
"\n",
|
||||
"{% include links.md %}\n"
|
||||
]
|
||||
@@ -101,7 +100,7 @@
|
||||
"IN_COLAB = 'google.colab' in sys.modules\n",
|
||||
"\n",
|
||||
"if IN_COLAB:\n",
|
||||
" !pip install astroquery astro-gala python-wget"
|
||||
" !pip install astroquery astro-gala wget"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1393,12 +1392,12 @@
|
||||
" ON ps.obj_id = best.original_ext_source_id\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"job3 = Gaia.launch_job_async(query=query3, \n",
|
||||
"# job3 = Gaia.launch_job_async(query=query3, \n",
|
||||
" upload_resource='candidate_df.xml', \n",
|
||||
" upload_table_name='candidate_df')\n",
|
||||
"\n",
|
||||
"results3 = job3.get_results()\n",
|
||||
"results3"
|
||||
"# results3 = job3.get_results()\n",
|
||||
"# results3"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"---\n",
|
||||
"title: \"Title\"\n",
|
||||
"title: \"Photometry\"\n",
|
||||
"teaching: 3000\n",
|
||||
"exercises: 0\n",
|
||||
"questions:\n",
|
||||
@@ -14,7 +14,7 @@
|
||||
"\n",
|
||||
"objectives:\n",
|
||||
"\n",
|
||||
"- \"Use Matplotlib to specify a `Polygon` and determine which points fall inside it.\"\n",
|
||||
"- \"Use Matplotlib to specify a polygon and determine which points fall inside it.\"\n",
|
||||
"\n",
|
||||
"- \"Use Pandas to merge data from multiple `DataFrames`, much like a database `JOIN` operation.\"\n",
|
||||
"\n",
|
||||
@@ -29,7 +29,6 @@
|
||||
"- \"Be sure to record every element of the data analysis pipeline that would be needed to replicate the results.\"\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"FIXME\n",
|
||||
"\n",
|
||||
"{% include links.md %}\n"
|
||||
]
|
||||
@@ -108,7 +107,7 @@
|
||||
"IN_COLAB = 'google.colab' in sys.modules\n",
|
||||
"\n",
|
||||
"if IN_COLAB:\n",
|
||||
" !pip install astroquery astro-gala python-wget"
|
||||
" !pip install astroquery astro-gala wget"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,7 +12,9 @@
|
||||
"\n",
|
||||
"2. `import` statements to check whether you have everything installed that we need.\n",
|
||||
"\n",
|
||||
"3. A cell where you will paste a line of code you copy from Slack, to check for a potential problem with \"smart\" quotes."
|
||||
"3. A cell where you will paste a line of code you copy from Slack, to check for a potential problem with \"smart\" quotes.\n",
|
||||
"\n",
|
||||
"At the end there's a link to a survey where you can let us know you're done, or if you have any problems."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -227,6 +229,15 @@
|
||||
"If you have trouble with this, let us know and we will provide more details."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Survey\n",
|
||||
"\n",
|
||||
"Please fill out [this survey](https://forms.gle/aWikZ88xA1Rcvsvx8) to let us know when you are done."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
||||
Reference in New Issue
Block a user