Exemplo n.º 1
0
    def testLdelfect(self):
        """tpm.ldeflect => apply GR light deflection."""
        v6h = tpm.evp(tpm.J2000)[1]
        v6 = tpm.V6S(r=1, alpha=tpm.d2r(34.56), delta=tpm.d2r(46.19))
        v6 = v6.s2c()

        v6 = tpm.ldeflect(v6, v6h, 1)

        self.verify(v6.c2s(), tpm.V6S(r=1.0, alpha=0.6031857970, delta=0.8061675815))
Exemplo n.º 2
0
    def testLdelfect(self):
        """tpm.ldeflect => apply GR light deflection."""
        v6h = tpm.evp(tpm.J2000)[1]
        v6 = tpm.V6S(r=1, alpha=tpm.d2r(34.56), delta=tpm.d2r(46.19))
        v6 = v6.s2c()

        v6 = tpm.ldeflect(v6, v6h, 1)

        self.verify(v6.c2s(), tpm.V6S(r=1.0, alpha=0.6031857970,
                                delta=0.8061675815))
Exemplo n.º 3
0
 def testEvp(self):
     """tpm.evp => Barycentric and Heliocentric V6C."""
     # See pytpm/tests/c_tests/evp_test.c
     tdt = [tpm.J2000, tpm.J1984]
     v6b_c = [tpm.V6C(x=-0.184273673, y=0.884790492, z=0.383823230,
                    xdot=-0.017202342, ydot=-0.002904995, zdot=-0.001259484),
              tpm.V6C(x=-0.167332100, y=0.896946944, z=0.388718633,
                     xdot=-0.017240508, ydot=-0.002790623, zdot=-0.001209123)]
     v6h_c = [tpm.V6C(x=-0.177134378, y=0.887424942, z=0.384742891,
                      xdot=-0.017207714, ydot=-0.002898199, zdot=-0.001256438),
              tpm.V6C(x=-0.170373080, y=0.888493845, z=0.385246878,
                      xdot=-0.017232243, ydot=-0.002792198, zdot=-0.001210002)]
     for i,t in enumerate(tdt):
         v6b, v6h = tpm.evp(tpm.tdt2tdb(t))
         self.verify(v6b, v6b_c[i])
         self.verify(v6h, v6h_c[i])
Exemplo n.º 4
0
 def testEvp(self):
     """tpm.evp => Barycentric and Heliocentric V6C."""
     # See pytpm/tests/c_tests/evp_test.c
     tdt = [tpm.J2000, tpm.J1984]
     v6b_c = [
         tpm.V6C(
             x=-0.184273673, y=0.884790492, z=0.383823230, xdot=-0.017202342, ydot=-0.002904995, zdot=-0.001259484
         ),
         tpm.V6C(
             x=-0.167332100, y=0.896946944, z=0.388718633, xdot=-0.017240508, ydot=-0.002790623, zdot=-0.001209123
         ),
     ]
     v6h_c = [
         tpm.V6C(
             x=-0.177134378, y=0.887424942, z=0.384742891, xdot=-0.017207714, ydot=-0.002898199, zdot=-0.001256438
         ),
         tpm.V6C(
             x=-0.170373080, y=0.888493845, z=0.385246878, xdot=-0.017232243, ydot=-0.002792198, zdot=-0.001210002
         ),
     ]
     for i, t in enumerate(tdt):
         v6b, v6h = tpm.evp(tpm.tdt2tdb(t))
         self.verify(v6b, v6b_c[i])
         self.verify(v6h, v6h_c[i])