Skip to content

Commit

Permalink
Don't fail due to missing WCS
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeyers314 committed Dec 11, 2023
1 parent 3a96a34 commit 3126d57
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions python/lsst/summit/utils/peekExposure.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,10 @@ def transformShapes(self, shapes, exposure, binSize):
nw_shapes = []
aa_shapes = []
for shape in shapes:
if wcs is None:
nw_shapes.append(Quadrupole(np.nan, np.nan, np.nan))
aa_shapes.append(Quadrupole(np.nan, np.nan, np.nan))
continue
# The WCS transforms to N (dec) and E (ra), but we want N and W to
# conform with weak-lensing conventions. So we flip the [0]
# component of the transformation.
Expand Down Expand Up @@ -919,13 +923,15 @@ def updateDisplay(

visitInfo = exposure.info.getVisitInfo()
self._display.mtv(exposure)
rose(
self._display,
exposure.getWcs(),
Point2D(200 / binSize, 200 / binSize),
q=visitInfo.boresightParAngle,
len=100 / binSize,
)
wcs = exposure.wcs
if wcs is not None:
rose(
self._display,
wcs,
Point2D(200 / binSize, 200 / binSize),
q=visitInfo.boresightParAngle,
len=100 / binSize,
)

for idx, source in enumerate(binnedSourceCat):
x, y = source.getCentroid()
Expand Down

0 comments on commit 3126d57

Please sign in to comment.