diff --git a/ale/drivers/lro_drivers.py b/ale/drivers/lro_drivers.py index 00b69620dbf365627e2711f098279bf6505c4bb3..dd7d5e57f88cf45d699207c4f7044a973d3380d9 100644 --- a/ale/drivers/lro_drivers.py +++ b/ale/drivers/lro_drivers.py @@ -271,7 +271,7 @@ class LroLrocPds3LabelNaifSpiceDriver(LineScanner, NaifSpice, Pds3Label, Driver) position = state[:3] velocity = state[3:] rotation = frame_chain.compute_rotation(1, lro_bus_id) - rotated_velocity = spice.mxv(rotation._rots.as_dcm()[0], velocity) + rotated_velocity = spice.mxv(rotation._rots.as_matrix()[0], velocity) return rotated_velocity[0] @@ -507,7 +507,7 @@ class LroLrocIsisLabelNaifSpiceDriver(LineScanner, NaifSpice, IsisLabel, Driver) position = state[:3] velocity = state[3:] rotation = frame_chain.compute_rotation(1, lro_bus_id) - rotated_velocity = spice.mxv(rotation._rots.as_dcm()[0], velocity) + rotated_velocity = spice.mxv(rotation._rots.as_matrix()[0], velocity) return rotated_velocity[0] diff --git a/ale/rotation.py b/ale/rotation.py index 600ca3881348a1d40f5acd0cca597da46d602a7e..b746be61c306302a6bf25478f4833c332e38543f 100644 --- a/ale/rotation.py +++ b/ale/rotation.py @@ -32,7 +32,7 @@ class ConstantRotation: -------- scipy.spatial.transform.Rotation.from_dcm """ - rot = Rotation.from_dcm(mat) + rot = Rotation.from_matrix(mat) return ConstantRotation(rot.as_quat(), source, dest) def __init__(self, quat, source, dest): @@ -82,7 +82,7 @@ class ConstantRotation: """ The rotation matrix representation of the constant rotation """ - return self._rot.as_dcm() + return self._rot.as_matrix() def inverse(self): """ @@ -370,7 +370,7 @@ class TimeDependentRotation: skew = np.array([[0, -avs[indx, 2], avs[indx, 1]], [avs[indx, 2], 0, -avs[indx, 0]], [-avs[indx, 1], avs[indx, 0], 0]]) - rot_deriv = np.dot(skew, rots[indx].as_dcm().T).T + rot_deriv = np.dot(skew, rots[indx].as_matrix().T).T rotated_vel[indx] = rots[indx].apply(vec_vel[indx]) rotated_vel[indx] += np.dot(rot_deriv, vec_pos[indx]) diff --git a/environment.yml b/environment.yml index db30c99785a739e2fa3633a2fa85298483d0b188..b0d9bf4028475c00e8393fc65822999c7a72596f 100644 --- a/environment.yml +++ b/environment.yml @@ -14,7 +14,7 @@ dependencies: - pytz - python - python-dateutil - - scipy + - scipy>=1.4.0 - spiceypy>=2.3.0 - pyyaml - networkx diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d713bb0448bfa0c9a34f56632f404c5b911cef85..f535f2be37e743ac4e6c2b1f6347c44e264d6850 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -28,7 +28,7 @@ requirements: - python - python-dateutil - pytz - - scipy >=1.2.0 + - scipy >=1.4.0 - spiceypy >=2.3.0 - pyyaml diff --git a/tests/pytests/test_isis_spice_drivers.py b/tests/pytests/test_isis_spice_drivers.py index 26a0891ac88fe92426e1041c72fe467601100496..afe4017cd6e2d26315ca076af9063d97135198e9 100644 --- a/tests/pytests/test_isis_spice_drivers.py +++ b/tests/pytests/test_isis_spice_drivers.py @@ -512,7 +512,7 @@ # test_cube._body_orientation_table['Rotations'] = [[1.0/np.sqrt(2), 1.0/np.sqrt(2), 0, 0]] # #Overwrite the instrument pointing, which is (0, 1, 2, 3) at this point # test_cube._inst_pointing_table["Rotations"] = [[1.0/np.sqrt(2), 0, 1.0/np.sqrt(2), 0]] -# print('inverse body rotation', test_cube._body_j2k2bf_rotation.inv().as_dcm()) +# print('inverse body rotation', test_cube._body_j2k2bf_rotation.inv().as_matrix()) # np.testing.assert_almost_equal(test_cube._sensor_orientation, np.asarray([1/2, -1/2, -1/2, -1/2])) # # def test_body_orientation(test_cube):