Skip to content

Conversation

@mprib
Copy link
Owner

@mprib mprib commented Jan 10, 2026

Summary

  • Fixes TRC export failing with ValueError: cannot convert float NaN to integer when gap-filled xyz data has sync_indices not present in frame_time_history.csv
  • Carries frame_time through the triangulation pipeline instead of relying on external file lookup
  • Adds integration test validating gap-fill accuracy with detailed disparity logging

Changes

  • point_data.py: Add frame_time to WorldPointSchema (nullable), carry through triangulate(), interpolate in fill_gaps()
  • export.py: Remove time_history_path param from xyz_to_trc(), use frame_time from xyz DataFrame
  • post_processor.py: Update xyz_to_trc() call
  • test_export.py: Add test_gap_fill_pipeline_accuracy() with disparity logging
  • test_xy_to_xyz.py: Fix shape comparison to use common columns

Test plan

  • All 100 tests pass
  • TRC export confirmed working with gap-filled data
  • Integration test shows mean interpolation error ~3mm for body landmarks

Fixes #877

frame_time was discarded during triangulation, causing TRC export to
fail with NaN errors when gap-filled xyz data had sync_indices not
present in frame_time_history.csv.

Changes:
- Add frame_time to WorldPointSchema (nullable for legacy paths)
- Carry frame_time through triangulate() by computing mean per sync_index
- Interpolate frame_time in WorldPoints.fill_gaps()
- Update xyz_to_trc() to use frame_time from xyz data directly
- Add integration test with gap-fill disparity logging

Fixes #877
@mprib mprib linked an issue Jan 10, 2026 that may be closed by this pull request
@mprib mprib merged commit 4fb8cbf into main Jan 10, 2026
9 checks passed
@mprib mprib deleted the 877-trc-export-fails-with-nan-frame-indices branch January 10, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TRC export fails with NaN frame indices

2 participants