Skip to content
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

Merged
merged 3 commits into from Nov 12, 2019

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Nov 8, 2019

No description provided.

@czwa czwa requested a review from timj November 8, 2019 20:07
@@ -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):
Copy link
Member

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()
Copy link
Member

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?

Copy link
Contributor Author

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):
Copy link
Member

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.
@czwa czwa merged commit 34c6c3b into master Nov 12, 2019
@timj timj deleted the tickets/DM-21981 branch May 12, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants