neuropose/tests/unit
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
..
test_analyzer_dtw.py linting and formatting 2026-04-14 13:50:11 -04:00
test_analyzer_features.py add Procrustes alignment to analyzer 2026-04-18 17:11:53 -04:00
test_analyzer_segment.py add gait-cycle segmentation to analyzer 2026-04-18 17:50:21 -04:00
test_benchmark.py pin tf to ensure compatability with tensorflow-metal 2026-04-16 15:26:55 -04:00
test_cli.py add Provenance subobject and LoadedModel 2026-04-18 17:10:52 -04:00
test_config.py linting and formatting 2026-04-14 13:50:11 -04:00
test_estimator.py add Provenance subobject and LoadedModel 2026-04-18 17:10:52 -04:00
test_ingest.py tooling 2026-04-15 11:41:27 -04:00
test_interfacer.py tooling 2026-04-15 11:41:27 -04:00
test_io.py add Provenance subobject and LoadedModel 2026-04-18 17:10:52 -04:00
test_migrations.py apply ruff format to recent commits 2026-04-18 17:49:44 -04:00
test_monitor.py tooling 2026-04-15 11:41:27 -04:00
test_reset.py apply ruff format to recent commits 2026-04-18 17:49:44 -04:00
test_visualize.py linting and formatting 2026-04-14 13:50:11 -04:00