Created
September 11, 2012 19:45
-
-
Save moorepants/3701506 to your computer and use it in GitHub Desktop.
Generates a histogram showing the peak steer rates in my the UCD biycle id data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from canonicalbicycleid.canonical_bicycle_id import select_runs | |
import bicycledataprocessor as bdp | |
import matplotlib.pyplot as plt | |
riders = ['Charlie', 'Jason', 'Luke'] | |
maneuvers = ['Balance', | |
'Track Straight Line', | |
'Balance With Disturbance', | |
'Track Straight Line With Disturbance'] | |
environments = ['Horse Treadmill', 'Pavillion Floor'] | |
runNumbers = select_runs(riders, maneuvers, environments) | |
errors = [] | |
maxSteerRates = [] | |
dataset = bdp.DataSet() | |
for i, r in enumerate(runNumbers): | |
try: | |
trial = bdp.Run(r, dataset, filterFreq=15.) | |
maxSteerRates.append(trial.taskSignals['SteerRate'].max()) | |
del trial | |
except bdp.bdpexceptions.TimeShiftError: | |
errors.append(r) | |
except IndexError: | |
errors.append(r) | |
plt.hist(maxSteerRates) | |
plt.xlabel('Max Steer Rate [rad/s]') | |
plt.savefig('peak_steer_rate_hist.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment