Commit Graph

3 Commits

Author SHA1 Message Date
Levi Neuwirth cc9fcb4adb add Procrustes alignment to analyzer
procrustes_align in neuropose.analyzer.features — Kabsch closed-form
rigid alignment between two pose sequences, with per_frame and
per_sequence modes and an optional scale flag for cross-subject
comparisons. Returns aligned arrays plus an AlignmentDiagnostics
dataclass reporting rotation magnitude (mean and max), translation
magnitude (mean and max), and scale factor, so downstream code can
flag suspiciously large transforms.

Wired into every DTW entry point via a new keyword-only align
parameter — "none" (the default) preserves the 0.1 raw-coordinate
behaviour, while "procrustes_per_frame" and "procrustes_per_sequence"
route inputs through procrustes_align before DTW runs. Rejects
mismatched frame counts when alignment is requested (Procrustes
requires a 1:1 correspondence).

Phase 0 of TECHNICAL.md: closes one of the three methodological
gaps Paper C's pipeline is waiting on.
2026-04-18 17:11:53 -04:00
Levi Neuwirth c4c9bffff8 linting and formatting 2026-04-14 13:50:11 -04:00
Levi Neuwirth 62d0b0789c pin tensorflow, comprehensiveness 2026-04-14 09:39:12 -04:00