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

Commit 9b5f277

Browse files
committed
update to w_2021_40 and warnings
1 parent 62b2084 commit 9b5f277

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

05_Intro_to_Source_Detection.ipynb

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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",
88
"<b>Introduction to Source Detection</b> <br>\n",
9-
"Last verified to run on 2021-09-24 with LSST Science Pipelines release w_2021_33 <br>\n",
9+
"Last verified to run on 2021-10-12 with LSST Science Pipelines release w_2021_40 <br>\n",
1010
"Contact author: Alex Drlica-Wagner, Melissa Graham <br>\n",
1111
"Target audience: All DP0 delegates. <br>\n",
1212
"Container Size: medium <br>\n",
@@ -88,6 +88,18 @@
8888
"from lsst.meas.base import SingleFrameMeasurementTask"
8989
]
9090
},
91+
{
92+
"cell_type": "code",
93+
"execution_count": null,
94+
"metadata": {},
95+
"outputs": [],
96+
"source": [
97+
"# prevent some helpful but ancillary warning messages from printing\n",
98+
"# during some LSST DM Release calls\n",
99+
"warnings.simplefilter(\"ignore\", category=UserWarning)\n",
100+
"warnings.simplefilter(\"ignore\", category=FutureWarning)"
101+
]
102+
},
91103
{
92104
"cell_type": "code",
93105
"execution_count": null,
@@ -302,6 +314,7 @@
302314
"x_target, y_target = 1700, 2100\n",
303315
"width, height = 400, 400\n",
304316
"xmin, ymin = x_target-width//2, y_target-height//2\n",
317+
"point = geom.Point2D(x_target,y_target)\n",
305318
"\n",
306319
"# Define a small region for a cutout\n",
307320
"bbox = geom.Box2I()\n",
@@ -493,12 +506,13 @@
493506
"# Image characterization (this cell may take a few seconds)\n",
494507
"result = charImageTask.run(calexp)\n",
495508
"\n",
509+
"# Get the PSF at our point of interest\n",
496510
"psf = calexp.getPsf()\n",
497-
"sigma = psf.computeShape().getDeterminantRadius()\n",
511+
"sigma = psf.computeShape(point).getDeterminantRadius()\n",
498512
"pixelScale = calexp.getWcs().getPixelScale().asArcseconds()\n",
499513
"\n",
500514
"# The factor of 2.355 converts from std to fwhm\n",
501-
"print('psf fwhm = {:.2f} arcsec'.format(sigma*pixelScale*2.355))"
515+
"#print('psf fwhm = {:.2f} arcsec'.format(sigma*pixelScale*2.355))"
502516
]
503517
},
504518
{

0 commit comments

Comments
 (0)