-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Julian calendar dates for earlier historical calculations #450
Comments
Thanks for opening an issue! I'll see if I can get to this within the next few weeks. |
This prepares the way for support for input of Julian calendar dates. See #450.
Great, let me know if I can help or test anything along the way. |
A simplification I maybe should have seen earlier; was I trying to avoid what’s probably a small hit in speed? For #450.
Now that it only has one use, its logic can live in the class. Another step towards #450.
Another simplification, at the expense of another function call and level of indirection. With all calendar interpretation going through a single internal function, it will be easier to make #450 happen.
@willismonroe — All right, I think I have something working! If you install Skyfield from the repository:
— then you should be able to tell your Timescale object on what Julian date you want it to switch from the Julian calendar to the Gregorian calendar. Constants are provided for two common choices: the adoption by the Church in Rome, and the adoption by the English. Thus:
Could you try it out and see if it works for you? The |
@willismonroe — I will be away from the keyboard next week, and so instead of doing a Skyfield release for this feature and then perhaps being unavailable if there's a problem, I am planning to hold Skyfield at 1.27 until my return. So there's no rush to test this feature within the next couple of days! I'll check again when I'm back at the keyboard at the end of next week, and consider making a release then. |
@brandon-rhodes no worries! I've been quite busy, hoping to test this soon! |
I have just released Skyfield 1.28 which includes this new feature across all calendars support by the timescale object: https://rhodesmill.org/skyfield/time.html#ancient-and-modern-dates Let me know if you run into any problems. Enjoy! |
Hi @brandon-rhodes this works perfectly: I was able to calculate the new moons for 537 BCE matching Parker and Duberstein's calculations from 1942 (off by one day, but that's fine for what I'm doing). By the way, I had to add a
that's probably not the right way to do it, and I can certainly see problems when your date range cross the Gregorian start date... |
If a Julian calendar cutoff was specified, arrays of dates were failing to turn into JDs but raising an exception instead. See #450.
@willismonroe — Thank you for altering me to this bug! I have just pushed a fix, along with a test to try to keep it fixed. Could you try installing the development version of Skyfield to try it out on your machine?
Thanks! |
Can confirm, works as expected. By the way, is there a reason that |
Does |
They do, but the convenience of `Time.utc.month` (year, day etc...) is nice.
…On Fri, Sep 25, 2020 at 11:37 AM Brandon Rhodes ***@***.***> wrote:
Does .tt_calendar() or .tt_strftime() do what you need, or is neither of
them quite what you are looking for?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#450 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFOTSXJETZRBCLSJCHBBDDSHTPOZANCNFSM4RPSGZAA>
.
|
Oh, I see! I hadn't realized that the other If you’ll open an issue, I can see about adding those fields to Skyfield within the next few weeks. Thanks for the idea! |
@willismonroe — Oh, and: I'm a bit worried that those dates are off so consistently by one day, except for maybe one date that instead agrees exactly? I suppose Cyrus was in a time zone several hours earlier than Greenwich, but I still would have expected at least ¾ of the events to line up on the same dates. |
Yeah, well to be honest, I'm really not sure how Parker and Duberstein
calculated their results, so it could just as easily be that they had an
off-by-one error in 1942. It's an interesting problem though and one well
suited to this library. I.e. the new month began when the crescent moon
was first visible after sunset, so theoretically it shouldn't be too hard
to create a method to print out Babylonian dates.
…On Fri, Sep 25, 2020 at 11:54 AM Brandon Rhodes ***@***.***> wrote:
@willismonroe <https://github.com/willismonroe> — Oh, and: I'm a bit
worried that those dates are off so consistently by one day, except for
maybe one date that instead agrees exactly? I suppose Cyrus was in a time
zone several hours earlier than Greenwich, but I still would have expected
at least ¾ of the events to line up on the same dates.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#450 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFOTSQ6Z2OZLFNE2FOQKLTSHTRPRANCNFSM4RPSGZAA>
.
|
@willismonroe — That's true, the orbit parameters would not have been as exact in 1942! And I just thought of something else: dates that long ago are going to be several hours (I think? at least a few dozen minutes?) off of the midnight/noon schedule of our modern atomic clocks, so TT and TAI will be way off from what folks at that time actually experienced as midnight, sunrise, noon, and sunset. It’s UT1 that might provide a guess as to where the day really stood back then. Could you try UT1 and see what your script prints? |
Hmm, I'm unable to iterate over a UT1
I looked into it, and the |
Instead of: `TypeError: 'float' object is not subscriptable`
@willismonroe — You are doing an exemplary job of finding bugs! Wow! I've submitted a patch, can you try a fresh install?
Thanks! |
(As it's Friday night and I will be away from keyboard starting tomorrow, I'll go ahead and cut a release to fix at least these two problems!) |
Just tested out the new release (1.29) and it fixed all of my current
issues.
I'm still seeing a 1-2 day gap with this historical data, but there are
lots of unknowns. For instance visibility above the horizon. I know the
Skyfield altaz() method takes refraction into account, but I don't know how
the authors of the data I'm using as a comparison calculated this. So I'm
not too worried about the discrepancy. I'll keep testing with other
historical data and report any issues I find.
…On Fri, Sep 25, 2020 at 5:55 PM Brandon Rhodes ***@***.***> wrote:
(As it's Friday night and I will be away from keyboard starting tomorrow,
I'll go ahead and cut a release to fix at least these two problems!)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#450 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFOTSTDUJIHIL4FSAG65HLSHU3Y7ANCNFSM4RPSGZAA>
.
|
It would be useful if the Skyfield library had the ability to convert to Julian dates for periods before the Gregorian calendar in order to more closely align with historical calculations of astronomical observations.
(see discussion here: https://stackoverflow.com/questions/63855845/differences-between-pyephem-and-skyfield-for-calculating-ancient-phenomena/63865680?noredirect=1#comment112978745_63865680)
The text was updated successfully, but these errors were encountered: