#!/usr/bin/env python # coding: utf-8 # # Introduction # A look at unloaded and loaded belt speeds. # # Imports # In[1]: import sys sys.path.append('../src') # In[2]: import matplotlib.pyplot as plt from gaitanalysis import motek # In[3]: import utils # In[4]: get_ipython().run_line_magic('matplotlib', 'inline') # In[5]: from IPython.core.pylabtools import figsize # # Load and Process Data # Load the path to the directory with the experimental data. # In[6]: PATHS = utils.config_paths() PATHS # In[7]: tables = utils.generate_meta_data_tables(PATHS['raw_data_dir']) # Make a list of all the compensation trials. # In[8]: trial_meta_df = tables['TOP|trial'] # In[9]: trial_meta_df[trial_meta_df['subject-id'] == 0] # In[10]: same_speed_trials = trial_meta_df[(trial_meta_df['subject-id'] == 0) & (trial_meta_df['nominal-speed'] == 1.2)]['id'].values # In[11]: for trial_id in same_speed_trials: file_paths = utils.trial_file_paths(PATHS['raw_data_dir'], '{0:0>3}'.format(int(trial_id))) dat = motek.DFlowData(*file_paths) try: record = dat._load_record_data() except IOError: print('{} skipped'.format(trial_id)) else: plt.plot(record['RightBeltSpeed']) plt.xlim((50000, 51000)) plt.ylim((0.8, 1.6)) # # Footer # In[12]: get_ipython().system('git rev-parse HEAD') # In[13]: get_ipython().system('git --git-dir=/home/moorepants/src/GaitAnalysisToolKit/.git --work-tree=/home/moorepants/src/GaitAnalysisToolKit rev-parse HEAD') # In[14]: get_ipython().run_line_magic('install_ext', 'http://raw.github.com/jrjohansson/version_information/master/version_information.py') # In[15]: get_ipython().run_line_magic('load_ext', 'version_information') # In[16]: get_ipython().run_line_magic('version_information', 'numpy, scipy, pandas, matplotlib, tables, oct2py, dtk, gaitanalysis') # In[17]: get_ipython().system('conda list') # In[18]: get_ipython().system('pip freeze')