Hide Time._nutation_angles_radians for now
I have still not settled on the API for offering alternative nutation routines, so hiding this gives me the freedom to release later today without making a public API commitment yet.
This commit is contained in:
parent
d1108c547f
commit
eda5feac32
|
@ -81,7 +81,7 @@ def seasons(ephemeris):
|
|||
|
||||
def season_at(t):
|
||||
"""Return season 0 (Spring) through 3 (Winter) at time `t`."""
|
||||
t.nutation_angles_radians = iau2000b_radians(t)
|
||||
t._nutation_angles_radians = iau2000b_radians(t)
|
||||
e = earth.at(t)
|
||||
_, slon, _ = e.observe(sun).apparent().ecliptic_latlon('date')
|
||||
return (slon.radians // (tau / 4) % 4).astype(int)
|
||||
|
@ -111,7 +111,7 @@ def moon_phases(ephemeris):
|
|||
|
||||
def moon_phase_at(t):
|
||||
"""Return the phase of the moon 0 through 3 at time `t`."""
|
||||
t.nutation_angles_radians = iau2000b_radians(t)
|
||||
t._nutation_angles_radians = iau2000b_radians(t)
|
||||
e = earth.at(t)
|
||||
_, mlon, _ = e.observe(moon).apparent().ecliptic_latlon('date')
|
||||
_, slon, _ = e.observe(sun).apparent().ecliptic_latlon('date')
|
||||
|
@ -200,7 +200,7 @@ def sunrise_sunset(ephemeris, topos):
|
|||
than -0.8333 degrees.
|
||||
|
||||
"""
|
||||
t.nutation_angles_radians = iau2000b_radians(t)
|
||||
t._nutation_angles_radians = iau2000b_radians(t)
|
||||
return topos_at(t).observe(sun).apparent().altaz()[0].degrees >= -0.8333
|
||||
|
||||
is_sun_up_at.rough_period = 0.5 # twice a day
|
||||
|
@ -232,7 +232,7 @@ def dark_twilight_day(ephemeris, topos):
|
|||
|
||||
def is_it_dark_twilight_day_at(t):
|
||||
"""Return whether the sun is up, down, or whether there is twilight."""
|
||||
t.nutation_angles_radians = iau2000b_radians(t)
|
||||
t._nutation_angles_radians = iau2000b_radians(t)
|
||||
degrees = topos_at(t).observe(sun).apparent().altaz()[0].degrees
|
||||
r = zeros_like(degrees, int)
|
||||
r[degrees >= -18.0] = 1
|
||||
|
@ -261,7 +261,7 @@ def risings_and_settings(ephemeris, target, topos,
|
|||
|
||||
def is_body_up_at(t):
|
||||
"""Return `True` if the target has risen by time `t`."""
|
||||
t.nutation_angles_radians = iau2000b_radians(t)
|
||||
t._nutation_angles_radians = iau2000b_radians(t)
|
||||
return topos_at(t).observe(target).apparent().altaz()[0].degrees > h
|
||||
|
||||
is_body_up_at.rough_period = 0.5 # twice a day
|
||||
|
@ -269,7 +269,7 @@ def risings_and_settings(ephemeris, target, topos,
|
|||
|
||||
def _distance_to(center, target):
|
||||
def distance_at(t):
|
||||
t.nutation_angles_radians = iau2000b_radians(t)
|
||||
t._nutation_angles_radians = iau2000b_radians(t)
|
||||
distance = center.at(t).observe(target).distance().au
|
||||
return distance
|
||||
return distance_at
|
||||
|
|
|
@ -137,7 +137,7 @@ def solar_terms(ephemeris):
|
|||
|
||||
def solar_term_at(t):
|
||||
"""Return season 0 through 23 at time `t`."""
|
||||
t.nutation_angles_radians = iau2000b_radians(t)
|
||||
t._nutation_angles_radians = iau2000b_radians(t)
|
||||
e = earth.at(t)
|
||||
_, slon, _ = e.observe(sun).apparent().ecliptic_latlon('date')
|
||||
return (slon.radians // (tau / 24) % 24).astype(int)
|
||||
|
|
|
@ -355,10 +355,12 @@ se1_1 = +0.00e-6
|
|||
# of our tests also still call them, to help keep them working.
|
||||
|
||||
def compute_nutation(t):
|
||||
"""Deprecated: this is now a method on the Time object."""
|
||||
return t.N
|
||||
|
||||
def earth_tilt(t):
|
||||
d_psi, d_eps = t.nutation_angles_radians
|
||||
"""Deprecated: these are now computed separately on the Time object."""
|
||||
d_psi, d_eps = t._nutation_angles_radians
|
||||
mean_ob = t._mean_obliquity_radians
|
||||
true_ob = mean_ob + d_eps
|
||||
c_terms = equation_of_the_equinoxes_complimentary_terms(t.tt)
|
||||
|
|
|
@ -315,7 +315,7 @@ class ICRF(object):
|
|||
' a floating point Terrestrial Time (TT),'
|
||||
' or the string "date" for epoch-of-date')
|
||||
|
||||
_, d_eps = epoch.nutation_angles_radians
|
||||
_, d_eps = epoch._nutation_angles_radians
|
||||
true_obliquity = epoch._mean_obliquity_radians + d_eps
|
||||
rotation = _mxm(rot_x(- true_obliquity), epoch.M)
|
||||
position_au = _mxv(rotation, position_au)
|
||||
|
|
|
@ -618,7 +618,7 @@ class Time(object):
|
|||
return rollaxis(self.C, 1)
|
||||
|
||||
@reify
|
||||
def nutation_angles_radians(self):
|
||||
def _nutation_angles_radians(self):
|
||||
# TODO: add psi and eps corrections support back in here, rather
|
||||
# than at points of use.
|
||||
return iau2000a_radians(self)
|
||||
|
@ -632,7 +632,7 @@ class Time(object):
|
|||
# continues to support.
|
||||
|
||||
d_psi, d_eps = angles
|
||||
self.nutation_angles_radians = (
|
||||
self._nutation_angles_radians = (
|
||||
d_psi / 1e7 * ASEC2RAD,
|
||||
d_eps / 1e7 * ASEC2RAD,
|
||||
)
|
||||
|
@ -687,7 +687,7 @@ class Time(object):
|
|||
@reify
|
||||
def gast(self):
|
||||
"""Greenwich Apparent Sidereal Time as decimal hours."""
|
||||
d_psi, _ = self.nutation_angles_radians
|
||||
d_psi, _ = self._nutation_angles_radians
|
||||
tt = self.tt
|
||||
# TODO: move this into an eqeq function?
|
||||
c_terms = equation_of_the_equinoxes_complimentary_terms(tt)
|
||||
|
@ -708,7 +708,7 @@ class Time(object):
|
|||
|
||||
def nutation_matrix(self):
|
||||
"""Compute the 3×3 nutation matrix N for this date."""
|
||||
d_psi, d_eps = self.nutation_angles_radians
|
||||
d_psi, d_eps = self._nutation_angles_radians
|
||||
mean_obliquity = self._mean_obliquity_radians
|
||||
true_obliquity = mean_obliquity + d_eps
|
||||
return build_nutation_matrix(mean_obliquity, true_obliquity, d_psi)
|
||||
|
|
Loading…
Reference in New Issue