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-4441: Update isrMock for multi-component fringes. #94

Merged
merged 1 commit into from May 24, 2019
Merged

Conversation

czwa
Copy link
Contributor

@czwa czwa commented May 21, 2019

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.

@czwa czwa requested a review from plazas May 22, 2019 19:37
Copy link
Contributor

@plazas plazas left a 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)
Copy link
Contributor

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?

Copy link
Contributor Author

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)
Copy link
Contributor

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)

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 "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).

@czwa czwa merged commit ee2966c into master May 24, 2019
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

3 participants