SciQLop / speasy

Space Physics made EASY! A simple Python package to deal with main Space Physics WebServices (CDA,SSC,AMDA,..)
Other
24 stars 7 forks source link

Cache "loses" astropy.units of stored orbit-trajectories #7

Closed pboettch closed 3 years ago

pboettch commented 3 years ago

Description

Orbits acquired with get_orbit() have data-values annotated with astropy-units, but only when the orbit is loaded from the web-services. It seems that when orbits are fetched from the (local) diskcache the unit-annotation has been lost.

jeandet commented 3 years ago

Breaks on CI :/

pboettch commented 3 years ago

FYI, in OrbitViewer I worked around the loss of units this way:

unit = km
if type(sv.values) is Quantity:
    unit = 1
# [..]
sv.values * unit