-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: read_epochs for split files has incorrect events #5102
Comments
can you share a code snippet to replicate usings sample data? you can make
random events if it's just for testing.
|
` data_path = op.join(mne.datasets.sample.data_path(), 'MEG', 'sample') events = mne.make_fixed_length_events(raw,1) epochs2 = mne.read_epochs('test-epo.fif',preload=False) |
I don't think @larsoner is good enough to fix this :)
|
I see what you did there :) Yes I can try hopefully next week |
@emilyps14 can you see if #5103 fixes it for you? |
Yep, that fixes it. Thanks! |
I have a large epochs file, that gets split into two files when I call epochs.save()
When I load it again using mne.read_epochs(), the events corresponding to the second file are incorrect, offset by [last epoch from the first file + tmax + 10s].
The bug comes from _concatenate_epochs.
This breaks the relationship between the raw file and the events list, which (aside from causing downstream problems with my code) can lead to an error in epochs.get_data if the data were loaded with preload=False.
The text was updated successfully, but these errors were encountered: