Tom, My understanding is that pyephem is now deprecated (though it will continue to be available and receive critical bug fixes). See https://rhodesmill.org/pyephem/. The original developer has a replacement package called skyfield (https://rhodesmill.org/skyfield/. He says it is only missing Kelperian orbital elements for comets and asteroids currently and that he is working to add that. Since you are working on a Python3 compliant version of WeeWX, is that an opportunity to have WeeWX use skyfield instead of pyephem?
phil On Wednesday, February 27, 2019 at 2:08:39 PM UTC-5, Thomas Keffer wrote: > > I looked into this and found a couple of small issues, which I've > corrected in commit c696e4 > <https://github.com/weewx/weewx/commit/c696e468efce806214cd560e1014cb50d382c68c> > . > > Be aware that the function you are using does the calculation in local > time. This has now been changed, and the almanac now uses UTC. > > Finally, it uses a very simple algorithm, which assumes a constant synodic > month of 29.530588 days. In practice, it can vary by 1% or more over the > years. So, all results will necessarily be approximate. > > -tk > > On Wed, Feb 27, 2019 at 6:26 AM HoracioDos <[email protected] > <javascript:>> wrote: > >> Hello. >> I have pyephem installed and Weewx shows "Last quarter" for today Feb 27, >> 2019 but it was yestarday (Feb 26, 2019). I guess it should be "Waning >> Crescent" for today. When does moon phases change? >> if i run: >> python -c "import weeutil.Moon;print weeutil.Moon.moon_phase(2019,2,27)" >> I get this >> (6, 38) >> Thanks in advance! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "weewx-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
