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

Commit 0d90953

Browse files
committed
updates
1 parent a041771 commit 0d90953

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

03_Intro_to_AFW_Display.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"\n",
2424
"This tutorial is designed to help users get a brief feel for the `lsst.afw.display` library that enables the visual inspection of data. The [`lsst.afw` library](https://github.com/lsst/afw) provides an \"Astronomical Framework\" (afw) while the `lsst.daf.*` libraries (see, e.g., [daf_base](https://github.com/lsst/daf_base)) provides a Data Access Framework (daf). Both libraries are used in this tutorial, with the `lsst.daf.persistence` library used to access a calibrated exposure (calexp) and the `lsst.afw.display` library used to show the exposure image on the screen.\n",
2525
"\n",
26-
"**Credit:** This tutorial is based on the [`AFW_Display_Demo.ipynb`](https://github.com/LSSTScienceCollaborations/StackClub/blob/master/Visualization/AFW_Display_Demo.ipynb) notebook originally written by Brant Robertson and maintained by the LSST Stack Club. More examples of the use of `lsst.afw.display` can be found in the [Stack ](https://pipelines.lsst.io/getting-started/display.html).\n",
26+
"**Credit:** This tutorial is based on the [`AFW_Display_Demo.ipynb`](https://github.com/LSSTScienceCollaborations/StackClub/blob/master/Visualization/AFW_Display_Demo.ipynb) notebook originally written by Brant Robertson and maintained by the LSST Stack Club. More examples of the use of `lsst.afw.display` can be found in the [LSST Science Pipelines documentation](https://pipelines.lsst.io/getting-started/display.html).\n",
2727
"\n",
2828
"### Set Up"
2929
]
@@ -125,9 +125,9 @@
125125
"\n",
126126
"To display an image, we must first load some data. These data have been processed with the LSST Science Pipelines, and are organized in a structure that enables us to access them through the `Butler`. For more information on the `Butler`, see [lsst.daf.butler](https://pipelines.lsst.io/modules/lsst.daf.butler/index.html).\n",
127127
"\n",
128-
"The DP0.1 data set contains simulated images from the LSST DESC Data Challenge 2 (DC2). These data are available in the data directory `/datasets/DC2/DR6/Run2.2i/patched/2021-02-10/rerun/run2.2i-calexp-v1/`. We access a single image from a specific visit (`512055`), raft (`R20`), and detector (`76`). This happens to be an i-band exposure.\n",
128+
"The DP0.1 data set contains simulated images from the LSST DESC Data Challenge 2 (DC2). These data are available in an S3 bucket `s3://butler-us-central1-dp01`. We access a single image from a specific visit (`227982`) and detector (`129`).\n",
129129
"\n",
130-
"Once we define a string that contains the data directory, we start the `Butler` instance using the `lsst.daf.persistence` library alias `dafPersist` and its `Butler` class. The `Butler` object is initialized with a string containing the data directory we wish to access. Running the cell may take a few moments.\n",
130+
"Once we define a string that contains the data directory, we start the `Butler` instance using the `lsst.daf.butler` library and its `Butler` class. The `Butler` object is initialized with a string containing the data directory we wish to access. Running the cell may take a few moments.\n",
131131
"\n",
132132
"With the `Butler` instance now generated using our data directory, we can retrieve the desired calibrated exposure by telling the butler which filter, CCD, and visit we wish to view. To do this, we definie dictionary with the required information."
133133
]
@@ -140,7 +140,7 @@
140140
"source": [
141141
"# Note that the keys are slightly different for DC2/LSSTCam \n",
142142
"# You can view all the keys by creating the butler and calling: print(butler.getKeys('calexp'))\n",
143-
"dataId = {'visit': 227982, 'raftName': 'R31', 'detector': 129}\n",
143+
"dataId = {'visit': 227982, 'detector': 129}\n",
144144
"repo = 's3://butler-us-central1-dp01' \n",
145145
"collection='2.2i/runs/DP0.1'\n",
146146
"butler = Butler(repo,collections=collection)\n",

04_Intro_to_Butler.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@
321321
"# We could pass the datasetRef that we found above, but since the query may \n",
322322
"# return results in a different order we define the dataId explicitly for reproducibility. \n",
323323
"dataId = {'visit': '703697', 'detector': 80, 'band':'g'}\n",
324-
"calexp = butler.get('calexp',dataId=dataId)"
324+
"calexp = butler.get('calexp',dataId=dataId)\n",
325+
"\n",
326+
"# This will print a warning related to the gen2 to gen3 Butler conversion that was performed on DP0.1"
325327
]
326328
},
327329
{
@@ -500,7 +502,7 @@
500502
" -------\n",
501503
" MaskedImage\n",
502504
" \"\"\"\n",
503-
" radec = geom.SpherePoint(ra, dec, afwGeom.degrees)\n",
505+
" radec = geom.SpherePoint(ra, dec, geom.degrees)\n",
504506
" cutoutSize = geom.ExtentI(cutoutSideLength, cutoutSideLength)\n",
505507
"\n",
506508
" if skymap is None:\n",
@@ -527,7 +529,7 @@
527529
"metadata": {},
528530
"outputs": [],
529531
"source": [
530-
"ra,dec = 55.064, -29.783 # center of DC2 region\n",
532+
"ra,dec = 55.064, -29.783 # center of the DC2 region\n",
531533
"cutout_image = cutout_coadd(butler,ra,dec,datasetType='deepCoadd', cutoutSideLength=201)\n",
532534
"print(\"The size of the cutout is: \",cutout_image.image.array.shape)"
533535
]

0 commit comments

Comments
 (0)