skdh.gait.substeps.TurnDetection#

class skdh.gait.substeps.TurnDetection#

Get the location of turns, to indicate if steps occur during a turn.

Methods

convert_timestamps(t)

Convert a timestamp/array of timestamps to a datetime object

predict(time, accel, gyro, ...[, fs])

save_results(results, file_name)

Save the results of the processing pipeline to a csv file

Notes

Values indicate turns as follows:

  • -1: Turns not detected (lacking angular velocity data)

  • 0: No turn found

  • 1: Turn overlaps with either Initial or Final contact

  • 2: Turn overlaps with both Initial and Final contact

References

[1]

M. H. Pham et al., “Algorithm for Turning Detection and Analysis Validated under Home-Like Conditions in Patients with Parkinson’s Disease and Older Adults using a 6 Degree-of-Freedom Inertial Measurement Unit at the Lower Back,” Front. Neurol., vol. 8, Apr. 2017, doi: 10.3389/fneur.2017.00135.

predict(time, accel, gyro, qc_initial_contacts, qc_final_contacts, *, fs=None)#
Parameters:
time
accel
gyro
qc_initial_contacts
qc_final_contacts
fs
Returns:
resultsdict

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

  • turns: array indicting if a turn is occuring.

  • step_in_turn: array for each QC’ed initial contact indicating which or if both IC/FC events overlap with a turn.