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
JWInstrument._tel_coords
returns incorrect V2/V3 angle
#279
Comments
I think your edited/"upon further investigation" point is right. Yes, the intent of the |
I looked this over and I agree. It looks like As for whether the |
Thanks @shanosborne and @JarronL. Seems like we have a plan. Now we just need to agree which of us is going to turn that into a PR. Any volunteers? :-) |
I can do it. @mperrin - do you have an opinion on if the |
I think the better docstring is a sufficient fix for now - we can add the new parameter later if necessary but right now it’s not clear to me it’s actually needed. |
Fixed by #281 |
In general, the JWInstrument class determines a set of detector pixel positions using
set_position_from_aperture_name()
which currently stores the raw detector pixel values as seen thedet
coordinate frame. However, when one attempts to convert those to telescope coordinates (tel
) via the_tel_coords
method (which in turn callspix2angle
in theDetectorGeometry
class), this function instead assumes the input pixels are in thesci
frame not thedet
frame:It's easy to where the confusion came from, because there are really two separate pixel coordinates (
sci
anddet
), so thepix2angle()
function can be ambiguous if one isn't paying attention. I might recommend adding a keyword specifying the input coordinate frame along the lines of:Edit:
Upon further investigation, it looks like WebbPSF expects
detector_position
to be in the science frame as opposed to the detector frame. In this case, the simplest solution is to modifyset_position_from_aperture_name
:I think my original point on adding a choice of input frame in
pix2angle
might still be useful, though.The text was updated successfully, but these errors were encountered: