Closed LuEdRaMo closed 1 year ago
I don't quite recall, but it was perhaps JLD.addrequire
which motivated @PerezHz to take JLD over JLD2... Any comments @PerezHz?
Regarding this, a very naive question: if you start a brand new Julia session, and only load TaylorSeries and PlanetaryEphemeris (i.e., using TaylorSeries, PlanetaryEphemeris
), do you have to set the parameters of the file (with set_variables
) before loading the file, or it is somehow included in the file (by JLD.addrequire
)?
Since PlanetaryEphemeris
uses Taylor1
, it is not necessary to set the variables before loading the file. However in a library like NEOs, which uses jet transport and Taylor1{TaylorN}
, it is mandatory to set the variables before loading the file; that information is not included in the file.
Thanks for the correction... The question is how to include that info within the jld2 (or jld) file to have everything consistent? A proposal that would fit with JLD.addrequire
is to add a new struct which includes all those constants, and somehow, by instantiating it, all parameters are properly set.
I don't quite recall, but it was perhaps JLD.addrequire which motivated @PerezHz to take JLD over JLD2... Any comments @PerezHz?
The main reason to use JLD
was to guarantee lossless saving and loading of data (and thus aid reproducibility); but I agree that JLD2 is more performant, so if data loss is small, then maybe it makes sense to use JLD2 instead of JLD
PlanetaryEphemeris
usesJLD
to save the ephemeris. However, two tests that show thatJLD2
could be a considerable improvement with respect toJLD
. For instance:Size of full ephemeris file
Time it takes to load the full ephemeris file
A disadvantage of
JLD2
is that it has no analog ofJLD.addrequire
. However, if bothTaylorSeries
andPlanetaryEphemeris
are loaded, I've found there is no lost information.