コード例 #1
0
def test_sidereal():
    rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='sidereal')
    assert rot == 136.8216 * u.deg
コード例 #2
0
def test_allen():
    rot = diff_rot(10, 30 * u.deg, rot_type='allen')
    assert rot == 136.9 * u.deg
コード例 #3
0
 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)))
コード例 #4
0
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))
コード例 #5
0
def test_synodic():
    rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='synodic')
    assert rot == 126.9656 * u.deg
コード例 #6
0
 def test_allen(self):
     rot = diff_rot(10, 30 * u.deg, rot_type='allen')
     self.failUnless(rot == 136.9 * u.deg)
コード例 #7
0
def test_single(seconds_per_day):
    rot = diff_rot(10 * seconds_per_day, 30 * u.deg)
    assert rot == 136.8216 * u.deg
コード例 #8
0
 def test_sidereal(self):
     rot = diff_rot(10, 30, rot_type='howard', frame_time='sidereal')
     self.failUnless(rot == 136.8216)
コード例 #9
0
def test_snodgrass():
    rot = diff_rot(10, 30 * u.deg, rot_type='snodgrass')
    assert rot == 135.4232 * u.deg
コード例 #10
0
def test_fail():
    with pytest.raises(ValueError):
        rot = diff_rot(10, 30 * u.deg, rot_type='garbage')
コード例 #11
0
def test_allen():
    rot = diff_rot(10, 30 * u.deg, rot_type='allen')
    assert rot == 136.9 * u.deg
コード例 #12
0
def test_howard():
    rot = diff_rot(10, 30 * u.deg, rot_type='howard')
    assert rot == 136.8216 * u.deg
コード例 #13
0
def test_sidereal():
    rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='sidereal')
    assert rot == 136.8216 * u.deg
コード例 #14
0
def test_fail():
    with pytest.raises(ValueError):
        rot = diff_rot(10, 30 * u.deg, rot_type='garbage')
コード例 #15
0
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))
コード例 #16
0
 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])))
コード例 #17
0
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
コード例 #18
0
 def test_allen(self):
     rot = diff_rot(10, 30, rot_type='allen')
     self.failUnless(rot == 136.9)
コード例 #19
0
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
コード例 #20
0
 def test_howard(self):
     rot = diff_rot(10, 30 * u.deg, rot_type='howard')
     self.failUnless(rot == 136.8216 * u.deg)
コード例 #21
0
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
コード例 #22
0
 def test_snodgrass(self):
     rot = diff_rot(10, 30 * u.deg, rot_type='snodgrass')
     self.failUnless(rot == 135.4232 * u.deg)
コード例 #23
0
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
コード例 #24
0
def test_single():
    rot = diff_rot(10, 30 * u.deg)
    assert rot == 136.8216 * u.deg
コード例 #25
0
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
コード例 #26
0
def test_synodic():
    rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='synodic')
    assert rot == 126.9656 * u.deg
コード例 #27
0
def test_fail(seconds_per_day):
    with pytest.raises(ValueError):
        rot = diff_rot(10 * seconds_per_day, 30 * u.deg, rot_type='garbage')
コード例 #28
0
def test_howard():
    rot = diff_rot(10, 30 * u.deg, rot_type='howard')
    assert rot == 136.8216 * u.deg
コード例 #29
0
 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])))
コード例 #30
0
def test_snodgrass():
    rot = diff_rot(10, 30 * u.deg, rot_type='snodgrass')
    assert rot == 135.4232 * u.deg
コード例 #31
0
 def test_single(self):
     rot = diff_rot(10, 30 * u.deg)
     self.failUnless(rot == 136.8216 * u.deg)
コード例 #32
0
 def test_single(self):
     rot = diff_rot(10, 30)
     self.failUnless(rot == 136.8216)
コード例 #33
0
 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)))
コード例 #34
0
 def test_synodic(self):
     rot = diff_rot(10, 30, rot_type='howard', frame_time='synodic')
     self.failUnless(rot == 126.9656)
コード例 #35
0
 def test_synodic(self):
     rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='synodic')
     self.failUnless(rot == 126.9656 * u.deg)
コード例 #36
0
 def test_howard(self):
     rot = diff_rot(10, 30, rot_type='howard')
     self.failUnless(rot == 136.8216)
コード例 #37
0
 def test_sidereal(self):
     rot = diff_rot(10, 30 * u.deg, rot_type='howard', frame_time='sidereal')
     self.failUnless(rot == 136.8216 * u.deg)
コード例 #38
0
 def test_snodgrass(self):
     rot = diff_rot(10, 30, rot_type='snodgrass')
     self.failUnless(rot == 135.4232)
コード例 #39
0
def test_single():
    rot = diff_rot(10, 30 * u.deg)
    assert rot == 136.8216 * u.deg