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-4441: Update isrMock for multi-component fringes. #94
Conversation
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.
Things look good to me. Just remove comments in lines 1055 and 1068 of "isrMock.py".
Adding multi-component fringes to the mocks allows full tests of how FringeTask handles these fits. Return fringe solution and RMS values for validation.
self.assertFloatsAlmostEqual(statBefore[0], 8075.6885, atol=1e-2) | ||
self.assertFloatsAlmostEqual(statAfter[0], 8051.6206, atol=1e-2) | ||
self.assertFloatsAlmostEqual(statBefore[0], 8070.0195, atol=1e-2) | ||
self.assertFloatsAlmostEqual(statAfter[0], 8045.7773, atol=1e-2) |
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.
Could you also comment on why these test values need changing?
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.
As below, there was a change in the fringe size on the image, resulting in smaller median/sigma values.
@@ -183,8 +183,8 @@ def test_flatCorrection(self): | |||
self.task.flatCorrection(self.inputExp, flatIm) | |||
statAfter = computeImageMedianAndStd(self.inputExp.image[self.amp.getBBox()]) | |||
self.assertGreater(statAfter[1], statBefore[1]) | |||
self.assertFloatsAlmostEqual(statAfter[1], 147417.36, atol=1e-2) | |||
self.assertFloatsAlmostEqual(statBefore[1], 148.28436, atol=1e-2) | |||
self.assertFloatsAlmostEqual(statAfter[1], 147407.02, atol=1e-2) |
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.
And here (and the ones below, etc)
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 "science" images used for these tests are generated with doAddFringe=True
. To better test the multi-fringe code, the wavelength of the function was cut by a factor of 3, which results in the fringe component being significant over a smaller area. This gives slightly smaller median and sigma values (as more area is not influenced by the fringe pattern).
Adding multi-component fringes to the mocks allows full tests to confirm
FringeTask handles these fits. Return fringe solution and RMS values
for validation of the measured values.