【发布时间】:2019-06-02 13:59:14
【问题描述】:
我正在努力将 EEG 触发器添加到 PsychoPy 中的此脚本中,因为我是编码新手,所以我是通过 PsychoPy 中的构建器模式编写的。该实验是一系列句子词干和视觉词尾的录音——录音和词是通过电子表格调用的。我们对参与者在查看词尾时的反应感兴趣。
下面是我当前没有 EEG 触发器的脚本,下面是来自其他人的脚本,该脚本与他们用来插入 EEG 触发器的系统相同。我希望从“句子”刺激结束时开始记录,包括在“目标”和“响应”期间的时间,并在他们做出响应后结束。
非常感谢您的帮助!
这是我已有的脚本:
------Prepare to start Routine “trial1”-------
t = 0
trial1Clock.reset() # clock
frameN = -1
continueRoutine = True
**# update component parameters for each repeat**
target.setColor([1.000,1.000,1.000], colorSpace='rgb')
target.setText(word)
response = event.BuilderKeyResponse()
Sentences.setSound(sounds, secs=6)
**# keep track of which components have finished**
trial1Components = [target, response, Sentences, text_2]
for thisComponent in trial1Components:
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
这里是插入 EEG 触发器的代码,我正在尝试集成:
# Send event marker to NetStation
if mode=='eeg' and stage=='expt':
code = 'item'
ns.sync()
ns.send_event(code, label='item', timestamp=egi.ms_localtime(), table = { 'item' : curr_item })
【问题讨论】: