In [1]:
import itertools
import sys

import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

sys.path.append('..')
from antlia import record
from antlia import exp1
from antlia import plot_braking as braking

%load_ext autoreload
%autoreload 2

DEFAULT_FIGSIZE = (14, 7)

In [2]:
records = exp1.load_records()


/Users/oliver/miniconda3/envs/dev/lib/python3.5/site-packages/numpy/lib/npyio.py:2046: ConversionWarning: Some errors were detected !
    Line #2 (got 10 columns instead of 9)
  output = genfromtxt(fname, **kwargs)
/Users/oliver/miniconda3/envs/dev/lib/python3.5/site-packages/numpy/lib/npyio.py:2046: UserWarning: genfromtxt: Empty input file: "../antlia/../../data/etrike/experiment/rider2/convbike/2016-08-24_16-28-50.csv"
  output = genfromtxt(fname, **kwargs)

In [3]:
metrics = exp1.get_metrics(records)
print(metrics.dtype.names)


('linregress slope', 'linregress intercept', 'linregress r-value', 'linregress p-value', 'linregress stderr', 'starting velocity', 'braking duration', 'braking distance', 'window size', 'braking range', 'lockup ranges', 'rider id', 'trial id')

In [4]:
plt.close('all')
for rid in np.unique(metrics['rider id']):
    braking.plot_rider_velocities(records, rid,
                                  figsize=DEFAULT_FIGSIZE)
plt.show()