ENH: compress EGI MFF multi-epoch timeline and use 0-duration BAD_ACQ_SKIP - #14155
Open
PragnyaKhandelwal wants to merge 3 commits into
Open
ENH: compress EGI MFF multi-epoch timeline and use 0-duration BAD_ACQ_SKIP#14155PragnyaKhandelwal wants to merge 3 commits into
PragnyaKhandelwal wants to merge 3 commits into
Conversation
…ation BAD_ACQ_SKIP Recording epochs are now placed consecutively (no zero-padding across gaps). BAD_ACQ_SKIP annotations carry duration=0 at each epoch transition boundary, matching the pattern used by other MNE readers for acquisition discontinuities.
PragnyaKhandelwal
marked this pull request as ready for review
August 13, 2026 19:56
PragnyaKhandelwal
requested review from
agramfort,
drammock and
larsoner
as code owners
August 13, 2026 19:56
20 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference issue (if any)
Part of #13926 (Phase 1 — EGI MFF multi-epoch / paused recording handling).
What does this implement/fix?
Previously,
read_raw_egirepresented multi-epoch (paused) MFF recordings by placing recording epochs in a gapped timeline: the time between epochs was zero-padded, andBAD_ACQ_SKIPannotations had a non-zero duration covering the gap.This PR changes the representation to match the pattern used by other MNE readers (e.g. EyeLink): recording epochs are placed side-by-side (compressed timeline, no zero-padding), and
BAD_ACQ_SKIPannotations haveduration=0at each epoch boundary.Concretely:
disk_sampsis nownp.arange(total_actual_samples)— sequential, no gap entries.egi_time_to_disklookup maps EGI-timeline positions to compressed positions; gap positions map to -1.egi_eventsarray has gap columns stripped before use, so the STI channel stays aligned.BAD_ACQ_SKIPonset isdisk_offsets[ei+1] / sfreq;duration=0.0.events_as_annotationsmode, events in gaps or out of range are silently dropped (consistent with what the STI-channel path already did).Test expected values for event sample positions and skip-timing constants are updated to reflect the compressed timeline. All 25 EGI tests pass.
Additional information