timeseries.SpaceCurve

class timeseries.SpaceCurve(tn, px=None, py=None, pz=None, quality=None, trackid=-1, platform=None, activity=None, mollified=False)[source]

SpaceCurve is a Python class for studying curves in \(\mathbb{R}^2\) or \(\mathbb{R}^3\). For example, a SpaceCurve could represent kinematic flight data, or trajectories of vehicles given by GPS coordinates.

All arguments other than tn are optional.

Parameters:
tn : list-like

Integer timestamps, typically in ‘numpy.int64` nanoseconds-since-epoch

px : list-like
py : list-like
pz : list-like

Positions in numpy.float64 meters

quality : list-like

Quality/accuracy of a particular location

trackid : int

An integer label for the track

platform : str

A descriptive label

activity : str

A descriptive label

mollified: bool

Whether this track has undegone mollification, for example with clean_copy()

Attributes:
data : pandas.DataFrame

The original position and velocity data, as originally provided. The index of this DataFrame is the tn integer time index.

info : pandas.DataFrame

Data computed using various algorithms. This is filled by compute(), but more can be added.

SpaceCurve.accel(rate) Change time parametrization, to represent a constant tangential acceleration (or deceleration).
SpaceCurve.arclength_param() Change time parametrization to the universal speed=1 arclength parametrization.
SpaceCurve.auto_bin([num_bins, underflow, …]) Count bins on the transformed persistence diagrams of -Speed/7 (so it is expected to be between 0 and 100) -Climb/3 (so it is expected to be between 0 and 100) -Curvature*10000 (so it is expected to be between 0 and 100) -Torsion*10000 (so it is expected to be between 0 and 100) -Bank*100/(pi/4) (==grade, between 0 and 100)
SpaceCurve.clean_copy([cleanup_func]) Make copy in which a cleanup function performed on the data.
SpaceCurve.compute() Compute some nice invariants and store them to self.info.
SpaceCurve.copy() make an identical copy of self.
SpaceCurve.duration() return string of duraction of SpaceCurve, converting integer nanoseconds to string seconds.
SpaceCurve.featurize([sort_and_grab_num]) A convenience function to compute everything we think might be important.
SpaceCurve.lift_and_mass() Produce the terms of the force-balance equations, to help derive coefficient-of-lift and mass from pure trajectory information.
SpaceCurve.lift_profile([num_bins, …]) histogram of the lift_and_mass by lift.
SpaceCurve.load(filename) Simple CSV reader.
SpaceCurve.mass_profile([num_bins, …]) histogram of the lift_and_mass by mass.
SpaceCurve.plot(canvas[, title, color]) Plot the SpaceCurve in 3D.
SpaceCurve.reparam(rate) Change time parametrization, to represent a constant change of speed.
SpaceCurve.reverse() Reverse the time parametrization of the SpaceCurve.
SpaceCurve.signature_curve() Olver/Boutin signature curve.
SpaceCurve.slide([window, time_step, …]) Produce equal-time SpaceCurves using a sliding-window on self.
SpaceCurve.snip([time_step, time_start, …]) Cut this SpaceCurve into equal-time snippets.