You probably still have the old copy of weeutil/Moon.py. You need this one
<https://raw.githubusercontent.com/weewx/weewx/master/bin/weeutil/Moon.py>.
Or, you accidentally put it in the weewx directory, instead of the weeutil
directory.

-tk

On Wed, Feb 27, 2019 at 1:31 PM <[email protected]> wrote:

> Understood. In the meantime, I did try copying your new version of
> almanac.py into the bin/weewx directory on my testbed weewx (I copied
> moon.py into the bin/weeutil directory also, though I don't think that
> matters). I got the attached errors complaining about moon_phase_ts. Did I
> miss a file updated in an earlier commit?
>
> Phil
>
> On Wednesday, February 27, 2019 at 4:01:29 PM UTC-5, Thomas Keffer wrote:
>>
>> The problem with skyfield is that it is dependent on numpy, a very large
>> package. I'm reluctant to introduce a new dependency, especially such a
>> large one, just to do almanac calculations.
>>
>> And, as awkward as the pyephem API is, skyfield's is even worse. It
>> requires loading multi-megabyte ephemeris tables before starting. This will
>> complicate the install.
>>
>> Haven't decided yet.
>>
>> -tk
>>
>> On Wed, Feb 27, 2019 at 12:41 PM <[email protected]> wrote:
>>
>>> 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]> 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].
>>>>> 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.
>>>
>> --
> 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.
>

-- 
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.

Reply via email to