From 3f45188c86bd3b2b6547055f7e7aca0193544dd9 Mon Sep 17 00:00:00 2001 From: galaxyumi Date: Thu, 29 Oct 2026 00:21:49 +0000 Subject: [PATCH] clear outputs --- .../102_5_Cross_match_to_uploaded_table.ipynb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/DP2/100_How_to_use_RSP_tools/102_Catalog_access/102_5_Cross_match_to_uploaded_table.ipynb b/DP2/100_How_to_use_RSP_tools/102_Catalog_access/102_5_Cross_match_to_uploaded_table.ipynb index b426c274..c8528c01 100644 --- a/DP2/100_How_to_use_RSP_tools/102_Catalog_access/102_5_Cross_match_to_uploaded_table.ipynb +++ b/DP2/100_How_to_use_RSP_tools/102_Catalog_access/102_5_Cross_match_to_uploaded_table.ipynb @@ -22,7 +22,7 @@ "Data Release: [Data Preview 2](https://dp2.lsst.io)\\\n", "Container Size: Large\\\n", "LSST Science Pipelines version: r30.0.11\\\n", - "Last verified to run: 2026-08-18\\\n", + "Last verified to run: 2026-10-28\\\n", "Repository: [github.com/lsst/tutorial-notebooks](https://github.com/lsst/tutorial-notebooks)\\\n", "DOI: [10.11578/rubin/dc.20250909.20](https://doi.org/10.11578/rubin/dc.20250909.20)" ] @@ -199,9 +199,20 @@ "source": [ "### 2.2. Execute the cross-match\n", "\n", - "To cross-match a user-uploaded table against the LSST catalogs and retrieve the results, Qserv allows users to temporarily upload their catalogs to Qserv and use them in queries. It is recommended to apply a `DISTANCE`-based join in coordinate-based cross-matching as demonstrated in this Section or use unique identifier-based joins (like `ObjectId`) as demonstrated in Section 3, for which Qserv automatically partitions the user-uploaded table using the same algorithm used for the LSST catalogs. This approach makes a query highly efficient by targeting only the relevant chunks of data.\n", + "To cross-match a user-uploaded table against the LSST catalogs and retrieve the results, Qserv allows users to temporarily upload their own catalogs and use them in queries. When a query joins the uploaded table on coordinates, Qserv automatically partitions it with the same algorithm used for the LSST catalogs. Each uploaded source is then compared only against LSST objects in the same or neighboring sky chunks, not the whole catalog, which keeps the query efficient. Two spatial join types are supported: `DISTANCE`-based join and `CONTAINS`-based. For a simple radius match, both approaches give the same result and run with similar efficiency.\n", "\n", - "Query the `Object` table for objects matching the coordinates from the user-defined table, `ut1`. Use a spatial cross-match radius of 1\\\" (or 0.00027 degrees)." + "Query the `Object` table for objects that lie within 1\\\" (or 0.00027 degrees) of each source in the uploaded table, `ut1`. The `CONTAINS` version below is shown for reference only and is not executed in this notebook:\n", + "\n", + "query = \"\"\" \\\n", + " SELECT ut1.objid AS ut1_objid, ut1.ra AS ut1_ra, ut1.dec AS ut1_dec,\\\n", + " dp2.objectId, dp2.coord_ra, dp2.coord_dec\\\n", + " FROM dp2.Object AS dp2\\\n", + " JOIN TAP_UPLOAD.ut1 AS ut1\\\n", + " WHERE CONTAINS(POINT('ICRS', dp2.coord_ra, dp2.coord_dec),\\\n", + " CIRCLE('ICRS', ut1.ra, ut1.dec, 0.00027)) = 1\\\n", + " \"\"\"\n", + " \n", + "The query run in the next cell uses the `DISTANCE`-based join." ] }, {