|
10 | 10 | "Adrian Price-Whelan\n", |
11 | 11 | "\n", |
12 | 12 | "## Learning Goals\n", |
13 | | - "* TODO\n", |
| 13 | + "* Demonstrate how to retrieve a catalog from Vizier using astroquery\n", |
| 14 | + "* Show how to perform positional cross-matches between catalogs of sky coordinates\n", |
14 | 15 | "\n", |
15 | 16 | "## Keywords\n", |
16 | 17 | "coordinates, OOP, astroquery, gaia\n", |
|
354 | 355 | "For more on what matching options are available, check out the [separation and matching section of the Astropy documentation](https://astropy.readthedocs.io/en/stable/coordinates/matchsep.html). Or for more on what you can do with `SkyCoord`, see [its API documentation](http://astropy.readthedocs.org/en/stable/api/astropy.coordinates.SkyCoord.html)." |
355 | 356 | ] |
356 | 357 | }, |
357 | | - { |
358 | | - "cell_type": "markdown", |
359 | | - "metadata": {}, |
360 | | - "source": [ |
361 | | - "### Exercises" |
362 | | - ] |
363 | | - }, |
364 | | - { |
365 | | - "cell_type": "markdown", |
366 | | - "metadata": {}, |
367 | | - "source": [ |
368 | | - "TODO - update exercises!" |
369 | | - ] |
370 | | - }, |
371 | | - { |
372 | | - "cell_type": "markdown", |
373 | | - "metadata": {}, |
374 | | - "source": [ |
375 | | - "Using the coordinates of the center of the Pleiades you defined in the previous set of exercises, download a catalog of 2MASS sources within 1 degree of the center of the Pleiades. Make a color-magnitude diagram of J-H vs. J for all sources. Can you see the main sequence corresponding to the Pleiades?" |
376 | | - ] |
377 | | - }, |
378 | | - { |
379 | | - "cell_type": "code", |
380 | | - "execution_count": null, |
381 | | - "metadata": {}, |
382 | | - "outputs": [], |
383 | | - "source": [ |
384 | | - "# v = Vizier(catalog=\"II/246\") \n", |
385 | | - "# v.ROW_LIMIT = -1\n", |
386 | | - "\n", |
387 | | - "# result = v.query_region(pleiades_center, radius=1*u.deg)\n", |
388 | | - "# tmass_table_pleiades = result[0]" |
389 | | - ] |
390 | | - }, |
391 | | - { |
392 | | - "cell_type": "code", |
393 | | - "execution_count": null, |
394 | | - "metadata": {}, |
395 | | - "outputs": [], |
396 | | - "source": [ |
397 | | - "# Jmag_p = tmass_table_pleiades['Jmag']\n", |
398 | | - "# Hmag_p = tmass_table_pleiades['Hmag']\n", |
399 | | - "\n", |
400 | | - "# plt.scatter(Jmag_p - Hmag_p, Jmag_p,\n", |
401 | | - "# marker='o', color='k', \n", |
402 | | - "# linewidth=0, alpha=0.5)\n", |
403 | | - "# plt.xlim(-0.4, 0.75)\n", |
404 | | - "# plt.ylim(12, 2)" |
405 | | - ] |
406 | | - }, |
407 | | - { |
408 | | - "cell_type": "markdown", |
409 | | - "metadata": {}, |
410 | | - "source": [ |
411 | | - "Again using the coordinates of the center of the Pleiades, now download all *Gaia* sources within 1 degree of the center of the Pleiades. Cross-match the 2MASS and *Gaia* sources, and make a G-J vs. G color-magnitude diagram of all sources within 200 parsecs of the Sun." |
412 | | - ] |
413 | | - }, |
414 | | - { |
415 | | - "cell_type": "code", |
416 | | - "execution_count": null, |
417 | | - "metadata": {}, |
418 | | - "outputs": [], |
419 | | - "source": [ |
420 | | - "# Gaia.ROW_LIMIT = 10_000\n", |
421 | | - "# job = Gaia.cone_search_async(pleiades_center, radius=1*u.deg)\n", |
422 | | - "# gaia_table_pleiades = job.get_results()\n", |
423 | | - "\n", |
424 | | - "# # This might produce a bunch of warnings: you can ignore these!\n", |
425 | | - "# gaia_table_pleiades = QTable(gaia_table_pleiades[gaia_table_pleiades['parallax'] > 0])" |
426 | | - ] |
427 | | - }, |
428 | | - { |
429 | | - "cell_type": "code", |
430 | | - "execution_count": null, |
431 | | - "metadata": {}, |
432 | | - "outputs": [], |
433 | | - "source": [ |
434 | | - "# tmass_ple_coords = SkyCoord(tmass_table_pleiades['RAJ2000'],\n", |
435 | | - "# tmass_table_pleiades['DEJ2000'])\n", |
436 | | - "\n", |
437 | | - "# gaia_ple_coords = SkyCoord(gaia_table_pleiades['ra'],\n", |
438 | | - "# gaia_table_pleiades['dec'],\n", |
439 | | - "# Distance(parallax=gaia_table_pleiades['parallax']))" |
440 | | - ] |
441 | | - }, |
442 | | - { |
443 | | - "cell_type": "code", |
444 | | - "execution_count": null, |
445 | | - "metadata": {}, |
446 | | - "outputs": [], |
447 | | - "source": [ |
448 | | - "# idx_ple, d2d_ple, _ = gaia_ple_coords.match_to_catalog_sky(tmass_ple_coords)\n", |
449 | | - "\n", |
450 | | - "# sep_mask = (d2d_ple < 2*u.arcsec) & (gaia_ple_coords.distance < 200*u.pc)\n", |
451 | | - "\n", |
452 | | - "# Gmag_ple = gaia_table_pleiades[sep_mask]['phot_g_mean_mag']\n", |
453 | | - "# Jmag_ple = tmass_table_pleiades[idx_ple[sep_mask]]['Jmag']\n", |
454 | | - "\n", |
455 | | - "# plt.scatter(Gmag_ple - Jmag_ple, Gmag_ple, \n", |
456 | | - "# marker='o', color='k', \n", |
457 | | - "# linewidth=0, alpha=0.5)\n", |
458 | | - "# plt.xlabel('$G - J$')\n", |
459 | | - "# plt.ylabel('$G$')\n", |
460 | | - "# plt.xlim(-1, 3.5)\n", |
461 | | - "# plt.ylim(19, 0) # backwards because magnitudes!" |
462 | | - ] |
463 | | - }, |
464 | 358 | { |
465 | 359 | "cell_type": "code", |
466 | 360 | "execution_count": null, |
|
0 commit comments