with open('gait.pickle', 'rb') as fh_input: gait = pickle.load(fh_input)The data are stored in a Python
dictionary
,
and contain the keys ['time', 'knee_angle',
'heel_strike', 'info']
. They contain the knee
angle of the right knee, of a healthy male subject who
walked for 35 sec on a treadmill.
info
string.
A "gait-cycle" is the time from one heel-strike to the next heel-strike. Since some steps are a little bit shorter, and some a little bit longer, the duration of the steps varies. To determine mean and variability for a "typical" step, all the steps have to be brought onto the same length. This can be achieved with "interpolation" of the knee-angles for each gait-cycle. When all the steps have been brought to the same length, the mean and standard devation can be determined easily.
For more information, please read the Chapter on "Statistics" of my book Hands-on Signal Analysis with Python
np.mean()
and np.std()
can be used
to simple calculate mean and standard deviation, for each
column (i.e. for each point in time).