This commit is contained in:
Allen Downey
2020-11-13 11:13:07 -05:00
parent e9ce0e9133
commit c491fe8829
2 changed files with 71 additions and 16 deletions

View File

@@ -141,7 +141,11 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [],
"source": [
"# If we're running on Colab, install libraries\n",
@@ -194,9 +198,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**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."
"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."
]
},
{
@@ -236,7 +238,11 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [
{
"name": "stdout",
@@ -362,7 +368,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"outputs": [
{
@@ -377,10 +383,10 @@
{
"data": {
"text/plain": [
"<astroquery.utils.tap.model.taptable.TapTableMeta at 0x7f922376e0a0>"
"<astroquery.utils.tap.model.taptable.TapTableMeta at 0x7fb565288520>"
]
},
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -437,6 +443,27 @@
"What happens? Is the error message helpful? If you had not made this error deliberately, would you have been able to figure it out?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Solution\n",
"\n",
"# The error message, last time we tried, was\n",
"\n",
"# Retrieving table 'gaiadr2.gaiadr2.gaia_source'\n",
"# 500 Error 500:\n",
"# esavo.tap.TAPException: esavo.tap.TAPException: Schema cannot be null\n",
"\n",
"# Which is not remotely helpful.\n",
"\n",
"# The point of this exercise is to alert the participants to the difficulty\n",
"# of debugging queries with VERY limited feedback. So developing and testing\n",
"# incrementally is very important."
]
},
{
"cell_type": "markdown",
"metadata": {},
@@ -449,7 +476,11 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [
{
"name": "stdout",
@@ -581,7 +612,11 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [
{
"name": "stdout",
@@ -670,7 +705,11 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [
{
"name": "stdout",
@@ -1166,7 +1205,11 @@
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [],
"source": [
"# Solution\n",
@@ -1184,7 +1227,11 @@
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [],
"source": [
"# Solution\n",
@@ -1507,7 +1554,11 @@
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [],
"source": [
"# Solution\n",
@@ -1523,7 +1574,11 @@
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [
{
"name": "stdout",

View File

@@ -167,7 +167,7 @@
"\n",
"Selecting stars with `bp-rp` less than 2 excludes many class M dwarf stars, which are low temperature, low luminosity. A star like that at GD-1's distance would be hard to detect, so if it is detected, it it more likely to be in the foreground.\n",
"\n",
"Now, to select stars with the age and metal richness we expect in GD-1, we will use `g i` color and apparent `g`-band magnitude, which are available from the Pan-STARRS survey."
"Now, to select stars with the age and metal richness we expect in GD-1, we will use `g - i` color and apparent `g`-band magnitude, which are available from the Pan-STARRS survey."
]
},
{