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-23694: Create script for producing distortion model from Jointcal output #176
Conversation
6bea28d
to
35df9bb
Compare
tests/test_cameraGeom.py
Outdated
self.wcs1) | ||
# TOOD: If we ever go with a more careful approach to the mean | ||
# fieldAngle question, this may have to change. | ||
self.assertFloatsAlmostEqual(model.fieldAngle, angle1, rtol=1e-4) |
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 this test radial1
and tangential1
too?
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.
Unfortunately, I'm less sure how to test those: the fieldAngles should be very nearly identical between detectors on the same visit, but are slightly different across visits, whereas the other two are more different; that's the point of averaging across visits. Other than just repeating the math for the calculation here (which isn't really what I want) or putting in a similar "almost equal" test, I'm not sure what to do. Another "almost equal" test with an even looser tolerance seems like it's too far from testing the important thing, which is the averaging; it would help check that the right axis was averaged over.
Ideas for how to test that are very welcome.
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.
Yeah, I see what you mean; most of the things I can think of are also repeating math or trivial. That said, I don't think there's any harm in verifying that model.fieldAngles[0] == angle1
and similarly radial1
and tangential1
(if I understand that correctly).
This is the beginnings of camera-generic code to calculate a camera distortion model from the jointcal WCS output.
I used this when playing around with the plate scale code, and it may prove useful for looking at the calculated distortion models.
1ba2828
to
3d9e435
Compare
No description provided.