timeseries.SpaceCurve.reverse

SpaceCurve.reverse()[source]

Reverse the time parametrization of the SpaceCurve.

Examples

>>> tn = np.arange(0, 5*1e9, 1e9)
>>> s = SpaceCurve(tn=tn, px=10.0*tn/1e9) # drive straight at 10m/s
>>> s.data
            time  pos_x  pos_y  pos_z  quality
0            0.0    0.0    0.0    0.0       -1
1000000000   1.0   10.0    0.0    0.0       -1
2000000000   2.0   20.0    0.0    0.0       -1
3000000000   3.0   30.0    0.0    0.0       -1
4000000000   4.0   40.0    0.0    0.0       -1
>>> a = s.reverse()
>>> a.data
            time  pos_x  pos_y  pos_z  quality
0            0.0   40.0    0.0    0.0       -1
1000000000   1.0   30.0    0.0    0.0       -1
2000000000   2.0   20.0    0.0    0.0       -1
3000000000   3.0   10.0    0.0    0.0       -1
4000000000   4.0    0.0    0.0    0.0       -1