Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit beb0b3f

Browse files
committed
a few more small updates
1 parent c97b502 commit beb0b3f

2 files changed

Lines changed: 22 additions & 11 deletions

File tree

02_Intermediate_TAP_Query.ipynb

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"metadata": {},
66
"source": [
77
"<img align=\"left\" src = https://project.lsst.org/sites/default/files/Rubin-O-Logo_0.png width=250, style=\"padding: 10px\"> \n",
8-
"<b>Advanced catalog access via TAP </b> <br>\n",
8+
"<b>Intermediate TAP Queries for DP0 catalogs </b> <br>\n",
99
"Last verified to run on 2021-06-25 with LSST Science Pipelines release w_2021_25 <br>\n",
1010
"Contact authors: Leanne Guy <br>\n",
1111
"Target audience: All DP0 delegates. <br>\n",
@@ -33,7 +33,7 @@
3333
"1. Explore the DP0.1 schema and catalogs using the Rubin TAP service<br>\n",
3434
"2. Query the DP0.1 Object and Truth Match catalogs, and retrieve data for analysis<br>\n",
3535
"3. Visualize and interact with the retrieved data set<br>\n",
36-
"4. Working with asynchronous TAP queries"
36+
"4. Work with asynchronous TAP queries"
3737
]
3838
},
3939
{
@@ -132,7 +132,7 @@
132132
"# Query to find out what schemas are in the Rubin TAP_SCHEMA\n",
133133
"query = \"SELECT * FROM tap_schema.schemas\"\n",
134134
"\n",
135-
"# Execute the query. A TAPResults object is returned\n",
135+
"# Execute the query. A TAP Results object is returned\n",
136136
"results = service.search(query)"
137137
]
138138
},
@@ -153,7 +153,7 @@
153153
"source": [
154154
"#### 1.3 DC2 tables (catalogs) in DP0.1\n",
155155
"\n",
156-
"All the DP0 tables (catalogs) are in the \"dp01_dc2_catalogs\" schema (table collection). We can programatically extract the DP0,1 schema_name into a variable."
156+
"All the DP0 tables (catalogs) are in the \"dp01_dc2_catalogs\" schema (table collection). We can programatically extract the DP0.1 schema_name into a variable."
157157
]
158158
},
159159
{
@@ -202,8 +202,8 @@
202202
"\n",
203203
"* `schema` - database terminology for the abstract design that represents the storage of data in a database. \n",
204204
"* `tap_schema` - the specific schema describing the TAP service. All TAP services must support a set of tables in a schema named TAP_SCHEMA that describe the tables and columns included in the service.\n",
205-
"* `table` - a collection of related data held in a table format in a database, e.g the object(dp01_dc2_catalogs.object) or position (dp01_dc2_catalogs.position) tables \n",
206-
"* `table collection` - a collection of tables. e.g `dp01_dc2_catalogs`\t\n",
205+
"* `table` - a collection of related data held in a table format in a database, e.g., the object(dp01_dc2_catalogs.object) or position (dp01_dc2_catalogs.position) tables \n",
206+
"* `table collection` - a collection of tables. e.g., `dp01_dc2_catalogs`\t\n",
207207
"* `results` - the query result set. The TAP service returns data from a query as a `TAPResults` object. Find more about `TAPResults` [here](https://pyvo.readthedocs.io/en/latest/api/pyvo.dal.TAPResults.html)."
208208
]
209209
},
@@ -223,7 +223,7 @@
223223
"metadata": {},
224224
"source": [
225225
"#### 2.1 Specifying the maximum number of records to return\n",
226-
"For debugging and testing queries, it is often useful to only return a few records for expediency. This can be done in one of two ways, setting the `TOP` field in a query, or setting the `maxec` parameter in the TAP service query. The two methods are identical. "
226+
"For debugging and testing queries, it is often useful to only return a few records for expediency. This can be done in one of two ways, setting the `TOP` field in a query, or setting the `maxrec` parameter in the TAP service query. The two methods are identical. "
227227
]
228228
},
229229
{
@@ -380,15 +380,18 @@
380380
"source": [
381381
"### 3. Visualize and analyse the results\n",
382382
"\n",
383-
"Now we will do some interactive analysis with the data we have above. We will use bokeh and holoviews to create interactive plots so that we can explore the dataset. between two panels showing different repsentations of the same dataset. A selection applied to either panel will highlight the selected points in the other panel."
383+
"Now we will do some interactive analysis with the data we have above. We will use bokeh and holoviews to create interactive plots so that we can explore the dataset, using two panels showing different repsentations of the same dataset. A selection applied to either panel will highlight the selected points in the other panel.\n",
384+
"\n",
385+
"<a href=\"https://bokeh.org/\">Bokeh Documentation</a> <br>\n",
386+
"<a href=\"https://holoviews.org/\">Holoviews Documentation</a>"
384387
]
385388
},
386389
{
387390
"cell_type": "markdown",
388391
"metadata": {},
389392
"source": [
390393
"#### 3.1 Data preparation\n",
391-
"The basis for any data visualization is the underlying data. We will prepare ColumnDataSource (CDS) from the data returned by the query above that can be passed directly to bokeh. The CDS is the core of bokeh plots. Bokeh automatically creates a CDS from dta passed as python lists ot numpy arrays. CDS are useful as they allow data to be shared between multiple plots and renderers, enabling brushing and linking. A CDS is essentially a collection of sequences of data that have their own unique column name. \n",
394+
"The basis for any data visualization is the underlying data. We will prepare ColumnDataSource (CDS) from the data returned by the query above that can be passed directly to bokeh. The CDS is the core of bokeh plots. Bokeh automatically creates a CDS from data passed as python lists ot numpy arrays. CDS are useful as they allow data to be shared between multiple plots and renderers, enabling brushing and linking. A CDS is essentially a collection of sequences of data that have their own unique column name. \n",
392395
"\n",
393396
"Getting the data preparation phase right is key to creating powerful visualizations. "
394397
]
@@ -518,7 +521,8 @@
518521
"metadata": {},
519522
"outputs": [],
520523
"source": [
521-
"# Add in hover!!!!#Define the tools\n",
524+
"# Add in hover!!!!\n",
525+
"# Define the tools\n",
522526
"TOOLS = \"box_select,lasso_select,help\"\n",
523527
"\n",
524528
"# Define the tooltips\n",
@@ -761,6 +765,13 @@
761765
"source": [
762766
"job.delete()"
763767
]
768+
},
769+
{
770+
"cell_type": "code",
771+
"execution_count": null,
772+
"metadata": {},
773+
"outputs": [],
774+
"source": []
764775
}
765776
],
766777
"metadata": {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Tutorial Jupyter Notebooks for Data Preview 0, created and maintained by the Rub
66
| Title | Description |
77
|---|---|
88
| 01. Intro to DP0 Notebooks | Use a python notebook; query a DC2 catalog and plot data; retrieve and display a DC2 image. |
9-
| 02. Intro to TAP | Discover, query, and retrieve DC2 catalog data with the Table Access Protocol (TAP) service. |
9+
| 02. Intermediate TAP Queries | Query, and retrieve DC2 catalog data with the Table Access Protocol (TAP) service. Use bokeh and holoviews to create interactive plots. |
1010
| 03. Image Display and Manipulation | Display and manipulate DC2 images, explore image mask planes, create cutout and RGB images. |
1111
| 04. Intro to Butler | Discover, query, retrieve, and display DC2 images and catalog data with the Generation 3 Butler. |
1212
| 05. Intro to Source Detection | Learn to use the LSST Science Pipelines tasks for image characterization, source detection, deblending, and measurement. Learn to interact with a source footprint. |

0 commit comments

Comments
 (0)