def test_body_rotation(driver): meta_data = isis_formatter.to_isis(driver) rotation = meta_data['BodyRotation'] assert rotation['TimeDependentFrames'] == [100, 1] assert rotation['CkTableStartTime'] == 0 assert rotation['CkTableEndTime'] == 1 assert rotation['CkTableOriginalSize'] == 2 np.testing.assert_equal(rotation['EphemerisTimes'], np.array([0, 1])) np.testing.assert_equal(rotation['Quaternions'], np.array([[-1, 0, 0, 0], [-1, 0, 0, 0]]))
def test_sun_position(driver): meta_data = json.loads(isis_formatter.to_isis(driver)) position = meta_data['SunPosition'] assert position['SpkTableStartTime'] == 600 assert position['SpkTableEndTime'] == 700 assert position['SpkTableOriginalSize'] == 2 np.testing.assert_equal(position['EphemerisTimes'], np.array([600, 700])) np.testing.assert_equal(position['Positions'], np.array([[0, 1, 2], [3, 4, 5]])) np.testing.assert_equal(position['Velocities'], np.array([[0, -1, -2], [-3, -4, -5]]))
def test_sun_position(driver): meta_data = isis_formatter.to_isis(driver) position = meta_data['SunPosition'] assert position['SpkTableStartTime'] == 600 assert position['SpkTableEndTime'] == 700 assert position['SpkTableOriginalSize'] == 2 np.testing.assert_equal(position['EphemerisTimes'], np.array([600, 700])) np.testing.assert_equal( position['Positions'], np.array([[0, 0.001, 0.002], [0.003, 0.004, 0.005]])) np.testing.assert_equal( position['Velocities'], np.array([[0, -0.001, -0.002], [-0.003, -0.004, -0.005]]))
def test_instrument_pointing(driver): meta_data = isis_formatter.to_isis(driver) pointing = meta_data['InstrumentPointing'] assert pointing['TimeDependentFrames'] == [1000, 1] assert pointing['ConstantFrames'] == [1010, 1000] np.testing.assert_equal(pointing['ConstantRotation'], np.array([1., 0., 0., 0., 1., 0., 0., 0., 1.])) assert pointing['CkTableStartTime'] == 0 assert pointing['CkTableEndTime'] == 1 assert pointing['CkTableOriginalSize'] == 2 np.testing.assert_equal(pointing['EphemerisTimes'], np.array([0, 1])) np.testing.assert_equal(pointing['Quaternions'], np.array([[-1, 0, 0, 0], [-1, 0, 0, 0]]))
def test_naif_keywords(driver): meta_data = isis_formatter.to_isis(driver) assert meta_data['NaifKeywords'] == {'keyword_1': 0, 'keyword_2': 'test'}
def test_camera_version(driver): meta_data = isis_formatter.to_isis(driver) assert meta_data['CameraVersion'] == 1