文章转载自公众号:流浪心球
作者:念靖晴
为了保证EEG研究中采集到的脑电数据的质量。因此在整个实验任务进行中,研究者往往会设置休息阶段,休息阶段的时长设置一般有以下几种形式:被试自主决定
强制休息一定时长和被试自主决定
研究者决定
% Transform "boundary" to "-99"EEG = pop_creabasiceventlist( EEG , 'AlphanumericCleaning', 'on', 'BoundaryNumeric', { -99 }, 'BoundaryString',{ 'boundary' } );% Remove segments of EEG during the break periods in between trial blocks (defined as 2 seconds or longer in between successive stimulus event codes)EEG = pop_erplabDeleteTimeSegments( EEG , 'displayEEG', 0, 'endEventcodeBufferMS', 2000, 'ignoreUseEventcodes', [111 112 121 122 211 212 221 222], 'ignoreUseType', 'Use', 'startEventcodeBufferMS', 2000, 'timeThresholdMS', 2000 );
代码解读:
由于代码仅适用于数值,但由于脑电采集设备的第一个Marker或Evencodes为 boundary ,为导致后面的代码没法正常运行,因此需要将boundary 转化为一个相应的数值,如:-99。即代码:
EEG = pop_creabasiceventlist( EEG , 'AlphanumericCleaning', 'on', 'BoundaryNumeric', { -99 }, 'BoundaryString',{ 'boundary' } );
在进行对应转换后,执行如下的代码:
EEG = pop_erplabDeleteTimeSegments( EEG , 'displayEEG', 0, 'endEventcodeBufferMS', 2000, 'ignoreUseEventcodes', [111 112 121 122 211 212 221 222], 'ignoreUseType', 'Use', 'startEventcodeBufferMS', 2000, 'timeThresholdMS', 2000 );
在此代码中,有以下几个内容需要进行修改:
第一处需要修改的地方为Maker 或 Evencodes,代码中的示例为:[111 112 121 122 211 212 221 222],你需要将你研究中使用的所有的Maker 或 Evencodes都需要填入,包含事件Marker 和反应Marker。
第二处需要修改的地方为:Maker 或 Evencodes 开始前和结束后的时长,这个需要根据你自己单个试次的时长来自行确定。示例中的时长为 2s ( 2000 ms)。
温馨提示:运行此代码,需要提前在Matlab 中加载EEGlab 和 ERPlab。
实际使用示例:
代码使用前:

EEG = pop_creabasiceventlist( EEG , 'AlphanumericCleaning', 'on', 'BoundaryNumeric', { -99 }, 'BoundaryString',{ 'boundary' } ); %Remove segments of EEG during the break periods in between trial blocks (defined as 2 seconds or longer in between successive stimulus event codes) EEG = pop_erplabDeleteTimeSegments( EEG , 'displayEEG', 0, 'endEventcodeBufferMS', 3000, 'ignoreUseEventcodes',[11 21 22 31 41 43 51 53 61 63 71 73 77 88 99], 'ignoreUseType', 'Use', 'startEventcodeBufferMS', 3000, 'timeThresholdMS', 3000);
使用代码后:



干货 | 脑电-超扫描数据分析
帕金森病患者脑电时空微状态分析
如何使用Cartool工具包分析EEG源成像?
Nature neuroscience:提高EEG/MEG研究可重复性
因为微信更改了推送规则,如果不想错过我们的精彩内容,请点『在看』以及星标⭐我们呦!
