You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When exporting an epochs object via eeglabio, all events when loaded into MATLAB are marked as dummy events, or fails to pass checkset.
Steps to reproduce
# This requires my data file of courseepochs=mne.read_epochs('working_mne.fif')
epochs.export('problematic_eeglab.set', overwrite=True)
# Then load via pop_loadset in latest matlab/eeglab
Do you have any hypotheses about where things are going wrong? I wonder if it has something to do with these warnings which are generated when I export the file you shared, particularly the last warning message...
/Users/scotterik/devel/repos/eeglabio/eeglabio/epochs.py:125 EEGLABIO: WARNING: Invalid event latencies, ignored for export.
/Users/scotterik/devel/repos/eeglabio/eeglabio/epochs.py:162 EEGLABIO: WARNING: Events doesn't meet the requirement of at least one event per epoch, adding dummy events
I have not had a chance to check -- @scott-huberty do you have time to look into the potential fix here? If not I can get to it but maybe not until after holidays
@Andesha given you have the time, if you are able to 1) identify the cause of the bug (likely a line in the eeglabio codebase), just let us know so that we know what to fix, or 2) you can open a PR with a fix and we can iterate from there!
If not, I can also take a closer look but I also am unlikely to get to it until after the holidays.
that sample works just fine @drammock . No warnings and it looks okay in MATLAB. I wonder if this is something to do with rejected/bad events and then the event counts being off?
First, I hit a MemoryError when trying to export the full file. The process tried to allocate over 2GB of RAM at once and crashed. I could only get it to finish by exporting a smaller subset of epochs, so it looks like we might need some better data chunking for files this large.
Second, I noticed a mismatch in the indexing. In this dataset, we have 3388 epochs, but the maximum index in epochs.selection is 3511—likely because some trials were dropped earlier. This seems to be what's tripping up eeglabio. Since the mapping finds indices that 'don't exist' in the current object, it discards the latencies and falls back to those dummy events.
Activity
welcome commentedon Dec 8, 2025
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴
scott-huberty commentedon Dec 8, 2025
Hey @Andesha !
Do you have any hypotheses about where things are going wrong? I wonder if it has something to do with these warnings which are generated when I export the file you shared, particularly the last warning message...
Andesha commentedon Dec 8, 2025
I did poke around in that part of the code but it didn't illuminate anything for me.
These files are the result of merged files at one point but I don't think that should change anything,
Andesha commentedon Dec 18, 2025
any news or any support I can give on this?
larsoner commentedon Dec 19, 2025
I have not had a chance to check -- @scott-huberty do you have time to look into the potential fix here? If not I can get to it but maybe not until after holidays
scott-huberty commentedon Dec 22, 2025
@Andesha given you have the time, if you are able to 1) identify the cause of the bug (likely a line in the eeglabio codebase), just let us know so that we know what to fix, or 2) you can open a PR with a fix and we can iterate from there!
If not, I can also take a closer look but I also am unlikely to get to it until after the holidays.
Andesha commentedon Jan 6, 2026
I believe the problem is the check here:
https://github.com/jackz314/eeglabio/blob/main/eeglabio/epochs.py#L159
drammock commentedon Jan 7, 2026
@Andesha is there something unusual about your file, or does it still fail with this? (sorry, no MATLAB so I can't test myself)
Andesha commentedon Jan 7, 2026
that sample works just fine @drammock . No warnings and it looks okay in MATLAB. I wonder if this is something to do with rejected/bad events and then the event counts being off?
PragnyaKhandelwal commentedon Mar 25, 2026
I’ve been digging into this locally with the dataset provided to see if I could reproduce the issue.
https://drive.google.com/file/d/1U3HptLod9yCUd7YebKnGSaWK8RqfUmkh/view?usp=sharing
I found two things that might be causing the trouble:
First, I hit a
MemoryErrorwhen trying to export the full file. The process tried to allocate over 2GB of RAM at once and crashed. I could only get it to finish by exporting a smaller subset of epochs, so it looks like we might need some better data chunking for files this large.Second, I noticed a mismatch in the indexing. In this dataset, we have 3388 epochs, but the maximum index in
epochs.selectionis 3511—likely because some trials were dropped earlier. This seems to be what's tripping upeeglabio. Since the mapping finds indices that 'don't exist' in the current object, it discards the latencies and falls back to those dummy events.