|
10 | 10 | "<img align=\"left\" src = https://project.lsst.org/sites/default/files/Rubin-O-Logo_0.png width=250 style=\"padding: 10px\" alt=\"Rubin Observatory logo, a graphical representation of turning stars into data.\">\n", |
11 | 11 | "<br>\n", |
12 | 12 | "Contact author: Melissa Graham <br>\n", |
13 | | - "Last verified to run: 2025-04-30 <br>\n", |
14 | | - "LSST Science Pipelines version: Weekly 2025_17 <br>\n", |
| 13 | + "Last verified to run: 2025-06-20 <br>\n", |
| 14 | + "LSST Science Pipelines version: Release r29.1.0 <br>\n", |
15 | 15 | "Container Size: medium <br>\n", |
16 | 16 | "Targeted learning level: intermediate <br>" |
17 | 17 | ] |
|
91 | 91 | "[Portal](https://rsp.lsst.io/guides/portal/index.html)\n", |
92 | 92 | "and [API](https://rsp.lsst.io/guides/api/index.html) Aspects of\n", |
93 | 93 | "the Rubin Science Platform.\n", |
| 94 | + "It is an IVOA-standards-compliant interface that is based on\n", |
| 95 | + "the ObsCore and DataLink standards that are used for this purpose\n", |
| 96 | + "by many other astronomical archives.\n", |
94 | 97 | "\n", |
95 | 98 | "This tutorial demonstrates how to discover the existence of image\n", |
96 | 99 | "data with the TAP service (Section 2),\n", |
|
99 | 102 | "It also demonstrates how to display the full retrieved images with `matplotlib`,\n", |
100 | 103 | "`afwDisplay`, and `Firefly`.\n", |
101 | 104 | "Techniques for image display and manipulation, and the creation of image cutouts,\n", |
102 | | - "are covered in [other DP0.2 tutorials](https://dp0-2.lsst.io/tutorials-examples/index.html)." |
| 105 | + "are covered in [other DP0.2 tutorials](https://dp0-2.lsst.io/tutorials-examples/index.html).\n", |
| 106 | + "\n", |
| 107 | + "**Note:** The TAP service does not support the ADQL `INTERSECTS` operator,\n", |
| 108 | + "which means that other means are necessary to query for iamges that overlap \n", |
| 109 | + "a stated region." |
103 | 110 | ] |
104 | 111 | }, |
105 | 112 | { |
|
354 | 361 | "source": [ |
355 | 362 | "The fact that catalogs are available with `schema_name` = `dp02_dc2_catalogs` is pretty clear in the above table.\n", |
356 | 363 | "\n", |
357 | | - "Although it is not clear, DP0 images are stored in `ObsTAP`, with `schema_name` = `ivoa`.\n", |
358 | | - "This will be clarified for future data releases." |
| 364 | + "In general, the IVOA standard for image data access through a TAP service\n", |
| 365 | + "puts the image metadata in a table `ivoa.ObsCore`, i.e., in the `ivoa` schema.\n", |
| 366 | + "This is called an `ObsTAP` service.\n", |
| 367 | + "However, for DP0.2, to distinguish this simulated data from real LSST data,\n", |
| 368 | + "we have moved the DP0.2 ObsCore table to be in the same schema with the\n", |
| 369 | + "DP0.2 catalogs, i.e., to `dp02_dc2_catalogs.ObsCore`." |
359 | 370 | ] |
360 | 371 | }, |
361 | 372 | { |
|
368 | 379 | "del query, results" |
369 | 380 | ] |
370 | 381 | }, |
371 | | - { |
372 | | - "cell_type": "markdown", |
373 | | - "id": "8463597f-8c70-479e-8187-9cbd046db21c", |
374 | | - "metadata": {}, |
375 | | - "source": [ |
376 | | - "### 2.1. The IVOA schema\n", |
377 | | - "\n", |
378 | | - "IVOA stands for [International Virtual Observatory Alliance](https://ivoa.net/), and they work towards defining standards\n", |
379 | | - "for astronomical data storage that enable wide data sharing.\n", |
380 | | - "The LSST Science Pipelines use IVOA standards.\n", |
381 | | - "\n", |
382 | | - "Retrieve all of the tables available in the `ivoa` schema and display them as a pandas table." |
383 | | - ] |
384 | | - }, |
385 | | - { |
386 | | - "cell_type": "code", |
387 | | - "execution_count": null, |
388 | | - "id": "951f4ae4-c0d4-4064-b10a-e2f1f8add499", |
389 | | - "metadata": {}, |
390 | | - "outputs": [], |
391 | | - "source": [ |
392 | | - "query = \"SELECT * \" \\\n", |
393 | | - " \"FROM tap_schema.tables \" \\\n", |
394 | | - " \"WHERE tap_schema.tables.schema_name = 'ivoa'\"\n", |
395 | | - "results = service.search(query)\n", |
396 | | - "results.to_table().to_pandas()" |
397 | | - ] |
398 | | - }, |
399 | | - { |
400 | | - "cell_type": "markdown", |
401 | | - "id": "35361f18-579a-40cc-8caf-af28201869a3", |
402 | | - "metadata": {}, |
403 | | - "source": [ |
404 | | - "There is only one `ivoa` table available for DP0: `ObsCore`." |
405 | | - ] |
406 | | - }, |
407 | | - { |
408 | | - "cell_type": "code", |
409 | | - "execution_count": null, |
410 | | - "id": "5738f062-0e63-43a4-a43e-e8032b4e2e59", |
411 | | - "metadata": {}, |
412 | | - "outputs": [], |
413 | | - "source": [ |
414 | | - "del query, results" |
415 | | - ] |
416 | | - }, |
417 | 382 | { |
418 | 383 | "cell_type": "markdown", |
419 | 384 | "id": "16d98269-9dba-468f-84dc-8c0548926728", |
420 | 385 | "metadata": {}, |
421 | 386 | "source": [ |
422 | | - "### 2.2. The ObsCore table\n", |
| 387 | + "### 2.1. The ObsCore table\n", |
| 388 | + "\n", |
| 389 | + "The `ObsCore` table schema conforms to the IVOA ([International Virtual Observatory Alliance](https://ivoa.net/)) standards.\n", |
423 | 390 | "\n", |
424 | 391 | "The LSST `ObsCore` table is essentially a view into the images\n", |
425 | 392 | "stored in the LSST's [data butler](https://pipelines.lsst.io/modules/lsst.daf.butler/index.html) registry (e.g., [DMTN-236](https://dmtn-236.lsst.io/)).\n", |
|
440 | 407 | "source": [ |
441 | 408 | "query = \"SELECT column_name, datatype, description, unit \" \\\n", |
442 | 409 | " \"FROM tap_schema.columns \" \\\n", |
443 | | - " \"WHERE table_name = 'ivoa.ObsCore'\"\n", |
| 410 | + " \"WHERE table_name = 'dp02_dc2_catalogs.ObsCore'\"\n", |
444 | 411 | "results = service.search(query)\n", |
445 | 412 | "results.to_table().to_pandas()" |
446 | 413 | ] |
|
483 | 450 | "metadata": {}, |
484 | 451 | "outputs": [], |
485 | 452 | "source": [ |
486 | | - "query = \"SELECT * FROM ivoa.ObsCore \"\\\n", |
| 453 | + "query = \"SELECT * FROM dp02_dc2_catalogs.ObsCore \"\\\n", |
487 | 454 | " \"WHERE CONTAINS(POINT('ICRS', \" + target_str_ra + \\\n", |
488 | 455 | " \", \" + target_str_dec + \"), s_region) = 1\"\n", |
489 | 456 | "print(query)" |
|
737 | 704 | "\n", |
738 | 705 | "This becomes evident by printing the unqiue `calib_level` values\n", |
739 | 706 | "for each of the `dataproduct_subtype` values in turn, as done\n", |
740 | | - "in the following cell." |
| 707 | + "in the following cell. \n", |
| 708 | + "\n", |
| 709 | + "(Note: These values have been set based on the project's application \n", |
| 710 | + "of the ObsCore specification for the meaning of this column to \n", |
| 711 | + "the actual LSST data model; we acknowledge that the results are \n", |
| 712 | + "not all that intuitively useful.)" |
741 | 713 | ] |
742 | 714 | }, |
743 | 715 | { |
|
1196 | 1168 | "metadata": {}, |
1197 | 1169 | "outputs": [], |
1198 | 1170 | "source": [ |
1199 | | - "query = \"SELECT * FROM ivoa.ObsCore \"\\\n", |
| 1171 | + "query = \"SELECT * FROM dp02_dc2_catalogs.ObsCore \"\\\n", |
1200 | 1172 | " \"WHERE CONTAINS(POINT('ICRS', \" + \\\n", |
1201 | 1173 | " target_str_ra + \", \" + target_str_dec + \"), s_region) = 1 \"\\\n", |
1202 | 1174 | " \"AND lsst_band = 'i' \"\\\n", |
|
1901 | 1873 | "metadata": {}, |
1902 | 1874 | "outputs": [], |
1903 | 1875 | "source": [ |
1904 | | - "query = \"SELECT * FROM ivoa.ObsCore \"\\\n", |
| 1876 | + "query = \"SELECT * FROM dp02_dc2_catalogs.ObsCore \"\\\n", |
1905 | 1877 | " \"WHERE CONTAINS(POINT('ICRS', \" + \\\n", |
1906 | 1878 | " target_str_ra + \", \" + target_str_dec + \"), s_region) = 1 \"\\\n", |
1907 | 1879 | " \"AND lsst_band = 'i' \"\\\n", |
|
2133 | 2105 | "name": "python", |
2134 | 2106 | "nbconvert_exporter": "python", |
2135 | 2107 | "pygments_lexer": "ipython3", |
2136 | | - "version": "3.12.10" |
| 2108 | + "version": "3.12.11" |
2137 | 2109 | } |
2138 | 2110 | }, |
2139 | 2111 | "nbformat": 4, |
|
0 commit comments