strym.tools.acd

strym.tools.acd(strymobj=None, window_size=30, plot_iteration=False, every_iteration=200, plot_timespace=True, save_timespace=False, wave_threshold=50.0, animation=False, title='Average Centroid Distance', **kwargs)

Average Centroid Distance Algorithm for calculating stop-and-go wavestrength from

acd implements average centroid distance algorithm to find out the stop-and-go distance traveled based on the given threshold.

Parameters
strymobj : strymread

A valid stymread object

window_size : int

Window size over which to form the cluster of data points on speed-acceleration phasespace

plot_iteration : bool

If True plots the intermediate phase-space plots of speed-acceleration phasespace for the window_size and distribution of centroid distances

every_iteration : int

If plot_iteration is true, then plot the intermediate figures every every_iteration iteration

plot_timespace : bool

If True plots and save timespace diagram of wavestrength for the given drive.

save_timespace : bool

If True save the timespace diagram to the disk

wave_threshold : double

The value of threshold of wavestrength above which classify the driving mode as stop-and-go. It defaults to the value of 50.

animation : bool

If True produces animation of phasespace evolving with the time

title : str

Desire plot title for phasespace animation

image_path : str

Path on the disk where to store phasespace animation

Returns

  • pandas.DataFrame – Returns Pandas Data frame consisting of WaveStrength column as a timeseries

  • double – Returns stop-and-go distance measured based on the wave_threshold in meters