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

Commit 5acf5fd

Browse files
author
Leanne Guy
committed
Update to w_40
1 parent c815c1c commit 5acf5fd

1 file changed

Lines changed: 25 additions & 5 deletions

File tree

08a_Interactive_Image_Visualization.ipynb

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
"source": [
113113
"# Ignore warnings\n",
114114
"import warnings\n",
115-
"warnings.simplefilter(\"ignore\", category='UnitsWarning')"
115+
"warnings.simplefilter(\"ignore\", category='UnitsWarning')\n",
116+
"warnings.simplefilter(\"ignore\", category=UserWarning)"
116117
]
117118
},
118119
{
@@ -163,9 +164,8 @@
163164
"source": [
164165
"# Define a calibrated exposure and retrieve it via the Butler\n",
165166
"calexpId = {'visit': 192350, 'detector': 175, 'band': 'i'}\n",
166-
"calexp = butler.get('calexp', **calexpId)\n",
167+
"calexp = butler.get('calexp', calexpId)\n",
167168
"assert calexp is not None\n",
168-
"# 'physical_filter': 'HSC-R'\n",
169169
"f\"Visit: {calexp.visitInfo.getExposureId()}, Band:{calexp.getFilterLabel().bandLabel}, Detector: {calexp.detector.getId()}\""
170170
]
171171
},
@@ -187,10 +187,30 @@
187187
"source": [
188188
"# Define a deep coadded image and retrieve it via the Butler\n",
189189
"coaddId = {'tract': 4226, 'patch': 17, 'band': 'r'}\n",
190-
"coadd = butler.get('deepCoadd', **coaddId)\n",
190+
"coadd = butler.get('deepCoadd', coaddId)\n",
191191
"assert coadd is not None"
192192
]
193193
},
194+
{
195+
"cell_type": "markdown",
196+
"metadata": {},
197+
"source": [
198+
"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. "
199+
]
200+
},
201+
{
202+
"cell_type": "code",
203+
"execution_count": null,
204+
"metadata": {},
205+
"outputs": [],
206+
"source": [
207+
"coaddInfo = coadd.getInfo()\n",
208+
"\n",
209+
"# Which visits went into constructin this coadd?\n",
210+
"coaddVisits = coaddInfo.getCoaddInputs().visits\n",
211+
"coaddVisits.asAstropy()"
212+
]
213+
},
194214
{
195215
"cell_type": "code",
196216
"execution_count": null,
@@ -377,7 +397,7 @@
377397
"metadata": {},
378398
"outputs": [],
379399
"source": [
380-
"# Reset the tools on the image and add a hover on the detections. \n",
400+
"# Reset the tools on the image and add a hover on the detections.\n",
381401
"rasterize(img.opts(tools=[])) * detections.opts(tools=[detHoverTool])"
382402
]
383403
},

0 commit comments

Comments
 (0)