Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: afw
-
Labels:None
-
Team:DM Science
Description
afwDisplay.Display().mtv() assumes that it can always build a Wcs from the metadata in a DecoratedImage (that may once have been true, but it no longer is) and raises an exception if it fails.
Please fix this.
data, wcs = data.getMaskedImage(), data.getWcs()
elif isinstance(data, afwImage.DecoratedImage): # it's a DecoratedImage; display it
- data, wcs = data.getImage(), afwGeom.makeSkyWcs(data.getMetadata())
+ wcs = afwGeom.makeSkyWcs(data.getMetadata())
+ except pexExceptions.TypeError:
+ wcs = None
+ data = data.image
+
self._xy0 = data.getXY0() # DecoratedImage doesn't have getXY0()