Closed BarryBalls closed 1 year ago
@BarryBalls — Thank you for this contribution, I think it's a definite improvement to the routine! With the old method (and thanks for naming it, I didn't know its source or date!), the script design/eclipses_lunar.py
in the repository prints:
Extra: 71 / 7238
Mismatch: 28 / 7238
But if I pull in your version of the routine, then the numbers are much smaller!
Extra: 3 / 7238
Mismatch: 14 / 7238
Missing: 2 / 7238
There is only one snag: the documentation currently makes the proud claim that ‘Skyfield does currently find every one of the 7,238 lunar eclipses' in the Canon. It looks like making this adjustment would mean missing two eclipses from the Canon:
- 859-05-20 13:38:04 TT N MISSING eclipse!
...
- 2791-02-11 02:59:35 TT N MISSING eclipse!
(That's from a slightly improved version of design/eclipses_lunar.py
that I'm about to commit, that shows the actual dates of any missing eclipses; since there weren't any before, it wasn't written to print their dates.)
I'll go look up how significant those eclipses were. And I'll probably land your new code in any case; maybe I'll first adjust the docs, and see if the missing eclipses are easy to explain!
I just have a couple of small additions to the lunar_eclipses function for your consideration which add functionality at negligible cost. You can see the code for both here: https://github.com/BarryBalls/python-skyfield/pull/1/files
Add umbral and penumbral magnitude. This is information commonly found in eclipse catalogs and the variables are already calculated within the function so it might be nice to include the calculated values in the details array.
Use Danjon's (1951) method for calculating the enlargement of the Earth's shadow in preference to Chauvenet (1891). It's actually a slightly simpler calculation and is used in Five Millennium Catalog of Lunar Eclipses: -1999 to +3000 (NASA TP-2009-214173), Meeus and Mucke (1979), Espenak (2006) and Connaissance des Temps. Several sources using Chauvenet's method are Espenak (1989), Liu and Fiala (1992), and Astronomical Almanac. See: https://eclipse.gsfc.nasa.gov/LEcat5/shadow.html
Danjon's method does return very slightly smaller results which could potentially move some eclipses from total to partial, or partial to penumbral, etc, but it does seem to be used more often in the sources that I have found.
Here's a table with the lunar eclipses 2020-2024 from the Five Millennium Catalog on the left, lunar_eclipses (DE440s) with Danjon's method in the middle and lunar_eclipses (DE440s) with Chauvenet's method on the right. It tracks pretty closely considering that they are using different ephemeris: