skdh.gait.substeps.CreateStridesAndQc#

class skdh.gait.substeps.CreateStridesAndQc(max_stride_time='default', loading_factor='default')#

Create strides from initial and final contacts. Perform a set of QC rules on the strides to eliminate strides that are not physiologically possible.

Parameters:
max_stride_time{“default”, callable, float}, optional

The maximum stride time possible for a single stride. Either a callable with the input of the mean step time, or a float, which will be used as a static limit. Default (“default”) is the function \(2.0 * mean\_step\_time + 1.0\).

loading_factor{“default”, callable, float}, optional

A factor that is multiplied by the max_stride_time to obtain values indicating the maximum initial double support and maximum stances times for strides to be deemed physiologically possible, and not discarded. Either a callable with the input of mean step time, or a float (between 0.0 and 1.0) indicating a static factor. Default (“default”) is the function \(0.17 * mean\_step\_time + 0.05\).

Methods

convert_timestamps(t)

Convert a timestamp/array of timestamps to a datetime object

predict(time, accel, initial_contacts, ...)

save_results(results, file_name)

Save the results of the processing pipeline to a csv file

predict(time, accel, initial_contacts, final_contacts, mean_step_freq)#
Parameters:
time
initial_contacts
final_contacts
mean_step_freq
Returns:
resultsdict

Dictionary of the results, with the following items that can be used as inputs to downstream processing steps:

  • qc_initial_contacts: QC’ed initial contacts

  • qc_final_contacts: QC’ed final contacts, corresponding to qc_initial_contacts

  • qc_final_contacts_oppfoot: QC’ed final contacts of the opposite foot, corresponding to those in qc_initial_contacts

  • forward_cycles: Number of complete forward cycles that are available, corresponding to qc_initial_contacts.