|
7 | 7 | "<b><img align=\"left\" src = https://project.lsst.org/sites/default/files/Rubin-O-Logo_0.png width=250, style=\"padding: 10px\"> \n", |
8 | 8 | "<p><p><p><p><p><p>\n", |
9 | 9 | "<b>Interactive Image Visualization</b> <br>\n", |
10 | | - "Last verified to run on <b>2021-09-17</b> with LSST Science Pipelines release <b>w_2021_33</b> <br>\n", |
| 10 | + "Last verified to run on <b>2021-10-14</b> with LSST Science Pipelines release <b>w_2021_40</b> <br>\n", |
11 | 11 | "Contact authors: Leanne Guy <br>\n", |
12 | 12 | "Target audience: All DP0 delegates. <br>\n", |
13 | | - "Container Size: medium or large <br>\n", |
| 13 | + "Minimum Container Size: medium <br>\n", |
14 | 14 | "Questions welcome at <a href=\"https://community.lsst.org/c/support/dp0\">community.lsst.org/c/support/dp0</a> <br>\n", |
15 | 15 | "Find DP0 documentation and resources at <a href=\"https://dp0-1.lsst.io\">dp0-1.lsst.io</a> <br>" |
16 | 16 | ] |
|
110 | 110 | "metadata": {}, |
111 | 111 | "outputs": [], |
112 | 112 | "source": [ |
113 | | - "# Prevent some helpful but ancillary warning messages from printing\n", |
114 | | - "# during some LSST DM Release calls\n", |
115 | | - "warnings.simplefilter(\"ignore\", category=FutureWarning)\n", |
| 113 | + "# Ignore warnings\n", |
| 114 | + "import warnings\n", |
116 | 115 | "warnings.simplefilter(\"ignore\", category=UserWarning)" |
117 | 116 | ] |
118 | 117 | }, |
|
164 | 163 | "source": [ |
165 | 164 | "# Define a calibrated exposure and retrieve it via the Butler\n", |
166 | 165 | "calexpId = {'visit': 192350, 'detector': 175, 'band': 'i'}\n", |
167 | | - "calexp = butler.get('calexp', **calexpId)\n", |
| 166 | + "calexp = butler.get('calexp', calexpId)\n", |
168 | 167 | "assert calexp is not None\n", |
169 | | - "# Source table for this exposure\n", |
| 168 | + "f\"Visit: {calexp.visitInfo.getExposureId()}, Band:{calexp.getFilterLabel().bandLabel}, Detector: {calexp.detector.getId()}\"" |
| 169 | + ] |
| 170 | + }, |
| 171 | + { |
| 172 | + "cell_type": "code", |
| 173 | + "execution_count": null, |
| 174 | + "metadata": {}, |
| 175 | + "outputs": [], |
| 176 | + "source": [ |
| 177 | + "# Source table for this calexp exposure\n", |
170 | 178 | "calexpSrc = butler.get('src', **calexpId)" |
171 | 179 | ] |
172 | 180 | }, |
|
178 | 186 | "source": [ |
179 | 187 | "# Define a deep coadded image and retrieve it via the Butler\n", |
180 | 188 | "coaddId = {'tract': 4226, 'patch': 17, 'band': 'r'}\n", |
181 | | - "coadd = butler.get('deepCoadd', **coaddId)\n", |
182 | | - "assert coadd is not None\n", |
| 189 | + "coadd = butler.get('deepCoadd', coaddId)\n", |
| 190 | + "assert coadd is not None" |
| 191 | + ] |
| 192 | + }, |
| 193 | + { |
| 194 | + "cell_type": "markdown", |
| 195 | + "metadata": {}, |
| 196 | + "source": [ |
| 197 | + "Let's get some infomation about the coadd, such as which visits went into constructing it. As an exercise, explore the information in the coaddInfo object. " |
| 198 | + ] |
| 199 | + }, |
| 200 | + { |
| 201 | + "cell_type": "code", |
| 202 | + "execution_count": null, |
| 203 | + "metadata": {}, |
| 204 | + "outputs": [], |
| 205 | + "source": [ |
| 206 | + "coaddInfo = coadd.getInfo()\n", |
| 207 | + "\n", |
| 208 | + "# Which visits went into constructing this coadd?\n", |
| 209 | + "coaddVisits = coaddInfo.getCoaddInputs().visits\n", |
| 210 | + "coaddVisits.asAstropy()" |
| 211 | + ] |
| 212 | + }, |
| 213 | + { |
| 214 | + "cell_type": "code", |
| 215 | + "execution_count": null, |
| 216 | + "metadata": {}, |
| 217 | + "outputs": [], |
| 218 | + "source": [ |
183 | 219 | "# Source table for this coadd\n", |
184 | 220 | "coaddSrc = butler.get('deepCoadd_forced_src', coaddId)" |
185 | 221 | ] |
|
257 | 293 | "outputs": [], |
258 | 294 | "source": [ |
259 | 295 | "# Define some default plot options for the Image\n", |
260 | | - "img_opts = dict(height=400, width=500, \n", |
| 296 | + "img_opts = dict(height=600, width=700, \n", |
261 | 297 | " xaxis=\"bottom\", \n", |
262 | 298 | " padding = 0.01, fontsize={'title': '8pt'},\n", |
263 | 299 | " colorbar=True, toolbar='right', show_grid=True,\n", |
|
335 | 371 | "metadata": {}, |
336 | 372 | "outputs": [], |
337 | 373 | "source": [ |
338 | | - "detections = hv.Points(coords).opts(\n", |
339 | | - " fill_color=None, size = 9, color=\"darkorange\")\n", |
340 | | - "\n", |
341 | 374 | "# Custom hover tool for the source detections\n", |
342 | 375 | "detHoverTool = HoverTool(\n", |
343 | 376 | " tooltips=[\n", |
344 | | - " ( 'X', '@x'),\n", |
345 | | - " ( 'Y', '@y'),\n", |
346 | | - " ]\n", |
347 | | - ")" |
| 377 | + " ( 'X', '@x{0.2f}'),\n", |
| 378 | + " ( 'Y', '@y{0.2f}'),\n", |
| 379 | + " ],\n", |
| 380 | + " formatters={\n", |
| 381 | + " 'X' : 'printf',\n", |
| 382 | + " 'Y' : 'printf',\n", |
| 383 | + " },\n", |
| 384 | + " \n", |
| 385 | + ")\n", |
| 386 | + "detections = hv.Points(coords).opts(\n", |
| 387 | + " fill_color=None, size = 9, color=\"darkorange\",\n", |
| 388 | + " tools=[detHoverTool])" |
348 | 389 | ] |
349 | 390 | }, |
350 | 391 | { |
|
360 | 401 | "metadata": {}, |
361 | 402 | "outputs": [], |
362 | 403 | "source": [ |
363 | | - "# Reset the tools on the image and add a hover on the detections. \n", |
364 | | - "rasterize(img.opts(tools=[])) * detections.opts(tools=[detHoverTool])" |
| 404 | + "# Reset the tools on the image and add a hover on the detections.\n", |
| 405 | + "rasterize(img).opts(tools=[]) * detections.opts(tools=[detHoverTool])" |
365 | 406 | ] |
366 | 407 | }, |
367 | 408 | { |
|
0 commit comments