Commit Graph

2 Commits

Author SHA1 Message Date
Levi Neuwirth a1c495b2fd add gait-cycle segmentation to analyzer
segment_gait_cycles wraps segment_predictions with a joint_axis
extractor and gait-appropriate defaults (joint="rhee", axis="y",
min_cycle_seconds=0.4). The joint name resolves through
joint_index; axis is a "x"/"y"/"z" string literal converted to the
numeric index internally. An invert flag flips peaks and valleys
for recording conventions where a heel-strike appears as a local
minimum.

segment_gait_cycles_bilateral composes the single-side function
twice and returns a {"left_heel_strikes", "right_heel_strikes"}
dict shape-compatible with VideoPredictions.segmentations, so the
caller can merge it directly into a predictions object.

Pathological gaits (shuffling, walker-assisted) degrade to an
empty segments list rather than raising, inherited from
segment_by_peaks' peak-not-found behaviour.

Closes the gait-cycle segmentation item in TECHNICAL.md Phase 0.
2026-04-18 17:50:21 -04:00
Levi Neuwirth d29f4f1b78 benchmarking and profiling scaffold 2026-04-14 20:32:29 -04:00