def test_sidereal(): rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='sidereal') assert rot == 136.8216 * u.deg
def test_allen(): rot = diff_rot(10, 30 * u.deg, rot_type='allen') assert rot == 136.9 * u.deg
def test_array(self): rot = diff_rot(10, np.linspace(-70, 70, 2) * u.deg) self.failUnless( np.array_equal(rot, Longitude(np.array([110.2725, 110.2725]) * u.deg)))
def test_array(): rot = diff_rot(10, np.linspace(-70, 70, 2) * u.deg) assert_quantity_allclose(rot, Longitude(np.array([110.2725, 110.2725]) * u.deg))
def test_synodic(): rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='synodic') assert rot == 126.9656 * u.deg
def test_allen(self): rot = diff_rot(10, 30 * u.deg, rot_type='allen') self.failUnless(rot == 136.9 * u.deg)
def test_single(seconds_per_day): rot = diff_rot(10 * seconds_per_day, 30 * u.deg) assert rot == 136.8216 * u.deg
def test_sidereal(self): rot = diff_rot(10, 30, rot_type='howard', frame_time='sidereal') self.failUnless(rot == 136.8216)
def test_snodgrass(): rot = diff_rot(10, 30 * u.deg, rot_type='snodgrass') assert rot == 135.4232 * u.deg
def test_fail(): with pytest.raises(ValueError): rot = diff_rot(10, 30 * u.deg, rot_type='garbage')
def test_howard(): rot = diff_rot(10, 30 * u.deg, rot_type='howard') assert rot == 136.8216 * u.deg
def test_array(seconds_per_day): rot = diff_rot(10 * seconds_per_day, np.linspace(-70, 70, 2) * u.deg) assert_quantity_allclose(rot, Longitude(np.array([110.2725, 110.2725]) * u.deg))
def test_array(self): rot = diff_rot(10, np.linspace(-70, 70, 2)) self.failUnless(np.array_equal(rot, np.array([110.2725, 110.2725])))
def test_synodic(seconds_per_day): rot = diff_rot(10 * seconds_per_day, 30 * u.deg, rot_type='howard', frame_time='synodic') assert rot == 126.9656 * u.deg
def test_allen(self): rot = diff_rot(10, 30, rot_type='allen') self.failUnless(rot == 136.9)
def test_sidereal(seconds_per_day): rot = diff_rot(10 * seconds_per_day, 30 * u.deg, rot_type='howard', frame_time='sidereal') assert rot == 136.8216 * u.deg
def test_howard(self): rot = diff_rot(10, 30 * u.deg, rot_type='howard') self.failUnless(rot == 136.8216 * u.deg)
def test_howard(seconds_per_day): rot = diff_rot(10 * seconds_per_day, 30 * u.deg, rot_type='howard') assert rot == 136.8216 * u.deg
def test_snodgrass(self): rot = diff_rot(10, 30 * u.deg, rot_type='snodgrass') self.failUnless(rot == 135.4232 * u.deg)
def test_allen(seconds_per_day): rot = diff_rot(10 * seconds_per_day, 30 * u.deg, rot_type='allen') assert rot == 136.9 * u.deg
def test_single(): rot = diff_rot(10, 30 * u.deg) assert rot == 136.8216 * u.deg
def test_snodgrass(seconds_per_day): rot = diff_rot(10 * seconds_per_day, 30 * u.deg, rot_type='snodgrass') assert rot == 135.4232 * u.deg
def test_fail(seconds_per_day): with pytest.raises(ValueError): rot = diff_rot(10 * seconds_per_day, 30 * u.deg, rot_type='garbage')
def test_single(self): rot = diff_rot(10, 30 * u.deg) self.failUnless(rot == 136.8216 * u.deg)
def test_single(self): rot = diff_rot(10, 30) self.failUnless(rot == 136.8216)
def test_array(self): rot = diff_rot(10, np.linspace(-70, 70, 2) * u.deg) self.failUnless(np.array_equal(rot, Longitude(np.array([110.2725, 110.2725]) * u.deg)))
def test_synodic(self): rot = diff_rot(10, 30, rot_type='howard', frame_time='synodic') self.failUnless(rot == 126.9656)
def test_synodic(self): rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='synodic') self.failUnless(rot == 126.9656 * u.deg)
def test_howard(self): rot = diff_rot(10, 30, rot_type='howard') self.failUnless(rot == 136.8216)
def test_sidereal(self): rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='sidereal') self.failUnless(rot == 136.8216 * u.deg)
def test_snodgrass(self): rot = diff_rot(10, 30, rot_type='snodgrass') self.failUnless(rot == 135.4232)