mne-bids-pipeline
mne-bids-pipeline copied to clipboard
Error is occuring when a subject has duplicated events
In the make_epochs script of the preprocessing part, the parameter event_repeated is defined by default to 'error'. A solution would be to make this parameter one of the config file.
Hello, thanks for raising this issue! We actually ran into this before when processing some data with @dnacombo I'm not entirely sure what the best approach would be here, honestly. Because what MNE offers to do in this case is:
- error
- keep only the first event
- merge the events
I honestly don't really like either of those options … (i.e. I think it should be perfectly fine for distinct events to occur at the same time)
Which kind of action would you propose?
Could you share one of the *_event.tsv
files in question?
Thanks!
If a 'keep_all' option is on the table, I take it!
If a 'keep_all' option is on the table, I take it!
Yes…
So here's a part of the events.tsv
@apmellot shared with me:
197.029 0.0 button 4 197029
197.029 0.0 catch/0 5 197029
These events cannot be sensibly merged; and only keeping the first one also doesn't make sense.
We need a "keep all" option. But this needs to be solved upstream in MNE…
cc @larsoner, I believe we once briefly talked about this, but I don't remember any details
ping @sappelhoff
I agree that it is perfectly reasonable and fine to have two distinct events co-occurring at the same time. Would be interested in hearing the caveats of enabling this in MNE.
no objection to have keep_all option.
the only risk is to have people average twice the same chunk of data
so I would not do this by default
This comes up a lot and it would probably simplify lots of people's code to allow it. I'm not sure how many places it will break things in MNE but it seems worth implementing. Currently our event_repeated
parameter has several options, I guess we could just have 'duplicate'
or so to make it clear you're going to end up with duplicated data for the repeated events.
Ok I will take a stab at this and then we'll have to try and fix all the breakage one after another