Skip to content

Commit 7254690

Browse files
committed
Update NB 105_4
1 parent f67ab83 commit 7254690

1 file changed

Lines changed: 8 additions & 23 deletions

File tree

DP1/100_How_to_Use_RSP_Tools/105_Image_reprocessing/105_4_Synthetic_Source_Injection.ipynb

Lines changed: 8 additions & 23 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-02 <br>\n",
25+
"Last verified to run: 2025-09-30 <br>\n",
2626
"Repository: <a href=\"https://github.com/lsst/tutorial-notebooks\">github.com/lsst/tutorial-notebooks</a> <br>"
2727
]
2828
},
@@ -107,21 +107,7 @@
107107
"id": "c217adff-25ed-4fce-95e7-8aa04630f6cc",
108108
"metadata": {},
109109
"source": [
110-
"### 1.2. Define parameters and functions\n",
111-
"\n",
112-
"Define parameters to use colorblind-friendly colors with `matplotlib`."
113-
]
114-
},
115-
{
116-
"cell_type": "code",
117-
"execution_count": null,
118-
"id": "ecc6cb66-ec5c-47c1-bcd0-4592a32179cd",
119-
"metadata": {},
120-
"outputs": [],
121-
"source": [
122-
"plt.style.use('seaborn-v0_8-colorblind')\n",
123-
"prop_cycle = plt.rcParams['axes.prop_cycle']\n",
124-
"colors = prop_cycle.by_key()['color']"
110+
"### 1.2. Define parameters and functions"
125111
]
126112
},
127113
{
@@ -198,8 +184,7 @@
198184
" visit_detector_region.region OVERLAPS POINT({ra}, {dec})\"\n",
199185
"\n",
200186
"visit_img_refs = butler.query_datasets('visit_image',\n",
201-
" where=query,\n",
202-
" order_by='visit.timespan.begin')"
187+
" where=query)"
203188
]
204189
},
205190
{
@@ -568,7 +553,9 @@
568553
"source": [
569554
"### 4.3. Compare the images before and after injection\n",
570555
"\n",
571-
"Display the images in separate panels with matplotlib, and compare them to confirm that the sources have been injected."
556+
"Display the images in separate panels with matplotlib, and compare them to confirm that the sources have been injected.\n",
557+
"\n",
558+
"Optionally, uncomment the commented-out \"display1.mtv\" cell to zoom in on the injected stamp image."
572559
]
573560
},
574561
{
@@ -584,15 +571,13 @@
584571
"\n",
585572
"plt.sca(ax[0])\n",
586573
"display0 = afwDisplay.Display(frame=fig)\n",
587-
"# display0.scale('linear', 'zscale')\n",
588-
"display0.scale('linear', min=-20, max=150)\n",
574+
"display0.scale('linear', 'zscale')\n",
589575
"display0.mtv(visit_img.image)\n",
590576
"plt.title('calexp image')\n",
591577
"\n",
592578
"plt.sca(ax[1])\n",
593579
"display1 = afwDisplay.Display(frame=fig)\n",
594-
"# display1.scale('linear', 'zscale')\n",
595-
"display1.scale('linear', min=-20, max=150)\n",
580+
"display1.scale('linear', 'zscale')\n",
596581
"display1.mtv(plot_injected_img.image)\n",
597582
"# To zoom on the PGC 038749 stamp:\n",
598583
"# display1.mtv(plot_injected_img.image[1700:2200, 1950:2450])\n",

0 commit comments

Comments
 (0)