I wanted to share a significant progress update regarding Project 3: Refactoring EGIMFF to use mffpy. Over the last few days, I have been auditing the scott/mffpy branch (#12981) to identify why the test suite was stalled at 18 failures.
Current Status: 15 passed / 8 failed (Improved from 5 passed initially).
Key Fixes:
- Broadcasting & ValueError Fixes: I identified that
_get_eeg_datawas allocating buffers for all channels but only populating EEG chunks. I refactored the indexing logic to be “chunk-aware,” which resolved the primaryValueErrorcrashes. - Digitization Accuracy (137 → 132 points): By auditing the
.xmlfiles, I found that cardinal fiducials were being misclassified. I refactored_get_montageto pull fromcoordinates.xml, correctly identifying “Nasion,” “LPA,” and “RPA”. - Numerical Stability: I resolved the 1-sample drift and “float interval” errors by switching to integer-based sample counts derived from actual chunk dimensions.
- Metadata & Datetime: I implemented a sanitizer for mffpy’s 9-decimal timestamps and restored the
utc_offsetlogic, allowing allmeas_datetests to pass.
I am now focusing on the remaining 8 failures:
Refactoring for Lazy Loading: Currently, the reader always preloads, which fails architectural expectation tests.
PNS Support: Re-integrating physiological channels into the info structure.
Question for Mentors: Given that I have locally resolved the primary blockers from the previous WIP branch, should I proceed with opening a superseding PR to main now, or would you prefer I continue the cleanup on my fork first?
