# T = jd_to_jcent(jd) D, M, M1, F, omega = _constants(T) deltaEps = 0.0 for tD, tM, tM1, tF, tomega, tpsiK, tpsiT, tepsK, tepsT in _tbl: arg = D*tD + M*tM + M1*tM1 + F*tF + omega*tomega deltaEps = deltaEps + (tepsK/10000.0 + tepsT/100000.0 * T) * np.cos(arg) deltaEps = deltaEps / 3600 deltaEps = d_to_r(deltaEps) return deltaEps # # Constant terms # _el0 = (d_to_r(dms_to_d(23, 26, 21.448)), d_to_r(dms_to_d(0, 0, -46.8150)), d_to_r(dms_to_d(0, 0, -0.00059)), d_to_r(dms_to_d(0, 0, 0.001813))) def obliquity(jd): """Return the mean obliquity of the ecliptic. Low precision, but good enough for most uses. [Meeus-1998: equation 22.2]. Accuracy is 1" over 2000 years and 10" over 4000 years. Arguments: - `jd` : Julian Day in dynamical time Returns:
- latitude in radians - radius in au """ L = self.dimension(jd, planet, "L") B = self.dimension(jd, planet, "B") R = self.dimension(jd, planet, "R") return L, B, R # # Constant terms # _k0 = d_to_r(-1.397) _k1 = d_to_r(-0.00031) _k2 = d_to_r(dms_to_d(0, 0, -0.09033)) _k3 = d_to_r(dms_to_d(0, 0, 0.03916)) def vsop_to_fk5(jd, L, B): """Convert VSOP to FK5 coordinates. This is required only when using the full precision of the VSOP model. [Meeus-1998: pg 219] Arguments: - `jd` : Julian Day in dynamical time - `L` : longitude in radians - `B` : latitude in radians Returns:
def test_geocentric_planet(self): ra, dec = geocentric_planet(2448976.5, "Venus", d_to_r(dms_to_d(0, 0, 16.749)), d_to_r(23.439669), days_per_second) np.testing.assert_array_almost_equal(r_to_d(ra), r_to_d(hms_to_fday(21, 4, 41.454) * pi2), decimal=5) np.testing.assert_almost_equal(r_to_d(dec), dms_to_d(-18, 53, 16.84), decimal=5)
# T = jd_to_jcent(jd) D, M, M1, F, omega = _constants(T) deltaEps = 0.0; for tD, tM, tM1, tF, tomega, tpsiK, tpsiT, tepsK, tepsT in _tbl: arg = D*tD + M*tM + M1*tM1 + F*tF + omega*tomega deltaEps = deltaEps + (tepsK/10000.0 + tepsT/100000.0 * T) * cos(arg) deltaEps = deltaEps / 3600 deltaEps = d_to_r(deltaEps) return deltaEps # # Constant terms # _el0 = (d_to_r(dms_to_d(23, 26, 21.448)), d_to_r(dms_to_d( 0, 0, -46.8150)), d_to_r(dms_to_d( 0, 0, -0.00059)), d_to_r(dms_to_d( 0, 0, 0.001813))) def obliquity(jd): """Return the mean obliquity of the ecliptic. Low precision, but good enough for most uses. [Meeus-1998: equation 22.2]. Accuracy is 1" over 2000 years and 10" over 4000 years. Parameters: jd : Julian Day in dynamical time Returns:
- `L` : longitude in radians Returns: - corrected longitude in radians """ jd = np.atleast_1d(jd) T = jd_to_jcent(jd) omega = _lk0 - _lk1 * T return _scalar_if_one(modpi2(L - _lk2 - _lk3 * np.sin(omega))) # # Constant terms # _lk4 = d_to_r(dms_to_d(0, 0, 20.4898)) def aberration_low(R): """Correct for aberration; low precision, but good enough for most uses. [Meeus-1998: pg 164] Arguments: - `R` : radius in au Returns: - correction in radians """ return -_lk4 / R