-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Computing sunrise/sunset to results in ValueError #240
Comments
(Skyfield 1.9 btw) |
Thanks for letting me know! The fix will come out in the next version. |
(Meanwhile, feel free to try checking out the repo or downloading and pip installing the GitHub .zip if you want to go ahead and enjoy the fix locally!) |
That didn't seem to do it for the code I posted above. Now I get the following backtrace:
|
That looks like an internal numpy error, since numpy is calling its own routines over and over without Skyfield code being mentioned again in the traceback? I'm able to run your code without any problem; adding:
to the end gives:
I'm using numpy 1.11.3. What version are you using? |
I'm using numpy 1.16.1. Will downgrade and check. I assumed it was skyfield related because it broke on the same line (within skyfield) as the previous report, but you're right, I should have started by ruling out there being a bug in numpy. Sorry about that. Ankur |
Sorry, I can't reproduce this anymore. Even re-installing numpy 1.16.1 appears to work now. I must have had something incorrect in my setup affecting things. I'm curious what was incorrect, so I'll keep looking into that, but I think this issue is safe to close out. Thanks for all your help! Ankur |
It's always frustrating when errors disappear mysteriously, but I'm glad things are working for you again! |
This may be user error, but the following code:
results in this:
(The sun actually set in Atlanta between
current_time
andten_minutes_out
UTC.)I'm not an astronomer, but I did try to trace through it a bit. It appears to break in
_correct_for_light_travel_time
. As far as I can tell,target
andobserver
are reasonable-looking things (Segment 'de421.bsp' 0 SOLAR SYSTEM BARYCENTER -> 10 SUN
and<Barycentric position and velocity at date t center=0 target=<object object at 0x1081e57c0>>
), but for some reason,tposition
andcposition
end up being empty arrays ([]
) and sodistance
and things downstream end up being empty arrays too.At that point, I figured it would be more meaningful to report here. Will try to keep debugging.
Minimally, it seems like
length_of
infunctions.py
should verify that the vector passed in is non-empty or something, but there's probably more going on here that I'm not fully understanding.I modeled usage off of the documentation here: https://rhodesmill.org/skyfield/almanac.html#sunrise-and-sunset
but it's possible I missed a step. I noticed other places in the documentation added
planets['earth']
to the value returned by api.Topos, but couldn't figure out which was more correct.Thanks!
Ankur
The text was updated successfully, but these errors were encountered: