skdh.gait.substeps.ApCwtGaitEvents#
- class skdh.gait.substeps.ApCwtGaitEvents(ic_prom_factor=0.6, ic_dist_factor=0.5, fc_prom_factor=0.6, fc_dist_factor=0.6)#
Predict gait events from a lumbar sensor based on AP acceleration and using a Continuous Wavelet Transform to smooth the raw signal.
- Parameters:
- ic_prom_factorfloat, optional
Factor multiplied by the standard deviation of the CWT coefficients to obtain a minimum prominence for IC peak detection. Default is 0.6.
- ic_dist_factorfloat, optional
Factor multiplying the mean step samples to obtain a minimum distance (in # of samples) between IC peaks. Default is 0.5.
- fc_prom_factorfloat, optional
Factor multiplying the standard deviation of the CWT coefficients to obtain a minimum prominence for FC peak detection. Default is 0.6
- fc_dist_factorfloat, optional
Factor multiplying the mean step samples to obtain a minimum distance (in # of samples) between FC peaks. Default is 0.6.
Methods
convert_timestamps(t)Convert a timestamp/array of timestamps to a datetime object
predict(time, accel, ap_axis, ap_axis_sign, ...)save_results(results, file_name)Save the results of the processing pipeline to a csv file
- predict(time, accel, ap_axis, ap_axis_sign, mean_step_freq, *, fs=None)#
- Parameters:
- time
- accel
- accel_filt
- ap_axis
- ap_axis_sign
- mean_step_freq
- fs
- kwargs
- Returns:
- resultsdict
Dictionary of the results, with the following items that can be used as inputs to downstream processing steps:
initial_contacts: detected initial contact events (heel-strikes).
final_contacts: detected final contact events (toe-offs).