Adapted rej_eyecontin.m to work on epoched data#29
Conversation
The code works the same, but now initially loops over epochs when searching for bad_ET intervals and when adding the additional windowsize samples (to not cause spill between epochs). Can return a similar seq_bad struct with an additional 'epoch' column, or a third output that contains seq_bad like structures per epoch. Will not reject bad data from epoched data.
|
|
||
| % Update march 2018 (OD) | ||
| % Do not remove data, but introduce new bad_ET events in EEG.event | ||
| fprintf('\nAdding %i bad_ET markers to the EEG.event structure...\nNot removing any data.\n\n',size(seq_bad,1)) |
There was a problem hiding this comment.
seq_bad needs to be changed to seq_bad_overall. Sorry for missing that.
|
fantastic! (I will need a few days to find time to look into this and to merge) |
|
I now noticed that in |
|
Note to self: This interesting pull request fell through the cracks somehow. Sorry about that. Will look into that during the next code revision. |
The code works the same, but now initially loops over epochs when searching for bad_ET intervals and when adding the additional windowsize samples (to not cause spill between epochs). Can return a similar seq_bad struct with an additional 'epoch' column, or a third output that contains seq_bad like structures per epoch. Will not reject bad data from epoched data. An additional small change in rejectionmethod == 2: code checks if bad_ET events already exist in EEG.event (e.g., from running the function previously on the continuous data) and if so, removes them. Also removed line calculating duration, as it is already calculated by findsequence2.m.