-
Notifications
You must be signed in to change notification settings - Fork 32
Bugfix #409
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
base: main
Are you sure you want to change the base?
Bugfix #409
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1064,7 +1064,8 @@ def idl_to_tel(self, x_idl, y_idl, V3IdlYAngle_deg=None, V2Ref_arcsec=None, V3Re | |
| if input_coordinates == 'cartesian': | ||
| # define cartesian unit vector as in JWST-PLAN-006166, Section 5.7.1.1 | ||
| # then apply 3D rotation matrix to tel | ||
| unit_vector_idl = rotations.unit_vector_from_cartesian(x=x_idl*u.arcsec, y=y_idl*u.arcsec) | ||
| unit_vector_idl = rotations.unit_vector_from_cartesian(y=x_idl*u.arcsec, z=y_idl*u.arcsec) | ||
| unit_vector_idl[1] = aperture.VIdlParity * unit_vector_idl[1] | ||
|
|
||
| if input_coordinates == 'polar': | ||
| # interpret idl coordinates as spherical, i.e. distortion polynomial includes deprojection | ||
|
|
@@ -1175,8 +1176,9 @@ def tel_to_idl(self, v2_arcsec, v3_arcsec, V3IdlYAngle_deg=None, V2Ref_arcsec=No | |
| unit_vector_idl = np.dot(l_matrix, unit_vector_tel) | ||
|
|
||
| if output_coordinates == 'cartesian': | ||
| x_idl_arcsec, y_idl_arcsec = unit_vector_idl[0] * u.rad.to(u.arcsec), unit_vector_idl[ | ||
| 1] * u.rad.to(u.arcsec) | ||
| unit_vector_idl[1] = aperture.VIdlParity * unit_vector_idl[1] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sanjibs Would you be able to change these and resubmit the PR? (Sorry, I'm not familiar enough to do this from my end). |
||
| x_idl_arcsec, y_idl_arcsec = unit_vector_idl[1] * u.rad.to(u.arcsec), unit_vector_idl[ | ||
| 2] * u.rad.to(u.arcsec) | ||
| elif output_coordinates == 'polar': | ||
| unit_vector_idl[1] = self.VIdlParity * unit_vector_idl[1] | ||
| x_idl, y_idl = rotations.polar_angles(unit_vector_idl) | ||
|
|
@@ -2620,4 +2622,4 @@ class RomanAperture(Aperture): | |
|
|
||
| def __init__(self): | ||
| super(RomanAperture, self).__init__() | ||
| self.observatory = 'Roman' | ||
| self.observatory = 'Roman' | ||
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.
aperture.VIdlParityshould beself.VIdlParity