New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-21981: Update rawFormatter to correctly resize amplifier bboxes. #143
Conversation
@@ -77,11 +77,41 @@ def readImage(self): | |||
image : `~lsst.afw.image.Image` | |||
In-memory image component. | |||
""" | |||
return self.readFull().getImage() | |||
|
|||
def readFull(self, parameters=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably document that there are no acceptable parameters for this readFull implementation.
if variance is not None: | ||
exposure.setVariance(variance) | ||
|
||
info = exposure.getInfo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which of these lines fixed the real problem with amplifiers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is in not dropping the exposure; the code previously called readImage(), which did all that is now in readFull(), but returned exposure.getImage(). This dropped the updated amplifier information constructed in fixAmpsAndAssemble(), resulting in an image that contained all of the amplifier image data, but without the updated bbox information to find it.
@@ -57,6 +57,34 @@ def assertAmpRawBBoxesEqual(self, amp1, amp2): | |||
self.assertEqual(amp1.getRawHorizontalOverscanBBox(), amp2.getRawHorizontalOverscanBBox()) | |||
self.assertEqual(amp1.getRawVerticalOverscanBBox(), amp2.getRawVerticalOverscanBBox()) | |||
|
|||
def assertAmpRawBBoxesFlippablyEqual(self, amp1, amp2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a doc string.
This retains updated detector/amplifier bbox information that is lost using the "readImage" method as the foundation.
37da188
to
a515b26
Compare
No description provided.