Updating solutions

This commit is contained in:
Allen Downey
2021-03-26 11:13:23 -04:00
parent 3b4aafb406
commit be6b080fc9
5 changed files with 577 additions and 479 deletions

View File

@@ -103,7 +103,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 55,
"metadata": {
"tags": [
"remove-cell"
@@ -117,7 +117,7 @@
"IN_COLAB = 'google.colab' in sys.modules\n",
"\n",
"if IN_COLAB:\n",
" !pip install astroquery astro-gala wget"
" !pip install astroquery astro-gala"
]
},
{
@@ -135,7 +135,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 56,
"metadata": {},
"outputs": [],
"source": [
@@ -161,7 +161,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 57,
"metadata": {},
"outputs": [],
"source": [
@@ -182,7 +182,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 58,
"metadata": {},
"outputs": [
{
@@ -195,10 +195,11 @@
" ra float64 deg Right ascension\n",
" dec float64 deg Declination\n",
" pmra float64 mas / yr Proper motion in right ascension direction\n",
" pmdec float64 mas / yr Proper motion in declination direction"
" pmdec float64 mas / yr Proper motion in declination direction\n",
" parallax float64 mas Parallax"
]
},
"execution_count": 3,
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
@@ -220,16 +221,16 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['source_id', 'ra', 'dec', 'pmra', 'pmdec']"
"['source_id', 'ra', 'dec', 'pmra', 'pmdec', 'parallax']"
]
},
"execution_count": 4,
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
@@ -247,7 +248,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 60,
"metadata": {},
"outputs": [
{
@@ -311,7 +312,7 @@
" 143.7702681295401"
]
},
"execution_count": 5,
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
@@ -329,7 +330,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 61,
"metadata": {},
"outputs": [
{
@@ -338,7 +339,7 @@
"astropy.table.column.Column"
]
},
"execution_count": 6,
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
}
@@ -356,30 +357,30 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<i>Row index=0</i>\n",
"<table id=\"table140559241197024\">\n",
"<thead><tr><th>source_id</th><th>ra</th><th>dec</th><th>pmra</th><th>pmdec</th></tr></thead>\n",
"<thead><tr><th></th><th>deg</th><th>deg</th><th>mas / yr</th><th>mas / yr</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>637987125186749568</td><td>142.48301935991023</td><td>21.75771616932985</td><td>-2.5168384683875766</td><td>2.941813096629439</td></tr>\n",
"<table id=\"table139673160217120\">\n",
"<thead><tr><th>source_id</th><th>ra</th><th>dec</th><th>pmra</th><th>pmdec</th><th>parallax</th></tr></thead>\n",
"<thead><tr><th></th><th>deg</th><th>deg</th><th>mas / yr</th><th>mas / yr</th><th>mas</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>637987125186749568</td><td>142.48301935991023</td><td>21.75771616932985</td><td>-2.5168384683875766</td><td>2.941813096629439</td><td>-0.2573448962333354</td></tr>\n",
"</table>"
],
"text/plain": [
"<Row index=0>\n",
" source_id ra dec pmra pmdec \n",
" deg deg mas / yr mas / yr \n",
" int64 float64 float64 float64 float64 \n",
"------------------ ------------------ ----------------- ------------------- -----------------\n",
"637987125186749568 142.48301935991023 21.75771616932985 -2.5168384683875766 2.941813096629439"
" source_id ra dec pmra pmdec parallax \n",
" deg deg mas / yr mas / yr mas \n",
" int64 float64 float64 float64 float64 float64 \n",
"------------------ ------------------ ----------------- ------------------- ----------------- -------------------\n",
"637987125186749568 142.48301935991023 21.75771616932985 -2.5168384683875766 2.941813096629439 -0.2573448962333354"
]
},
"execution_count": 7,
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
@@ -397,7 +398,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 63,
"metadata": {},
"outputs": [
{
@@ -406,7 +407,7 @@
"astropy.table.row.Row"
]
},
"execution_count": 8,
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
@@ -427,7 +428,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 64,
"metadata": {},
"outputs": [
{
@@ -436,7 +437,7 @@
"142.48301935991023"
]
},
"execution_count": 9,
"execution_count": 64,
"metadata": {},
"output_type": "execute_result"
}
@@ -454,7 +455,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 65,
"metadata": {},
"outputs": [
{
@@ -463,7 +464,7 @@
"142.48301935991023"
]
},
"execution_count": 10,
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
}
@@ -493,7 +494,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 66,
"metadata": {},
"outputs": [],
"source": [
@@ -533,7 +534,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 67,
"metadata": {},
"outputs": [
{
@@ -589,7 +590,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 68,
"metadata": {
"tags": [
"hide-cell"
@@ -627,7 +628,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 69,
"metadata": {},
"outputs": [],
"source": [
@@ -649,7 +650,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 70,
"metadata": {},
"outputs": [],
"source": [
@@ -679,7 +680,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 71,
"metadata": {},
"outputs": [],
"source": [
@@ -724,7 +725,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 72,
"metadata": {},
"outputs": [],
"source": [
@@ -748,7 +749,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 73,
"metadata": {
"scrolled": true
},
@@ -793,7 +794,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 74,
"metadata": {},
"outputs": [
{
@@ -802,7 +803,7 @@
"astropy.table.table.Table"
]
},
"execution_count": 19,
"execution_count": 74,
"metadata": {},
"output_type": "execute_result"
}
@@ -820,7 +821,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 75,
"metadata": {},
"outputs": [
{
@@ -829,7 +830,7 @@
"astropy.coordinates.sky_coordinate.SkyCoord"
]
},
"execution_count": 20,
"execution_count": 75,
"metadata": {},
"output_type": "execute_result"
}
@@ -857,7 +858,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 76,
"metadata": {},
"outputs": [],
"source": [
@@ -875,16 +876,16 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 77,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(140339, 5)"
"(140339, 6)"
]
},
"execution_count": 23,
"execution_count": 77,
"metadata": {},
"output_type": "execute_result"
}
@@ -902,7 +903,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 78,
"metadata": {},
"outputs": [
{
@@ -931,6 +932,7 @@
" <th>dec</th>\n",
" <th>pmra</th>\n",
" <th>pmdec</th>\n",
" <th>parallax</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
@@ -941,6 +943,7 @@
" <td>21.757716</td>\n",
" <td>-2.516838</td>\n",
" <td>2.941813</td>\n",
" <td>-0.257345</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
@@ -949,6 +952,7 @@
" <td>22.476168</td>\n",
" <td>2.662702</td>\n",
" <td>-12.165984</td>\n",
" <td>0.422728</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
@@ -957,6 +961,7 @@
" <td>22.166932</td>\n",
" <td>18.306747</td>\n",
" <td>-7.950660</td>\n",
" <td>0.103640</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
@@ -965,6 +970,7 @@
" <td>22.227920</td>\n",
" <td>0.987786</td>\n",
" <td>-2.584105</td>\n",
" <td>-0.857327</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
@@ -973,21 +979,22 @@
" <td>22.110783</td>\n",
" <td>0.244439</td>\n",
" <td>-4.941079</td>\n",
" <td>0.099625</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" source_id ra dec pmra pmdec\n",
"0 637987125186749568 142.483019 21.757716 -2.516838 2.941813\n",
"1 638285195917112960 142.254529 22.476168 2.662702 -12.165984\n",
"2 638073505568978688 142.645286 22.166932 18.306747 -7.950660\n",
"3 638086386175786752 142.577394 22.227920 0.987786 -2.584105\n",
"4 638049655615392384 142.589136 22.110783 0.244439 -4.941079"
" source_id ra dec pmra pmdec parallax\n",
"0 637987125186749568 142.483019 21.757716 -2.516838 2.941813 -0.257345\n",
"1 638285195917112960 142.254529 22.476168 2.662702 -12.165984 0.422728\n",
"2 638073505568978688 142.645286 22.166932 18.306747 -7.950660 0.103640\n",
"3 638086386175786752 142.577394 22.227920 0.987786 -2.584105 -0.857327\n",
"4 638049655615392384 142.589136 22.110783 0.244439 -4.941079 0.099625"
]
},
"execution_count": 24,
"execution_count": 78,
"metadata": {},
"output_type": "execute_result"
}
@@ -1012,16 +1019,16 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 79,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(140339, 7)"
"(140339, 8)"
]
},
"execution_count": 25,
"execution_count": 79,
"metadata": {},
"output_type": "execute_result"
}
@@ -1041,16 +1048,16 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 80,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(140339, 9)"
"(140339, 10)"
]
},
"execution_count": 26,
"execution_count": 80,
"metadata": {},
"output_type": "execute_result"
}
@@ -1082,7 +1089,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 81,
"metadata": {},
"outputs": [
{
@@ -1111,6 +1118,7 @@
" <th>dec</th>\n",
" <th>pmra</th>\n",
" <th>pmdec</th>\n",
" <th>parallax</th>\n",
" <th>phi1</th>\n",
" <th>phi2</th>\n",
" <th>pm_phi1</th>\n",
@@ -1129,6 +1137,7 @@
" <td>140339.000000</td>\n",
" <td>140339.000000</td>\n",
" <td>140339.000000</td>\n",
" <td>140339.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
@@ -1137,6 +1146,7 @@
" <td>26.780285</td>\n",
" <td>-2.484404</td>\n",
" <td>-6.100777</td>\n",
" <td>0.179492</td>\n",
" <td>-50.091158</td>\n",
" <td>-1.803301</td>\n",
" <td>-0.868963</td>\n",
@@ -1149,6 +1159,7 @@
" <td>3.052592</td>\n",
" <td>5.913939</td>\n",
" <td>7.202047</td>\n",
" <td>0.759590</td>\n",
" <td>2.892344</td>\n",
" <td>3.444398</td>\n",
" <td>6.657714</td>\n",
@@ -1161,6 +1172,7 @@
" <td>19.286617</td>\n",
" <td>-106.755260</td>\n",
" <td>-138.065163</td>\n",
" <td>-15.287602</td>\n",
" <td>-54.999989</td>\n",
" <td>-8.029159</td>\n",
" <td>-115.275637</td>\n",
@@ -1173,6 +1185,7 @@
" <td>24.592490</td>\n",
" <td>-5.038789</td>\n",
" <td>-8.341561</td>\n",
" <td>-0.035981</td>\n",
" <td>-52.602952</td>\n",
" <td>-4.750426</td>\n",
" <td>-2.948723</td>\n",
@@ -1185,6 +1198,7 @@
" <td>26.746261</td>\n",
" <td>-1.834943</td>\n",
" <td>-4.689596</td>\n",
" <td>0.362708</td>\n",
" <td>-50.147362</td>\n",
" <td>-1.671502</td>\n",
" <td>0.585037</td>\n",
@@ -1197,6 +1211,7 @@
" <td>28.990500</td>\n",
" <td>0.452893</td>\n",
" <td>-1.937809</td>\n",
" <td>0.657637</td>\n",
" <td>-47.593279</td>\n",
" <td>1.160514</td>\n",
" <td>3.001768</td>\n",
@@ -1209,6 +1224,7 @@
" <td>34.285481</td>\n",
" <td>104.319923</td>\n",
" <td>20.981070</td>\n",
" <td>0.999957</td>\n",
" <td>-44.999985</td>\n",
" <td>4.014609</td>\n",
" <td>39.802471</td>\n",
@@ -1229,28 +1245,28 @@
"75% 6.976579e+17 146.607350 28.990500 0.452893 \n",
"max 7.974418e+17 152.777393 34.285481 104.319923 \n",
"\n",
" pmdec phi1 phi2 pm_phi1 \\\n",
" pmdec parallax phi1 phi2 \\\n",
"count 140339.000000 140339.000000 140339.000000 140339.000000 \n",
"mean -6.100777 -50.091158 -1.803301 -0.868963 \n",
"std 7.202047 2.892344 3.444398 6.657714 \n",
"min -138.065163 -54.999989 -8.029159 -115.275637 \n",
"25% -8.341561 -52.602952 -4.750426 -2.948723 \n",
"50% -4.689596 -50.147362 -1.671502 0.585037 \n",
"75% -1.937809 -47.593279 1.160514 3.001768 \n",
"max 20.981070 -44.999985 4.014609 39.802471 \n",
"mean -6.100777 0.179492 -50.091158 -1.803301 \n",
"std 7.202047 0.759590 2.892344 3.444398 \n",
"min -138.065163 -15.287602 -54.999989 -8.029159 \n",
"25% -8.341561 -0.035981 -52.602952 -4.750426 \n",
"50% -4.689596 0.362708 -50.147362 -1.671502 \n",
"75% -1.937809 0.657637 -47.593279 1.160514 \n",
"max 20.981070 0.999957 -44.999985 4.014609 \n",
"\n",
" pm_phi2 \n",
"count 140339.000000 \n",
"mean 1.409208 \n",
"std 6.518615 \n",
"min -161.150142 \n",
"25% -1.107128 \n",
"50% 1.987149 \n",
"75% 4.628965 \n",
"max 79.275199 "
" pm_phi1 pm_phi2 \n",
"count 140339.000000 140339.000000 \n",
"mean -0.868963 1.409208 \n",
"std 6.657714 6.518615 \n",
"min -115.275637 -161.150142 \n",
"25% -2.948723 -1.107128 \n",
"50% 0.585037 1.987149 \n",
"75% 3.001768 4.628965 \n",
"max 39.802471 79.275199 "
]
},
"execution_count": 27,
"execution_count": 81,
"metadata": {},
"output_type": "execute_result"
}
@@ -1274,7 +1290,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 82,
"metadata": {
"tags": [
"hide-cell"
@@ -1324,7 +1340,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 83,
"metadata": {},
"outputs": [
{
@@ -1359,7 +1375,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 84,
"metadata": {},
"outputs": [
{
@@ -1414,7 +1430,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 85,
"metadata": {},
"outputs": [
{
@@ -1423,7 +1439,7 @@
"pandas.core.series.Series"
]
},
"execution_count": 31,
"execution_count": 85,
"metadata": {},
"output_type": "execute_result"
}
@@ -1444,7 +1460,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 86,
"metadata": {},
"outputs": [
{
@@ -1453,7 +1469,7 @@
"pandas.core.series.Series"
]
},
"execution_count": 32,
"execution_count": 86,
"metadata": {},
"output_type": "execute_result"
}
@@ -1475,7 +1491,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 87,
"metadata": {},
"outputs": [
{
@@ -1489,7 +1505,7 @@
"Name: phi2, dtype: bool"
]
},
"execution_count": 33,
"execution_count": 87,
"metadata": {},
"output_type": "execute_result"
}
@@ -1508,7 +1524,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 88,
"metadata": {},
"outputs": [],
"source": [
@@ -1533,7 +1549,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 89,
"metadata": {},
"outputs": [
{
@@ -1542,7 +1558,7 @@
"25084"
]
},
"execution_count": 35,
"execution_count": 89,
"metadata": {},
"output_type": "execute_result"
}
@@ -1560,7 +1576,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 90,
"metadata": {},
"outputs": [
{
@@ -1569,7 +1585,7 @@
"pandas.core.frame.DataFrame"
]
},
"execution_count": 36,
"execution_count": 90,
"metadata": {},
"output_type": "execute_result"
}
@@ -1591,7 +1607,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 91,
"metadata": {},
"outputs": [
{
@@ -1600,7 +1616,7 @@
"25084"
]
},
"execution_count": 37,
"execution_count": 91,
"metadata": {},
"output_type": "execute_result"
}
@@ -1618,7 +1634,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": 92,
"metadata": {},
"outputs": [
{
@@ -1627,7 +1643,7 @@
"0.1787386257562046"
]
},
"execution_count": 53,
"execution_count": 92,
"metadata": {},
"output_type": "execute_result"
}
@@ -1654,7 +1670,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 93,
"metadata": {},
"outputs": [],
"source": [
@@ -1683,7 +1699,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 94,
"metadata": {},
"outputs": [
{
@@ -1733,7 +1749,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 95,
"metadata": {},
"outputs": [],
"source": [
@@ -1752,7 +1768,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 96,
"metadata": {},
"outputs": [],
"source": [
@@ -1765,7 +1781,7 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 97,
"metadata": {},
"outputs": [],
"source": [
@@ -1782,7 +1798,7 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": 98,
"metadata": {},
"outputs": [
{
@@ -1814,7 +1830,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 99,
"metadata": {},
"outputs": [],
"source": [
@@ -1832,7 +1848,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 100,
"metadata": {},
"outputs": [],
"source": [
@@ -1852,7 +1868,7 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 101,
"metadata": {},
"outputs": [
{
@@ -1861,7 +1877,7 @@
"1049"
]
},
"execution_count": 46,
"execution_count": 101,
"metadata": {},
"output_type": "execute_result"
}
@@ -1879,7 +1895,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 102,
"metadata": {},
"outputs": [
{
@@ -1888,7 +1904,7 @@
"1049"
]
},
"execution_count": 47,
"execution_count": 102,
"metadata": {},
"output_type": "execute_result"
}
@@ -1907,7 +1923,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 103,
"metadata": {},
"outputs": [
{
@@ -1952,7 +1968,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 104,
"metadata": {},
"outputs": [
{
@@ -1961,7 +1977,7 @@
"astropy.table.table.Table"
]
},
"execution_count": 49,
"execution_count": 104,
"metadata": {},
"output_type": "execute_result"
}
@@ -2004,7 +2020,7 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 105,
"metadata": {},
"outputs": [],
"source": [
@@ -2037,7 +2053,7 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 106,
"metadata": {
"tags": [
"hide-cell"
@@ -2059,16 +2075,16 @@
},
{
"cell_type": "code",
"execution_count": 56,
"execution_count": 107,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2.0090408325195312"
"2.2084197998046875"
]
},
"execution_count": 56,
"execution_count": 107,
"metadata": {},
"output_type": "execute_result"
}
@@ -2089,7 +2105,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": 108,
"metadata": {},
"outputs": [
{

View File

@@ -93,7 +93,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 37,
"metadata": {
"tags": [
"remove-cell"
@@ -107,7 +107,7 @@
"IN_COLAB = 'google.colab' in sys.modules\n",
"\n",
"if IN_COLAB:\n",
" !pip install astroquery astro-gala wget"
" !pip install astroquery astro-gala"
]
},
{
@@ -116,12 +116,12 @@
"source": [
"## Reload the data\n",
"\n",
"The following cells download the data from the previous lesson, if necessary, and load it into a Pandas `DataFrame`."
"You can [download the data from the previous lesson](https://github.com/AllenDowney/AstronomicalData/raw/main/data/gd1_data.hdf) or run the following cell, which downloads it if necessary."
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
@@ -138,9 +138,16 @@
" 'data/gd1_data.hdf')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can reload `centerline_df` and `selected_df`."
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
@@ -178,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
@@ -190,7 +197,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
@@ -203,7 +210,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
@@ -220,7 +227,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 43,
"metadata": {},
"outputs": [],
"source": [
@@ -257,7 +264,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 44,
"metadata": {},
"outputs": [
{
@@ -292,7 +299,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 45,
"metadata": {},
"outputs": [
{
@@ -346,7 +353,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 46,
"metadata": {},
"outputs": [
{
@@ -355,7 +362,7 @@
"(1049, 2)"
]
},
"execution_count": 10,
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
@@ -383,16 +390,16 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<scipy.spatial.qhull.ConvexHull at 0x7fd95de628b0>"
"<scipy.spatial.qhull.ConvexHull at 0x7ff6207866a0>"
]
},
"execution_count": 11,
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
@@ -413,7 +420,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 48,
"metadata": {},
"outputs": [
{
@@ -423,7 +430,7 @@
" 971, 967, 1001, 969, 940], dtype=int32)"
]
},
"execution_count": 12,
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
@@ -441,7 +448,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 49,
"metadata": {},
"outputs": [
{
@@ -465,7 +472,7 @@
" [ -4.42442296, -14.74641176]])"
]
},
"execution_count": 13,
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
@@ -484,7 +491,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 50,
"metadata": {},
"outputs": [],
"source": [
@@ -502,7 +509,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 51,
"metadata": {},
"outputs": [
{
@@ -555,7 +562,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 52,
"metadata": {},
"outputs": [],
"source": [
@@ -584,7 +591,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 53,
"metadata": {},
"outputs": [],
"source": [
@@ -605,7 +612,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 54,
"metadata": {},
"outputs": [],
"source": [
@@ -622,7 +629,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 55,
"metadata": {},
"outputs": [],
"source": [
@@ -647,7 +654,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 56,
"metadata": {},
"outputs": [],
"source": [
@@ -660,7 +667,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 57,
"metadata": {},
"outputs": [
{
@@ -669,7 +676,7 @@
"'135.306, 8.39862, 126.51, 13.4449, 163.017, 54.2424, 172.933, 46.4726, 135.306, 8.39862'"
]
},
"execution_count": 21,
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
@@ -688,7 +695,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 58,
"metadata": {},
"outputs": [],
"source": [
@@ -704,7 +711,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 59,
"metadata": {},
"outputs": [
{
@@ -751,7 +758,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 60,
"metadata": {},
"outputs": [
{
@@ -760,7 +767,7 @@
"'[ -4.05037121,-14.75623261, -3.41981085,-14.72365546, -3.03521988,-14.44357135, -2.26847919,-13.7140236 , -2.61172203,-13.24797471, -2.73471401,-13.09054471, -3.19923146,-12.5942653 , -3.34082546,-12.47611926, -5.67489413,-11.16083338, -5.95159272,-11.10547884, -6.42394023,-11.05981295, -7.09631023,-11.95187806, -7.30641519,-12.24559977, -7.04016696,-12.88580702, -6.00347705,-13.75912098, -4.42442296,-14.74641176]'"
]
},
"execution_count": 24,
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
@@ -781,7 +788,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 61,
"metadata": {
"scrolled": true
},
@@ -792,7 +799,7 @@
"' -4.05037121,-14.75623261, -3.41981085,-14.72365546, -3.03521988,-14.44357135, -2.26847919,-13.7140236 , -2.61172203,-13.24797471, -2.73471401,-13.09054471, -3.19923146,-12.5942653 , -3.34082546,-12.47611926, -5.67489413,-11.16083338, -5.95159272,-11.10547884, -6.42394023,-11.05981295, -7.09631023,-11.95187806, -7.30641519,-12.24559977, -7.04016696,-12.88580702, -6.00347705,-13.75912098, -4.42442296,-14.74641176'"
]
},
"execution_count": 25,
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
}
@@ -813,7 +820,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 62,
"metadata": {
"tags": [
"hide-cell"
@@ -846,7 +853,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 63,
"metadata": {
"tags": [
"hide-cell"
@@ -888,7 +895,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 64,
"metadata": {
"scrolled": true
},
@@ -897,16 +904,6 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Created TAP+ (v1.2.1) - Connection:\n",
"\tHost: gea.esac.esa.int\n",
"\tUse HTTPS: True\n",
"\tPort: 443\n",
"\tSSL Port: 443\n",
"Created TAP+ (v1.2.1) - Connection:\n",
"\tHost: geadata.esac.esa.int\n",
"\tUse HTTPS: True\n",
"\tPort: 443\n",
"\tSSL Port: 443\n",
"INFO: Query finished. [astroquery.utils.tap.core]\n",
"<Table length=7345>\n",
" name dtype unit description \n",
@@ -916,10 +913,10 @@
" dec float64 deg Declination\n",
" pmra float64 mas / yr Proper motion in right ascension direction\n",
" pmdec float64 mas / yr Proper motion in declination direction\n",
"Jobid: 1615933496807O\n",
"Jobid: 1616771462206O\n",
"Phase: COMPLETED\n",
"Owner: None\n",
"Output file: async_20210316182456.vot\n",
"Output file: async_20210326111102.vot\n",
"Results: None\n"
]
}
@@ -940,7 +937,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 65,
"metadata": {},
"outputs": [
{
@@ -949,7 +946,7 @@
"7345"
]
},
"execution_count": 29,
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
}
@@ -975,7 +972,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 66,
"metadata": {},
"outputs": [
{
@@ -985,7 +982,7 @@
" 'pm_point_list': ' -4.05037121,-14.75623261, -3.41981085,-14.72365546, -3.03521988,-14.44357135, -2.26847919,-13.7140236 , -2.61172203,-13.24797471, -2.73471401,-13.09054471, -3.19923146,-12.5942653 , -3.34082546,-12.47611926, -5.67489413,-11.16083338, -5.95159272,-11.10547884, -6.42394023,-11.05981295, -7.09631023,-11.95187806, -7.30641519,-12.24559977, -7.04016696,-12.88580702, -6.00347705,-13.75912098, -4.42442296,-14.74641176'}"
]
},
"execution_count": 30,
"execution_count": 66,
"metadata": {},
"output_type": "execute_result"
}
@@ -1004,7 +1001,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 67,
"metadata": {},
"outputs": [
{
@@ -1015,7 +1012,7 @@
"dtype: object"
]
},
"execution_count": 31,
"execution_count": 67,
"metadata": {},
"output_type": "execute_result"
}
@@ -1034,7 +1031,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 68,
"metadata": {},
"outputs": [],
"source": [
@@ -1053,7 +1050,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 69,
"metadata": {},
"outputs": [
{
@@ -1090,7 +1087,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 70,
"metadata": {},
"outputs": [],
"source": [
@@ -1132,7 +1129,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 71,
"metadata": {},
"outputs": [],
"source": [
@@ -1148,7 +1145,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 72,
"metadata": {},
"outputs": [
{

View File

@@ -85,7 +85,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 28,
"metadata": {
"tags": [
"remove-cell"
@@ -162,23 +162,13 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Created TAP+ (v1.2.1) - Connection:\n",
"\tHost: gea.esac.esa.int\n",
"\tUse HTTPS: True\n",
"\tPort: 443\n",
"\tSSL Port: 443\n",
"Created TAP+ (v1.2.1) - Connection:\n",
"\tHost: geadata.esac.esa.int\n",
"\tUse HTTPS: True\n",
"\tPort: 443\n",
"\tSSL Port: 443\n",
"Retrieving table 'gaiadr2.panstarrs1_best_neighbour'\n",
"Parsing table 'gaiadr2.panstarrs1_best_neighbour'...\n",
"Done.\n"
@@ -193,7 +183,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 30,
"metadata": {},
"outputs": [
{
@@ -222,7 +212,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 31,
"metadata": {},
"outputs": [
{
@@ -267,7 +257,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
@@ -280,7 +270,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 33,
"metadata": {},
"outputs": [
{
@@ -297,7 +287,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 34,
"metadata": {
"scrolled": true
},
@@ -306,7 +296,7 @@
"data": {
"text/html": [
"<i>Table length=5</i>\n",
"<table id=\"table140104392580448\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140523981953776\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>source_id</th><th>number_of_neighbours</th><th>number_of_mates</th><th>original_ext_source_id</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>int32</th><th>int16</th><th>int64</th></tr></thead>\n",
"<tr><td>6745938972433480704</td><td>1</td><td>0</td><td>69742925668851205</td></tr>\n",
@@ -328,7 +318,7 @@
"6757061941303252736 1 0 69742856540241198"
]
},
"execution_count": 7,
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
@@ -349,7 +339,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 35,
"metadata": {},
"outputs": [
{
@@ -368,7 +358,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 36,
"metadata": {},
"outputs": [
{
@@ -458,7 +448,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 37,
"metadata": {},
"outputs": [
{
@@ -518,7 +508,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
@@ -531,7 +521,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 39,
"metadata": {},
"outputs": [
{
@@ -548,7 +538,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 40,
"metadata": {
"scrolled": true
},
@@ -557,7 +547,7 @@
"data": {
"text/html": [
"<i>Table length=5</i>\n",
"<table id=\"table140104844641184\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140523984535712\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>obj_id</th><th>g_mean_psf_mag</th><th>i_mean_psf_mag</th></tr></thead>\n",
"<thead><tr><th></th><th></th><th>mag</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th></tr></thead>\n",
@@ -581,7 +571,7 @@
"67553513677687787 -- 21.2831001281738"
]
},
"execution_count": 13,
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
@@ -625,7 +615,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
@@ -648,7 +638,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 42,
"metadata": {},
"outputs": [
{
@@ -667,7 +657,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 43,
"metadata": {
"scrolled": true
},
@@ -676,7 +666,7 @@
"data": {
"text/html": [
"<i>Table length=10</i>\n",
"<table id=\"table140104380877264\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140523908331168\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>source_id</th></tr></thead>\n",
"<thead><tr><th>int64</th></tr></thead>\n",
"<tr><td>3322773965056065536</td></tr>\n",
@@ -708,7 +698,7 @@
"3322773930696322176"
]
},
"execution_count": 16,
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
@@ -728,7 +718,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 44,
"metadata": {},
"outputs": [],
"source": [
@@ -750,7 +740,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 45,
"metadata": {},
"outputs": [
{
@@ -783,7 +773,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 46,
"metadata": {},
"outputs": [
{
@@ -800,7 +790,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 47,
"metadata": {
"scrolled": true
},
@@ -809,7 +799,7 @@
"data": {
"text/html": [
"<i>Table length=594</i>\n",
"<table id=\"table140104380909264\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140523908331456\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>source_id</th><th>ra</th><th>dec</th><th>pmra</th><th>pmdec</th></tr></thead>\n",
"<thead><tr><th></th><th>deg</th><th>deg</th><th>mas / yr</th><th>mas / yr</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th></tr></thead>\n",
@@ -863,7 +853,7 @@
"3322962015904143872 88.74740822271643 ... 0.5565841272341593"
]
},
"execution_count": 20,
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
@@ -893,7 +883,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 48,
"metadata": {},
"outputs": [],
"source": [
@@ -925,7 +915,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 49,
"metadata": {},
"outputs": [
{
@@ -961,7 +951,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 50,
"metadata": {},
"outputs": [
{
@@ -978,7 +968,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 51,
"metadata": {
"scrolled": true
},
@@ -987,7 +977,7 @@
"data": {
"text/html": [
"<i>Table length=490</i>\n",
"<table id=\"table140104380908352\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140524639163968\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>source_id</th><th>ra</th><th>dec</th><th>pmra</th><th>pmdec</th><th>best_neighbour_multiplicity</th><th>number_of_mates</th></tr></thead>\n",
"<thead><tr><th></th><th>deg</th><th>deg</th><th>mas / yr</th><th>mas / yr</th><th></th><th></th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int16</th></tr></thead>\n",
@@ -1041,7 +1031,7 @@
"3322962015904143872 88.74740822271643 ... 0"
]
},
"execution_count": 24,
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
@@ -1079,9 +1069,90 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 52,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"SELECT \n",
"gaia.source_id, gaia.ra, gaia.dec, gaia.pmra, gaia.pmdec, best.best_neighbour_multiplicity, best.number_of_mates, ps.g_mean_psf_mag, ps.i_mean_psf_mag\n",
"FROM gaiadr2.gaia_source as gaia\n",
"JOIN gaiadr2.panstarrs1_best_neighbour as best\n",
" ON gaia.source_id = best.source_id\n",
"JOIN gaiadr2.panstarrs1_original_valid as ps\n",
" ON best.original_ext_source_id = ps.obj_id\n",
"WHERE 1=CONTAINS(\n",
" POINT(gaia.ra, gaia.dec),\n",
" CIRCLE(88.8, 7.4, 0.08333333))\n",
"\n",
"INFO: Query finished. [astroquery.utils.tap.core]\n"
]
},
{
"data": {
"text/html": [
"<i>Table length=490</i>\n",
"<table id=\"table140524639164304\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>source_id</th><th>ra</th><th>dec</th><th>pmra</th><th>pmdec</th><th>best_neighbour_multiplicity</th><th>number_of_mates</th><th>g_mean_psf_mag</th><th>i_mean_psf_mag</th></tr></thead>\n",
"<thead><tr><th></th><th>deg</th><th>deg</th><th>mas / yr</th><th>mas / yr</th><th></th><th></th><th></th><th>mag</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int16</th><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>3322773965056065536</td><td>88.78178020183375</td><td>7.334936530583141</td><td>0.2980633722108194</td><td>-2.5057036964736907</td><td>1</td><td>0</td><td>19.9431991577148</td><td>17.4221992492676</td></tr>\n",
"<tr><td>3322774068134271104</td><td>88.8206092188033</td><td>7.353158142762173</td><td>-1.1065462654445488</td><td>-1.5260889445858044</td><td>1</td><td>0</td><td>18.6212005615234</td><td>16.6007995605469</td></tr>\n",
"<tr><td>3322773930696320512</td><td>88.80843339290348</td><td>7.334853162299928</td><td>2.6074384482375215</td><td>-0.9292104395445717</td><td>1</td><td>0</td><td>--</td><td>20.2203998565674</td></tr>\n",
"<tr><td>3322774377374425728</td><td>88.86806108182265</td><td>7.371287731275939</td><td>3.9555477866915383</td><td>-3.8676624830902435</td><td>1</td><td>0</td><td>18.0676002502441</td><td>16.9762001037598</td></tr>\n",
"<tr><td>3322773724537891456</td><td>88.81308602813434</td><td>7.32488574492059</td><td>51.34995462741039</td><td>-33.078133430952086</td><td>1</td><td>0</td><td>20.1907005310059</td><td>17.8700008392334</td></tr>\n",
"<tr><td>3322773724537891328</td><td>88.81570329208743</td><td>7.3223019772324855</td><td>1.9389988498951845</td><td>0.3110526931576576</td><td>1</td><td>0</td><td>22.6308002471924</td><td>19.6004009246826</td></tr>\n",
"<tr><td>3322773930696321792</td><td>88.8050736770331</td><td>7.332371472206583</td><td>2.264014834476311</td><td>1.0772755505138008</td><td>1</td><td>0</td><td>21.2119998931885</td><td>18.3528003692627</td></tr>\n",
"<tr><td>3322773724537890944</td><td>88.81241651540533</td><td>7.327864052479726</td><td>-0.36003627434304625</td><td>-6.393939291541333</td><td>1</td><td>0</td><td>20.8094005584717</td><td>18.1343002319336</td></tr>\n",
"<tr><td>3322773930696322176</td><td>88.80128682574824</td><td>7.334292036448643</td><td>--</td><td>--</td><td>1</td><td>0</td><td>19.7306003570557</td><td>--</td></tr>\n",
"<tr><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td></tr>\n",
"<tr><td>3322962359501481088</td><td>88.85037722908271</td><td>7.402162717053584</td><td>2.058216493648542</td><td>-2.249255322558584</td><td>1</td><td>0</td><td>17.4034996032715</td><td>15.9040002822876</td></tr>\n",
"<tr><td>3322962393861228544</td><td>88.82108234976155</td><td>7.4044425496203</td><td>-0.916760881643629</td><td>-1.1113319053861441</td><td>1</td><td>0</td><td>--</td><td>--</td></tr>\n",
"<tr><td>3322955831151254912</td><td>88.74620347799508</td><td>7.342728619145855</td><td>0.1559833902071379</td><td>-1.750598455959734</td><td>1</td><td>0</td><td>18.4960994720459</td><td>17.3892993927002</td></tr>\n",
"<tr><td>3322962118983356032</td><td>88.76109637722949</td><td>7.380564308268047</td><td>--</td><td>--</td><td>1</td><td>0</td><td>18.0643997192383</td><td>16.7395000457764</td></tr>\n",
"<tr><td>3322963527732585984</td><td>88.78813701704823</td><td>7.456696889759524</td><td>1.1363354614104264</td><td>-2.46251296961979</td><td>1</td><td>0</td><td>17.8034992218018</td><td>16.1214008331299</td></tr>\n",
"<tr><td>3322961775385969024</td><td>88.79723215862369</td><td>7.359756552906535</td><td>2.121021366548921</td><td>-6.605711792572964</td><td>1</td><td>0</td><td>18.2070007324219</td><td>15.9947996139526</td></tr>\n",
"<tr><td>3322962084625312512</td><td>88.78286756313868</td><td>7.384598632215225</td><td>-0.09350717810996487</td><td>1.3495903680571226</td><td>1</td><td>0</td><td>16.7978992462158</td><td>15.1180000305176</td></tr>\n",
"<tr><td>3322962939322692608</td><td>88.73289357818679</td><td>7.407688975612043</td><td>-0.11002934783569704</td><td>1.002126813991455</td><td>1</td><td>0</td><td>17.18630027771</td><td>16.3645992279053</td></tr>\n",
"<tr><td>3322963459013111808</td><td>88.80348931842845</td><td>7.438699901204871</td><td>0.800833828337078</td><td>-3.3780655466364626</td><td>1</td><td>0</td><td>--</td><td>16.294900894165</td></tr>\n",
"<tr><td>3322962015904143872</td><td>88.74740822271643</td><td>7.387057037713974</td><td>-0.7201178533250112</td><td>0.5565841272341593</td><td>1</td><td>0</td><td>18.4706993103027</td><td>16.8038005828857</td></tr>\n",
"</table>"
],
"text/plain": [
"<Table length=490>\n",
" source_id ra ... g_mean_psf_mag i_mean_psf_mag \n",
" deg ... mag \n",
" int64 float64 ... float64 float64 \n",
"------------------- ----------------- ... ---------------- ----------------\n",
"3322773965056065536 88.78178020183375 ... 19.9431991577148 17.4221992492676\n",
"3322774068134271104 88.8206092188033 ... 18.6212005615234 16.6007995605469\n",
"3322773930696320512 88.80843339290348 ... -- 20.2203998565674\n",
"3322774377374425728 88.86806108182265 ... 18.0676002502441 16.9762001037598\n",
"3322773724537891456 88.81308602813434 ... 20.1907005310059 17.8700008392334\n",
"3322773724537891328 88.81570329208743 ... 22.6308002471924 19.6004009246826\n",
"3322773930696321792 88.8050736770331 ... 21.2119998931885 18.3528003692627\n",
"3322773724537890944 88.81241651540533 ... 20.8094005584717 18.1343002319336\n",
"3322773930696322176 88.80128682574824 ... 19.7306003570557 --\n",
" ... ... ... ... ...\n",
"3322962359501481088 88.85037722908271 ... 17.4034996032715 15.9040002822876\n",
"3322962393861228544 88.82108234976155 ... -- --\n",
"3322955831151254912 88.74620347799508 ... 18.4960994720459 17.3892993927002\n",
"3322962118983356032 88.76109637722949 ... 18.0643997192383 16.7395000457764\n",
"3322963527732585984 88.78813701704823 ... 17.8034992218018 16.1214008331299\n",
"3322961775385969024 88.79723215862369 ... 18.2070007324219 15.9947996139526\n",
"3322962084625312512 88.78286756313868 ... 16.7978992462158 15.1180000305176\n",
"3322962939322692608 88.73289357818679 ... 17.18630027771 16.3645992279053\n",
"3322963459013111808 88.80348931842845 ... -- 16.294900894165\n",
"3322962015904143872 88.74740822271643 ... 18.4706993103027 16.8038005828857"
]
},
"execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Solution\n",
"\n",
@@ -1130,7 +1201,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 53,
"metadata": {},
"outputs": [],
"source": [
@@ -1155,7 +1226,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 54,
"metadata": {},
"outputs": [
{
@@ -1166,7 +1237,7 @@
"dtype: object"
]
},
"execution_count": 30,
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
@@ -1188,7 +1259,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 55,
"metadata": {},
"outputs": [
{
@@ -1227,7 +1298,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 56,
"metadata": {},
"outputs": [
{
@@ -1244,7 +1315,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 57,
"metadata": {
"scrolled": true
},
@@ -1253,7 +1324,7 @@
"data": {
"text/html": [
"<i>Table length=7345</i>\n",
"<table id=\"table140104380909120\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140523982340048\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>source_id</th><th>ra</th><th>dec</th><th>pmra</th><th>pmdec</th></tr></thead>\n",
"<thead><tr><th></th><th>deg</th><th>deg</th><th>mas / yr</th><th>mas / yr</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th></tr></thead>\n",
@@ -1307,7 +1378,7 @@
"612429144902815104 134.77293979509543 ... -13.962312685889454"
]
},
"execution_count": 33,
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
@@ -1333,9 +1404,94 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 58,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"SELECT \n",
"gaia.source_id, gaia.ra, gaia.dec, gaia.pmra, gaia.pmdec, best.best_neighbour_multiplicity, best.number_of_mates, ps.g_mean_psf_mag, ps.i_mean_psf_mag\n",
"FROM gaiadr2.gaia_source as gaia\n",
"JOIN gaiadr2.panstarrs1_best_neighbour as best\n",
" ON gaia.source_id = best.source_id\n",
"JOIN gaiadr2.panstarrs1_original_valid as ps\n",
" ON best.original_ext_source_id = ps.obj_id\n",
"WHERE parallax < 1\n",
" AND bp_rp BETWEEN -0.75 AND 2 \n",
" AND 1 = CONTAINS(POINT(gaia.ra, gaia.dec), \n",
" POLYGON(135.306, 8.39862, 126.51, 13.4449, 163.017, 54.2424, 172.933, 46.4726, 135.306, 8.39862))\n",
" AND 1 = CONTAINS(POINT(gaia.pmra, gaia.pmdec),\n",
" POLYGON( -4.05037121,-14.75623261, -3.41981085,-14.72365546, -3.03521988,-14.44357135, -2.26847919,-13.7140236 , -2.61172203,-13.24797471, -2.73471401,-13.09054471, -3.19923146,-12.5942653 , -3.34082546,-12.47611926, -5.67489413,-11.16083338, -5.95159272,-11.10547884, -6.42394023,-11.05981295, -7.09631023,-11.95187806, -7.30641519,-12.24559977, -7.04016696,-12.88580702, -6.00347705,-13.75912098, -4.42442296,-14.74641176))\n",
"\n",
"INFO: Query finished. [astroquery.utils.tap.core]\n"
]
},
{
"data": {
"text/html": [
"<i>Table length=3725</i>\n",
"<table id=\"table140523908446480\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>source_id</th><th>ra</th><th>dec</th><th>pmra</th><th>pmdec</th><th>best_neighbour_multiplicity</th><th>number_of_mates</th><th>g_mean_psf_mag</th><th>i_mean_psf_mag</th></tr></thead>\n",
"<thead><tr><th></th><th>deg</th><th>deg</th><th>mas / yr</th><th>mas / yr</th><th></th><th></th><th></th><th>mag</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int16</th><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>635860218726658176</td><td>138.5187065217173</td><td>19.09233926905897</td><td>-5.941679495793577</td><td>-11.346409129876392</td><td>1</td><td>0</td><td>17.8978004455566</td><td>17.5174007415771</td></tr>\n",
"<tr><td>635674126383965568</td><td>138.8428741026386</td><td>19.031798198627634</td><td>-3.8970011609340207</td><td>-12.702779525389634</td><td>1</td><td>0</td><td>19.2873001098633</td><td>17.6781005859375</td></tr>\n",
"<tr><td>635535454774983040</td><td>137.8377518255436</td><td>18.864006786112604</td><td>-4.335040664412791</td><td>-14.492308604905652</td><td>1</td><td>0</td><td>16.9237995147705</td><td>16.478099822998</td></tr>\n",
"<tr><td>635497276810313600</td><td>138.0445160213759</td><td>19.00947118796605</td><td>-7.1729306406216615</td><td>-12.291499169815987</td><td>1</td><td>0</td><td>19.9242000579834</td><td>18.3339996337891</td></tr>\n",
"<tr><td>635614168640132864</td><td>139.59219748145836</td><td>18.807955539071433</td><td>-3.309602916796381</td><td>-13.708904908478631</td><td>1</td><td>0</td><td>16.1515998840332</td><td>14.6662998199463</td></tr>\n",
"<tr><td>635598607974369792</td><td>139.20920023089508</td><td>18.624132868942702</td><td>-6.124445176881091</td><td>-12.833824027100611</td><td>1</td><td>0</td><td>16.5223999023438</td><td>16.1375007629395</td></tr>\n",
"<tr><td>635737661835496576</td><td>139.93327552473934</td><td>19.167962454651423</td><td>-7.119403303682826</td><td>-12.687947497633793</td><td>1</td><td>0</td><td>14.5032997131348</td><td>13.9849004745483</td></tr>\n",
"<tr><td>635850945892748672</td><td>139.86542888472115</td><td>20.011312663154804</td><td>-3.786655365804428</td><td>-14.28415600718206</td><td>1</td><td>0</td><td>16.5174999237061</td><td>16.0450000762939</td></tr>\n",
"<tr><td>635600532119713664</td><td>139.22869949616816</td><td>18.685939084485494</td><td>-3.9742788217925122</td><td>-12.342426623384245</td><td>1</td><td>0</td><td>20.4505996704102</td><td>19.5177001953125</td></tr>\n",
"<tr><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td></tr>\n",
"<tr><td>612241781249124608</td><td>134.3755835065194</td><td>18.129179169751275</td><td>-2.831807894848964</td><td>-13.902118573613597</td><td>1</td><td>0</td><td>20.2343997955322</td><td>18.6518001556396</td></tr>\n",
"<tr><td>612332147361443072</td><td>134.14584721363653</td><td>18.45685585044513</td><td>-6.234287981021865</td><td>-11.500464195695072</td><td>1</td><td>0</td><td>21.3848991394043</td><td>20.3076000213623</td></tr>\n",
"<tr><td>612426744016802432</td><td>134.68522805061076</td><td>18.77090626983678</td><td>-3.7691372464459554</td><td>-12.889167493118862</td><td>1</td><td>0</td><td>17.8281002044678</td><td>17.4281005859375</td></tr>\n",
"<tr><td>612331739340341760</td><td>134.12176196902254</td><td>18.42768872157865</td><td>-3.9894012386388735</td><td>-12.60504410507441</td><td>1</td><td>0</td><td>21.8656997680664</td><td>19.5223007202148</td></tr>\n",
"<tr><td>612282738058264960</td><td>134.0445768189235</td><td>18.11915820167003</td><td>-2.5972485319419127</td><td>-13.651740929272187</td><td>1</td><td>0</td><td>22.5151996612549</td><td>19.9743995666504</td></tr>\n",
"<tr><td>612386332668697600</td><td>135.45701048323093</td><td>18.63266345155342</td><td>-5.07684899854408</td><td>-12.436641304786672</td><td>1</td><td>0</td><td>19.3792991638184</td><td>17.9923000335693</td></tr>\n",
"<tr><td>612296172717818624</td><td>133.80060286960668</td><td>18.08186533343457</td><td>-6.112792578821885</td><td>-12.50750861370402</td><td>1</td><td>0</td><td>17.4944000244141</td><td>16.926700592041</td></tr>\n",
"<tr><td>612250375480101760</td><td>134.64754712466774</td><td>18.122419425065015</td><td>-2.8969262278467127</td><td>-14.061676353845487</td><td>1</td><td>0</td><td>15.3330001831055</td><td>14.6280002593994</td></tr>\n",
"<tr><td>612394926899159168</td><td>135.51997060013844</td><td>18.817675531233004</td><td>-3.9968965218753763</td><td>-13.526821099431533</td><td>1</td><td>0</td><td>16.4414005279541</td><td>15.8212003707886</td></tr>\n",
"<tr><td>612256418500423168</td><td>134.90752972739924</td><td>18.280596648172743</td><td>-6.109836304219565</td><td>-12.145212331165776</td><td>1</td><td>0</td><td>20.8715991973877</td><td>19.9612007141113</td></tr>\n",
"</table>"
],
"text/plain": [
"<Table length=3725>\n",
" source_id ra ... g_mean_psf_mag i_mean_psf_mag \n",
" deg ... mag \n",
" int64 float64 ... float64 float64 \n",
"------------------ ------------------ ... ---------------- ----------------\n",
"635860218726658176 138.5187065217173 ... 17.8978004455566 17.5174007415771\n",
"635674126383965568 138.8428741026386 ... 19.2873001098633 17.6781005859375\n",
"635535454774983040 137.8377518255436 ... 16.9237995147705 16.478099822998\n",
"635497276810313600 138.0445160213759 ... 19.9242000579834 18.3339996337891\n",
"635614168640132864 139.59219748145836 ... 16.1515998840332 14.6662998199463\n",
"635598607974369792 139.20920023089508 ... 16.5223999023438 16.1375007629395\n",
"635737661835496576 139.93327552473934 ... 14.5032997131348 13.9849004745483\n",
"635850945892748672 139.86542888472115 ... 16.5174999237061 16.0450000762939\n",
"635600532119713664 139.22869949616816 ... 20.4505996704102 19.5177001953125\n",
" ... ... ... ... ...\n",
"612241781249124608 134.3755835065194 ... 20.2343997955322 18.6518001556396\n",
"612332147361443072 134.14584721363653 ... 21.3848991394043 20.3076000213623\n",
"612426744016802432 134.68522805061076 ... 17.8281002044678 17.4281005859375\n",
"612331739340341760 134.12176196902254 ... 21.8656997680664 19.5223007202148\n",
"612282738058264960 134.0445768189235 ... 22.5151996612549 19.9743995666504\n",
"612386332668697600 135.45701048323093 ... 19.3792991638184 17.9923000335693\n",
"612296172717818624 133.80060286960668 ... 17.4944000244141 16.926700592041\n",
"612250375480101760 134.64754712466774 ... 15.3330001831055 14.6280002593994\n",
"612394926899159168 135.51997060013844 ... 16.4414005279541 15.8212003707886\n",
"612256418500423168 134.90752972739924 ... 20.8715991973877 19.9612007141113"
]
},
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Solution\n",
"\n",
@@ -1379,7 +1535,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 59,
"metadata": {},
"outputs": [
{
@@ -1443,7 +1599,7 @@
" 1"
]
},
"execution_count": 38,
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
@@ -1463,7 +1619,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 60,
"metadata": {},
"outputs": [
{
@@ -1480,7 +1636,7 @@
"dtype: float64"
]
},
"execution_count": 39,
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
@@ -1503,7 +1659,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 61,
"metadata": {},
"outputs": [
{
@@ -1520,7 +1676,7 @@
"dtype: float64"
]
},
"execution_count": 40,
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
}
@@ -1550,7 +1706,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 62,
"metadata": {},
"outputs": [],
"source": [
@@ -1595,7 +1751,7 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 63,
"metadata": {},
"outputs": [],
"source": [
@@ -1611,7 +1767,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": 64,
"metadata": {},
"outputs": [
{
@@ -1657,7 +1813,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 65,
"metadata": {},
"outputs": [],
"source": [
@@ -1675,16 +1831,16 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 66,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"5.574869155883789"
"3.5835609436035156"
]
},
"execution_count": 45,
"execution_count": 66,
"metadata": {},
"output_type": "execute_result"
}
@@ -1729,7 +1885,7 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 67,
"metadata": {},
"outputs": [],
"source": [
@@ -1745,7 +1901,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 68,
"metadata": {},
"outputs": [
{
@@ -1754,7 +1910,7 @@
"0.7606849670410156"
]
},
"execution_count": 47,
"execution_count": 68,
"metadata": {},
"output_type": "execute_result"
}
@@ -1772,7 +1928,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 69,
"metadata": {},
"outputs": [],
"source": [
@@ -1785,7 +1941,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 70,
"metadata": {},
"outputs": [
{
@@ -1816,7 +1972,7 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 71,
"metadata": {},
"outputs": [],
"source": [
@@ -1832,7 +1988,7 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 72,
"metadata": {},
"outputs": [
{
@@ -1941,7 +2097,7 @@
"2 16.478100 -59.785300 -1.594569 -9.357536 -1.218492 "
]
},
"execution_count": 51,
"execution_count": 72,
"metadata": {},
"output_type": "execute_result"
}
@@ -1952,7 +2108,7 @@
},
{
"cell_type": "code",
"execution_count": 52,
"execution_count": 73,
"metadata": {},
"outputs": [
{
@@ -2065,7 +2221,7 @@
"2 16.478100 -59.785300 -1.594569 -9.357536 -1.218492 "
]
},
"execution_count": 52,
"execution_count": 73,
"metadata": {},
"output_type": "execute_result"
}

View File

@@ -74,71 +74,48 @@
},
{
"cell_type": "markdown",
"metadata": {
"tags": [
"remove-cell"
]
},
"metadata": {},
"source": [
"## Installing libraries\n",
"## Reload the data\n",
"\n",
"If you are running this notebook on Colab, you can run the following cell to install the libraries we'll use.\n",
"\n",
"If you are running this notebook on your own computer, you might have to install these libraries yourself. See the instructions in the preface."
"You can [download the data from the previous lesson](https://github.com/AllenDowney/AstronomicalData/raw/main/data/gd1_data.hdf) or run the following cell, which downloads it if necessary."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": [
"remove-cell"
]
},
"execution_count": 47,
"metadata": {},
"outputs": [],
"source": [
"# If we're running on Colab, install libraries\n",
"from os.path import basename, exists\n",
"\n",
"import sys\n",
"IN_COLAB = 'google.colab' in sys.modules\n",
"def download(url):\n",
" filename = basename(url)\n",
" if not exists(filename):\n",
" from urllib.request import urlretrieve\n",
" local, _ = urlretrieve(url, filename)\n",
" print('Downloaded ' + local)\n",
"\n",
"if IN_COLAB:\n",
" !pip install wget"
"download('https://github.com/AllenDowney/AstronomicalData/raw/main/' +\n",
" 'data/gd1_data.hdf')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reload the data\n",
"\n",
"The following cell downloads the photometry data we created in the previous notebook."
"Now we can reload `candidate_df`."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"from wget import download\n",
"\n",
"filename = 'gd1_data.hdf'\n",
"filepath = 'https://github.com/AllenDowney/AstronomicalData/raw/main/data/'\n",
"\n",
"if not os.path.exists(filename):\n",
" print(download(filepath+filename))"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 48,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"\n",
"filename = 'gd1_data.hdf'\n",
"candidate_df = pd.read_hdf(filename, 'candidate_df')"
]
},
@@ -174,7 +151,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 49,
"metadata": {},
"outputs": [],
"source": [
@@ -230,7 +207,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 50,
"metadata": {},
"outputs": [
{
@@ -286,18 +263,12 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 51,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"from wget import download\n",
"\n",
"filename = 'MIST_iso_5fd2532653c27.iso.cmd'\n",
"filepath = 'https://github.com/AllenDowney/AstronomicalData/raw/main/data/'\n",
"\n",
"if not os.path.exists(filename):\n",
" print(download(filepath+filename))"
"download('https://github.com/AllenDowney/AstronomicalData/raw/main/' +\n",
" 'data/MIST_iso_5fd2532653c27.iso.cmd')"
]
},
{
@@ -309,18 +280,12 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 52,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"from wget import download\n",
"\n",
"filename = 'read_mist_models.py'\n",
"filepath = 'https://github.com/jieunchoi/MIST_codes/raw/master/scripts/'\n",
"\n",
"if not os.path.exists(filename):\n",
" print(download(filepath+filename))"
"download('https://github.com/jieunchoi/MIST_codes/raw/master/scripts/' +\n",
" 'read_mist_models.py')"
]
},
{
@@ -332,7 +297,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 53,
"metadata": {},
"outputs": [
{
@@ -359,7 +324,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 54,
"metadata": {},
"outputs": [
{
@@ -368,7 +333,7 @@
"read_mist_models.ISOCMD"
]
},
"execution_count": 9,
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
@@ -386,7 +351,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 55,
"metadata": {},
"outputs": [
{
@@ -395,7 +360,7 @@
"list"
]
},
"execution_count": 10,
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
@@ -413,7 +378,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 56,
"metadata": {},
"outputs": [
{
@@ -422,7 +387,7 @@
"1"
]
},
"execution_count": 11,
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
@@ -440,7 +405,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 57,
"metadata": {},
"outputs": [],
"source": [
@@ -456,7 +421,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 58,
"metadata": {},
"outputs": [
{
@@ -465,7 +430,7 @@
"numpy.ndarray"
]
},
"execution_count": 13,
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
@@ -483,7 +448,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 59,
"metadata": {},
"outputs": [
{
@@ -492,7 +457,7 @@
"dtype([('EEP', '<i4'), ('isochrone_age_yr', '<f8'), ('initial_mass', '<f8'), ('star_mass', '<f8'), ('log_Teff', '<f8'), ('log_g', '<f8'), ('log_L', '<f8'), ('[Fe/H]_init', '<f8'), ('[Fe/H]', '<f8'), ('PS_g', '<f8'), ('PS_r', '<f8'), ('PS_i', '<f8'), ('PS_z', '<f8'), ('PS_y', '<f8'), ('PS_w', '<f8'), ('PS_open', '<f8'), ('phase', '<f8')])"
]
},
"execution_count": 14,
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
@@ -510,7 +475,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 60,
"metadata": {},
"outputs": [
{
@@ -519,7 +484,7 @@
"array([0., 0., 0., ..., 6., 6., 6.])"
]
},
"execution_count": 15,
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
@@ -537,7 +502,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 61,
"metadata": {},
"outputs": [
{
@@ -546,7 +511,7 @@
"354"
]
},
"execution_count": 16,
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
}
@@ -558,7 +523,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 62,
"metadata": {},
"outputs": [
{
@@ -567,7 +532,7 @@
"354"
]
},
"execution_count": 17,
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
@@ -590,7 +555,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 63,
"metadata": {},
"outputs": [
{
@@ -599,7 +564,7 @@
"14.4604730134524"
]
},
"execution_count": 18,
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
@@ -622,7 +587,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 64,
"metadata": {},
"outputs": [],
"source": [
@@ -639,7 +604,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 65,
"metadata": {},
"outputs": [
{
@@ -673,7 +638,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 66,
"metadata": {},
"outputs": [
{
@@ -740,7 +705,7 @@
"4 27.780024 2.058585"
]
},
"execution_count": 21,
"execution_count": 66,
"metadata": {},
"output_type": "execute_result"
}
@@ -764,7 +729,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 67,
"metadata": {},
"outputs": [],
"source": [
@@ -783,18 +748,12 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 68,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"from wget import download\n",
"\n",
"filename = 'gd1_isochrone.hdf5'\n",
"filepath = 'https://github.com/AllenDowney/AstronomicalData/raw/main/data/'\n",
"\n",
"if not os.path.exists(filename):\n",
" print(download(filepath+filename))"
"download('https://github.com/AllenDowney/AstronomicalData/raw/main/data/' +\n",
" 'gd1_isochrone.hdf5')"
]
},
{
@@ -806,7 +765,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 69,
"metadata": {},
"outputs": [
{
@@ -873,12 +832,13 @@
"4 27.780024 2.058585"
]
},
"execution_count": 24,
"execution_count": 69,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"filename = 'gd1_isochrone.hdf5'\n",
"iso_df = pd.read_hdf(filename, 'iso_df')\n",
"iso_df.head()"
]
@@ -892,7 +852,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 70,
"metadata": {},
"outputs": [
{
@@ -928,7 +888,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 71,
"metadata": {},
"outputs": [
{
@@ -937,7 +897,7 @@
"117"
]
},
"execution_count": 26,
"execution_count": 71,
"metadata": {},
"output_type": "execute_result"
}
@@ -958,7 +918,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 72,
"metadata": {},
"outputs": [
{
@@ -1025,7 +985,7 @@
"98 21.054549 0.605461"
]
},
"execution_count": 27,
"execution_count": 72,
"metadata": {},
"output_type": "execute_result"
}
@@ -1046,7 +1006,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 73,
"metadata": {},
"outputs": [],
"source": [
@@ -1066,7 +1026,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 74,
"metadata": {},
"outputs": [],
"source": [
@@ -1084,7 +1044,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 75,
"metadata": {},
"outputs": [
{
@@ -1124,7 +1084,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 76,
"metadata": {},
"outputs": [],
"source": [
@@ -1158,7 +1118,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 77,
"metadata": {},
"outputs": [
{
@@ -1167,7 +1127,7 @@
"(234,)"
]
},
"execution_count": 32,
"execution_count": 77,
"metadata": {},
"output_type": "execute_result"
}
@@ -1186,7 +1146,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 78,
"metadata": {},
"outputs": [
{
@@ -1195,7 +1155,7 @@
"(234,)"
]
},
"execution_count": 33,
"execution_count": 78,
"metadata": {},
"output_type": "execute_result"
}
@@ -1214,7 +1174,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 79,
"metadata": {},
"outputs": [
{
@@ -1244,7 +1204,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 80,
"metadata": {},
"outputs": [
{
@@ -1311,7 +1271,7 @@
"4 0.545461 21.054549"
]
},
"execution_count": 35,
"execution_count": 80,
"metadata": {},
"output_type": "execute_result"
}
@@ -1332,16 +1292,16 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 81,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.patches.Polygon at 0x7fd8a96084f0>"
"<matplotlib.patches.Polygon at 0x7f439d33fdf0>"
]
},
"execution_count": 36,
"execution_count": 81,
"metadata": {},
"output_type": "execute_result"
}
@@ -1364,7 +1324,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 82,
"metadata": {},
"outputs": [],
"source": [
@@ -1381,7 +1341,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 83,
"metadata": {},
"outputs": [
{
@@ -1390,7 +1350,7 @@
"array([ True, False])"
]
},
"execution_count": 38,
"execution_count": 83,
"metadata": {},
"output_type": "execute_result"
}
@@ -1427,7 +1387,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 84,
"metadata": {},
"outputs": [],
"source": [
@@ -1447,7 +1407,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 85,
"metadata": {},
"outputs": [
{
@@ -1514,7 +1474,7 @@
"4 1.4853 16.1516"
]
},
"execution_count": 40,
"execution_count": 85,
"metadata": {},
"output_type": "execute_result"
}
@@ -1537,7 +1497,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 86,
"metadata": {},
"outputs": [
{
@@ -1546,7 +1506,7 @@
"array([False, False, False, ..., False, False, False])"
]
},
"execution_count": 41,
"execution_count": 86,
"metadata": {},
"output_type": "execute_result"
}
@@ -1565,7 +1525,7 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 87,
"metadata": {},
"outputs": [
{
@@ -1574,7 +1534,7 @@
"454"
]
},
"execution_count": 42,
"execution_count": 87,
"metadata": {},
"output_type": "execute_result"
}
@@ -1592,7 +1552,7 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": 88,
"metadata": {},
"outputs": [],
"source": [
@@ -1608,7 +1568,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 89,
"metadata": {},
"outputs": [
{
@@ -1645,7 +1605,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 90,
"metadata": {},
"outputs": [
{
@@ -1698,7 +1658,7 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 91,
"metadata": {},
"outputs": [],
"source": [
@@ -1708,16 +1668,16 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 92,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2.512819290161133"
"3.6441001892089844"
]
},
"execution_count": 47,
"execution_count": 92,
"metadata": {},
"output_type": "execute_result"
}

File diff suppressed because one or more lines are too long