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

Bug when plotting State with non canonical units #110

Juanlu001 opened this Issue Jan 24, 2016 · 1 comment


1 participant

Juanlu001 commented Jan 24, 2016

Steps to reproduce:

r, v = ephem.planet_ephem(ephem.EARTH, epoch)
earth_as_is = State.from_vectors(Sun, r, v, epoch)
earth_canonical = State.from_vectors(Sun,, / u.s), epoch)
op = OrbitPlotter()
#op.plot(earth_as_is)  # Very bad!

I still have to figure out what's going on.

@Juanlu001 Juanlu001 added the bug label Jan 24, 2016

@Juanlu001 Juanlu001 added this to the 0.5 milestone Jan 24, 2016


This comment has been minimized.


Juanlu001 commented Jan 24, 2016

The failure is in the pqw() method:

>>> earth_as_is.pqw()
(<Quantity [ -2.09121696e+09,  6.57522207e+09,  2.84936733e+09] s2 / d2>,
 <Quantity [ -7.16606162e+09, -1.91854837e+09, -8.32082237e+08]>,
 <Quantity [ -8.03299173e-05, -3.97641214e-01,  9.17540984e-01]>)
>>> earth_canonical.pqw()
(<Quantity [-0.28013773, 0.88081143, 0.38169894]>,
 <Quantity [-0.95995981,-0.25700719,-0.11146506]>,
 <Quantity [ -8.03299173e-05, -3.97641214e-01,  9.17540984e-01]>)

I am almost sure the problem is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment