Skip to content

Commit

Permalink
Merge pull request #41 from lsst/tickets/DM-35896
Browse files Browse the repository at this point in the history
DM-35896: Use gen3 butler in examples
  • Loading branch information
timj committed Aug 15, 2022
2 parents 1d67935 + f03405c commit bc3249c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions doc/lsst.display.firefly/getting-started-lsp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Retrieve a simulated LSST image.
.. code-block:: py
:name: getting-started-getimage
from lsst.daf.persistence import Butler
butler = Butler('/project/shared/data/Twinkles_subset/output_data_v2')
dataId = {'filter': 'r', 'raft': '2,2', 'sensor': '1,1', 'visit': 235}
from lsst.daf.butler import Butler
butler = Butler('/repo/main', collectiions='output_data_v2')
dataId = {'physical_filter': 'r', 'raft': 'R01', 'name_in_raft': 'S01', 'visit': 235}
calexp = butler.get('calexp', **dataId)
Set the scaling and mask transparency, and display the image.
Expand Down Expand Up @@ -73,5 +73,3 @@ Erase the regions while leaving the image and masks displayed.
:name: getting-started-erase
display1.erase()
8 changes: 4 additions & 4 deletions doc/lsst.display.firefly/viewing-footprints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Define a Butler instance and an identifier for retrieving the data.

.. code-block:: py
from lsst.daf.persistence import Butler
butler = Butler('/datasets/hsc/repo/rerun/RC/w_2019_22/DM-19244/')
dataId = dict(filter='HSC-R', tract=9813, patch='4,4')
from lsst.daf.butler import Butler
butler = Butler('/datasets/hsc/repo/', collections='rerun/RC/w_2019_22/DM-19244/')
dataId = dict(pysical_filter='HSC-R', tract=9813, patch=32)
Define bounding boxes for two regions of interest, one for the catalog and
a somewhat larger one for the image. Use these to retrieve a cutout of
Expand All @@ -28,7 +28,7 @@ the coadd image.
dimensions=geom.Extent2I(600,600))
imageBbox = geom.Box2I(corner=geom.Point2I(16800, 18600),
dimensions=geom.Extent2I(800,800))
calexp = butler.get('deepCoadd_calexp_sub', dataId=dataId, bbox=imageBbox)
calexp = butler.get('deepCoadd_calexp', dataId=dataId, parameters={'bbox'=imageBbox})
Retrieve the entire catalog and then select only those records with pixel
locations inside the footprints bounding box.
Expand Down

0 comments on commit bc3249c

Please sign in to comment.