Skip to content

Commit fe3d87b

Browse files
authored
Merge pull request #84 from lsst/tickets/SP-2689
SP-2689: Update NB that make big deep cutouts
2 parents b0befe8 + fdf2af5 commit fe3d87b

2 files changed

Lines changed: 39 additions & 18 deletions

File tree

DP1/100_How_to_Use_RSP_Tools/103_Image_access_and_display/103_6_Color_Composite_Image.ipynb

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Data Release: <a href=\"https://dp1.lsst.io\">Data Preview 1</a> <br>\n",
2323
"Container Size: large <br>\n",
2424
"LSST Science Pipelines version: r29.2.0 <br>\n",
25-
"Last verified to run: 2025-09-19 <br>\n",
25+
"Last verified to run: 2025-10-15 <br>\n",
2626
"Repository: <a href=\"https://github.com/lsst/tutorial-notebooks\">github.com/lsst/tutorial-notebooks</a> <br>"
2727
]
2828
},
@@ -816,42 +816,47 @@
816816
"metadata": {},
817817
"source": [
818818
"Use the BCG location to obtain the pixel scale.\n",
819-
"Get the WCS of the patch and tract where the BCG is located.\n",
820-
"From the 300 DP1 tutorials, the patch and tract numbers are 10463 and 62, respectively,"
819+
"First, get the WCS of the patch and tract where the BCG is located."
821820
]
822821
},
823822
{
824823
"cell_type": "code",
825824
"execution_count": null,
826-
"id": "8ccd5259-ffb1-45a9-bfc8-79c110301c48",
825+
"id": "d92642e2-e943-4fb5-a9bb-a8eb138862e6",
827826
"metadata": {},
828827
"outputs": [],
829828
"source": [
830-
"bcg_data_ref = next(\n",
831-
" ref for ref in tract_container\n",
832-
" if ref.dataId[\"tract\"] == 10463 and ref.dataId[\"patch\"] == 62\n",
833-
")"
829+
"bcg_point = SpherePoint(ra_bcg * degrees,\n",
830+
" dec_bcg * degrees)\n",
831+
"bcg_tract = skymap.findTract(bcg_point)\n",
832+
"bcg_patch = bcg_tract.findPatch(bcg_point)\n",
833+
"\n",
834+
"bcg_tract_number = bcg_tract.tract_id\n",
835+
"bcg_patch_number = bcg_patch.getSequentialIndex()\n",
836+
"print(bcg_tract_number, bcg_patch_number)"
834837
]
835838
},
836839
{
837840
"cell_type": "code",
838841
"execution_count": null,
839-
"id": "85859dbc-faf0-4fa4-a5f6-7a6974fd2b46",
842+
"id": "8ccd5259-ffb1-45a9-bfc8-79c110301c48",
840843
"metadata": {},
841844
"outputs": [],
842845
"source": [
843-
"wcs_bcg = butler.get(bcg_data_ref.makeComponentRef('wcs'))"
846+
"bcg_data_ref = next(\n",
847+
" ref for ref in tract_container\n",
848+
" if ref.dataId[\"tract\"] == bcg_tract_number and ref.dataId[\"patch\"] == bcg_patch_number\n",
849+
")"
844850
]
845851
},
846852
{
847853
"cell_type": "code",
848854
"execution_count": null,
849-
"id": "133c1d9d-073b-42e3-8a2f-b782f8a9e691",
855+
"id": "85859dbc-faf0-4fa4-a5f6-7a6974fd2b46",
850856
"metadata": {},
851857
"outputs": [],
852858
"source": [
853-
"bcg_point = SpherePoint(ra_bcg * degrees,\n",
854-
" dec_bcg * degrees)"
859+
"wcs_bcg = butler.get(bcg_data_ref.makeComponentRef('wcs'))"
855860
]
856861
},
857862
{
@@ -897,7 +902,7 @@
897902
"id": "27dbdb21-0f1a-4c32-94d7-c79f174e7ad5",
898903
"metadata": {},
899904
"source": [
900-
"Set the WCS projection. The WCS of deep_coadd images are TAN projections ([see the DP1 documentation](https://dp1.lsst.io/products/images/deep_coadd.html#wcs))."
905+
"Set the WCS projection. The WCS of `deep_coadd` images are TAN projections ([see the DP1 documentation](https://dp1.lsst.io/products/images/deep_coadd.html#wcs))."
901906
]
902907
},
903908
{

DP1/100_How_to_Use_RSP_Tools/103_Image_access_and_display/103_7_Big_deep_coadd_cutout.ipynb

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Data Release: <a href=\"https://dp1.lsst.io\">Data Preview 1</a> <br>\n",
2323
"Container Size: large <br>\n",
2424
"LSST Science Pipelines version: r29.2.0 <br>\n",
25-
"Last verified to run: 2025-09-22 <br>\n",
25+
"Last verified to run: 2025-10-15 <br>\n",
2626
"Repository: <a href=\"https://github.com/lsst/tutorial-notebooks\">github.com/lsst/tutorial-notebooks</a> <br>"
2727
]
2828
},
@@ -344,8 +344,24 @@
344344
"metadata": {},
345345
"source": [
346346
"Use the BCG location to obtain the pixel scale there.\n",
347-
"First, get the WCS of the patch and tract where the BCG is located.\n",
348-
"From the 300 DP1 tutorials, the patch and tract numbers are 10463 and 62 respectively."
347+
"First, get the WCS of the patch and tract where the BCG is located."
348+
]
349+
},
350+
{
351+
"cell_type": "code",
352+
"execution_count": null,
353+
"id": "ae116f76-2aca-447f-833f-75bc36a7ebab",
354+
"metadata": {},
355+
"outputs": [],
356+
"source": [
357+
"bcg_point = SpherePoint(ra_bcg * degrees,\n",
358+
" dec_bcg * degrees)\n",
359+
"bcg_tract = skymap.findTract(bcg_point)\n",
360+
"bcg_patch = bcg_tract.findPatch(bcg_point)\n",
361+
"\n",
362+
"bcg_tract_number = bcg_tract.tract_id\n",
363+
"bcg_patch_number = bcg_patch.getSequentialIndex()\n",
364+
"print(bcg_tract_number, bcg_patch_number)"
349365
]
350366
},
351367
{
@@ -357,7 +373,7 @@
357373
"source": [
358374
"bcg_data_ref = next(\n",
359375
" ref for ref in tract_container\n",
360-
" if ref.dataId[\"tract\"] == 10463 and ref.dataId[\"patch\"] == 62\n",
376+
" if ref.dataId[\"tract\"] == bcg_tract_number and ref.dataId[\"patch\"] == bcg_patch_number\n",
361377
")"
362378
]
363379
},

0 commit comments

Comments
 (0)