# Evaluating the tangent vector of a previously saved and loaded integrated geodesic

I am trying to figure out how to load a previously computed and saved integrated geodesic and find the tangent vector using geod.tangent_vector_eval_at at a later time. The problem is that i can not seem to find a way to refer a solution_key= to the solution after i've loaded it in order to interpolate it. Is there a way to do that at a time different than the one that the solution is being computed? Thanks in advance.

edit retag close merge delete

Sort by » oldest newest most voted

Hello Bubbz, thank you for your question. It seems indeed that the contents of the attributes _solutions and _interpolations of geod are lost in the process save/load, although all the other attributes are well preserved (e.g. _initial_tangent_vector or _parameters).

In the case of the attribute _interpolations, this seems to be expected because pickling does not work on Spline objects: calling e.g. save(geod._interpolations, "geod_interps.sobj") yields the error message TypeError: cannot pickle 'sage.calculus.interpolation.Spline' object.

In the case of the attribute _solutions, the reason why it is lost is probably tricky, as this is easily worked around with the idea above: you could save and reload the attribute _solutions independently from geod itself, by executing e.g. save(geod._solutions, "geod_sols.sobj"), so that you could execute geod._solutions = load("geod_sols.sobj") after having reloaded geod itself at any later time.

more