3333
3434class EulerAngleRotation (Model ):
3535 """
36- Implements Euler angle rotation.
36+ Implements Euler angle intrinsic rotations.
37+
38+ Rotates one coordinate system into another (fixed) coordinate system.
39+ All coordinate systems are right-handed. All intrinsic rotations are
40+ performed clockwise.
3741
3842 Parameters
3943 ----------
4044 phi, theta, psi : float
41- Euler angles in deg
45+ "proper" Euler angles in deg
4246 order : str
4347 A 3 character string, a combination of 'x', 'y' and 'z',
4448 where each character denotes an axis in 3D space.
@@ -52,9 +56,9 @@ class EulerAngleRotation(Model):
5256 psi = Parameter (default = 0 , getter = np .rad2deg , setter = np .deg2rad )
5357
5458 def __init__ (self , phi , theta , psi , order ):
55- if len (order ) > 3 or len ( order ) < 2 :
59+ if len (order ) != 3 :
5660 raise TypeError (
57- "Expected order to be a character sequence of 2 or 3, got {0}" .format (order ))
61+ "Expected order to be a character sequence of length 3, got {0}" .format (order ))
5862 for i in order :
5963 if i not in ['x' , 'y' , 'z' ]:
6064 raise ValueError ("Expected order to be a combination of characters"
@@ -114,7 +118,7 @@ def evaluate(self, alpha, delta, phi, theta, psi):
114118
115119class _SkyRotation (Model ):
116120 """
117- Base class for Euler angle rotations.
121+ Base class for FITS WCS sky rotations.
118122
119123 Parameters
120124 ----------
@@ -157,9 +161,7 @@ def _rotate_zxz(phi_i, theta_i, lon, lat, lon_pole):
157161
158162class RotateNative2Celestial (_SkyRotation ):
159163 """
160- Transformation from Native to Celestial Spherical Coordinates.
161-
162- Defines a ZXZ rotation.
164+ Transform from Native to Celestial Spherical Coordinates.
163165
164166 Parameters
165167 ----------
@@ -181,7 +183,7 @@ def inverse(self):
181183 @classmethod
182184 def evaluate (cls , phi_N , theta_N , lon , lat , lon_pole ):
183185 """
184- Evaluate ZXZ rotation into celestial coordinates.
186+ Rotate native spherical coordinates into celestial coordinates.
185187 """
186188
187189 phi_N = np .deg2rad (phi_N )
@@ -203,9 +205,7 @@ def evaluate(cls, phi_N, theta_N, lon, lat, lon_pole):
203205
204206class RotateCelestial2Native (_SkyRotation ):
205207 """
206- Transformation from Celestial to Native to Spherical Coordinates.
207-
208- Defines a ZXZ rotation.
208+ Transform from Celestial to Native to Spherical Coordinates.
209209
210210 Parameters
211211 ----------
@@ -227,10 +227,9 @@ def inverse(self):
227227 @classmethod
228228 def evaluate (cls , alpha_C , delta_C , lon , lat , lon_pole ):
229229 """
230- Evaluate ZXZ rotation into native coordinates.
230+ Rotate celestial coordinates into native spherical coordinates.
231231
232- This is like RotateNative2Celestial.evaluate except phi and psi are
233- swapped in ZXZ rotation.
232+ This is the inverse transformation of RotateNative2Celestial.
234233 """
235234
236235 alpha_C = np .deg2rad (alpha_C )
0 commit comments