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-32055: Write util for calculating angle between wcses #611
Conversation
e84e80c
to
b27f6f5
Compare
b27f6f5
to
185d4dc
Compare
185d4dc
to
0ba9d55
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.
The docstring needs to be updated for the new signature. Otherwise looks good. I'll click approve to save a button press later, but that needs to be updated. Other minor naming comments I leave up to you.
python/lsst/afw/geom/skyWcs.py
Outdated
@@ -99,5 +101,47 @@ def skyToPixelArray(self, ra, dec, degrees=False): | |||
|
|||
return x.ravel(), y.ravel() | |||
|
|||
def getRelativeRotationAngleFromWcs(self, wcs): |
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 know I suggested the name off the top of my head, but is Angle
redundant? Leave it up to you if you think getRelativeRotationFromWcs()
sounds okay.
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.
Is now getRelativeRotationToWcs()
for anyone following.
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.
Is it "to" or "from"? There is a minus sign difference implied between the two names. It's worth thinking about which one is correct here.
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 changed the name (and the docs) precisely because of that difference, but it's also entirely possible that I got it wrong. Do you think it looks wrong, or were you just urging caution in general as they're imply different things (in which case I totally agree!)
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.
It was general caution. I didn't try to figure it out. If you thought about it, then that's probably good.
And I just now took the chance to think about it too, and I think this is right. It's the (counter-clockwise) rotation you need to apply to this one to get to the other one. So yeah, "to" seems like the right preposition.
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.
Great, thanks! I think this is all the more important now that it's a method that lives on the wcs itself.
0e6730f
to
0a52c97
Compare
0a52c97
to
526ceb5
Compare
No description provided.