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-11162: Replace all use of Coord and subclasses with SpherePoint #61
Conversation
@@ -68,17 +67,17 @@ def testRaw(self): | |||
self.assertEqual(raw.getDetector().getName(), "R:0,3 S:0,1") | |||
origin = raw.getWcs().getSkyOrigin() | |||
self.assertAlmostEqual( | |||
origin.getLongitude().asDegrees(), 0.005865, 6) | |||
origin.getLongitude().asDegrees(), 0.0058520, 6) |
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.
Why was this value changed? Same question below.
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 basic problem is that old phosim data had incorrect WCS information in the FITS headers: the date of equinox was not J2000 but was, instead, the date of observation. The old technique for fixing this isn't easily applicable with the new code, and was slightly incorrect. The new technique is more accurate. (Not that the difference between the techniques really matters, since the WCS from phosim isn't meant to be highly accurate in the first place. The important thing is to fix the gross error).
exposure.setWcs(wcs) | ||
|
||
return exposure | ||
# CRVAL is FK5 at date of observation |
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.
I'm trying to understand the changes you made here. Before, the code was converting the wcs from an an Fk5 to Icrs. The new code only changes the metadata. Is this sufficient?
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.
That is a detail of the old technique (mentioned above) that wasn't quite correct. The FITS metadata claimed that CRVAL was ICRS but it was really FK5 with equinox = date of observation. The old code attempted to fix the WCS after it was normalized to ICRS, but the fix was only approximate. The simpler solution (new code) is to fix the FITS metadata before it is used to create the WCS.
8e91b75
to
6e0b543
Compare
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.
Looks good.
No description provided.