Esempio n. 1
0
def get_state(system):
    # The table of TPM states is here
    # http://phn.github.com/pytpm/conversions.html#function-convert-convertv6

    # We set the epoch and equinox to get consistent results with
    # astrolib.coords.Position, see Position._set_tpmstate there.
    d = dict()
    d['fk5'] = dict(state=tpm.TPM_S06, epoch=tpm.J2000, equinox=tpm.J2000)
    d['fk4'] = dict(state=tpm.TPM_S05, epoch=tpm.B1950, equinox=tpm.B1950)
    d['galactic'] = dict(state=tpm.TPM_S04, epoch=tpm.J2000, equinox=tpm.byear2jd(1958))
    d['ecliptic'] = dict(state=tpm.TPM_S03, epoch=tpm.J2000, equinox=tpm.jyear2jd(1984))
    # d['icrs'] = TPM_S06
    return d[system]
Esempio n. 2
0
def get_state(system):
    # The table of TPM states is here
    # http://phn.github.com/pytpm/conversions.html#function-convert-convertv6

    # We set the epoch and equinox to get consistent results with
    # astrolib.coords.Position, see Position._set_tpmstate there.
    d = dict()
    d['fk5'] = dict(state=tpm.TPM_S06, epoch=tpm.J2000, equinox=tpm.J2000)
    d['fk4'] = dict(state=tpm.TPM_S05, epoch=tpm.B1950, equinox=tpm.B1950)
    d['galactic'] = dict(state=tpm.TPM_S04,
                         epoch=tpm.J2000,
                         equinox=tpm.byear2jd(1958))
    d['ecliptic'] = dict(state=tpm.TPM_S03,
                         epoch=tpm.J2000,
                         equinox=tpm.jyear2jd(1984))
    # d['icrs'] = TPM_S06
    return d[system]
Esempio n. 3
0
 def testByear2jd(self):
     """tpm.byear2jd() => convert Besselian year into Julian date."""
     self.assertAlmostEqual(tpm.byear2jd(1950.0), tpm.B1950)
Esempio n. 4
0
 def testByear2jd(self):
     """tpm.byear2jd() => convert Besselian year into Julian date."""
     self.assertAlmostEqual(tpm.byear2jd(1950.0), tpm.B1950)