You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This required a bit of archaeology. Back in February 2020, Skyfield had
a severe issue: the curves it produced for the Moon’s ecliptic longitude
were non-monotonic over very short intervals. So a search for its phase
might encounter jitter right at the boundary between, say, first quarter
and second quarter, and report two spurious transitions that were
fractions of a second apart.
So I added a filter to detect and remove ‘stutter’ — if a cluster of
events was found within a fraction of a second, I only kept the last.
This worked well with all of the long lazy almanac routines, which look
for things like Moon phases and seasons that are spaced weeks apart.
See issue #333 and commit 3e93e2b.
But over the next five years, two things changed.
1. The discrete-events finder found a second use: Earth satellite
events! These are not weeks apart, but minutes, and sometimes
seconds for a satellite that only momentarily crests the horizon.
The filter, alas, was tossing out closely spaced events.
2. I’m tentative about this, but it looks like the non-monotonic
problems, the jitter at very short timescales, disappeared when
Skyfield switched to two-float times! I performed a bisect and found
the filter became unnecessary on 2020 May 12, just a few months after
it was added, at 1f8e66a.
So, with some wariness, I am removing the filter. No tests break!
Users will have to let me know if spurious events reappear. If they do,
and I can’t fix the root problem by removing the jitter, then I’ll have
each routine do its own filtering on the result of _find_discrete(), so
Moon phases and Earth satellite risings don’t have to share the same
filter. (Fixes#559.)
0 commit comments