Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When working on fitting the PSF of Roman commissioning data, I realized we have a bug in the Roman getPSF function in terms of how we rotate the PSF to sky coordinates according to how the telescope is oriented. We just apply the wcs.toWorld() function. This gets the rotation and reflection (approximately) correct, but also applies the distortion, which is wrong. The upshot of the bug is that the PSF is not properly distorted when drawn with the same WCS. This PR fixes this to just apply the orthogonal part of the WCS without the distortion (symmetric positive definite part).
However, using the WCS for this is an approximation, which is still not completely correct. The WCS can include rotation components from pixel geometry, which are not properly part of the rotation we want. It turns out the Roman ASDF files include the information we need to do this correctly. Namely the boresight direction and the position angle of the V3 axis. So I also added the option to provide these directly, which does the more correct rotation. The rotation angle can still change slightly across the field of view, due to the direction to north changing slightly. But any other rotation in the WCS will be applied correctly when the object is drawn on an image.