Hi all,
We are having a bit of trouble with sending triggers to the EEG recorder. We are using psychopy 1.83.4
On each trial we show 5 images, the first 2 are pre-masks and the last 2 are post-masks which are followed by the participant response
We want to send the trigger during the presentation of the 3rd image (which is the target) and also during the response. The problem is that were are missing a lot of triggers for the target image.
Please find the script attached. Could you please take a look? Below I put some notes to localise the relevant bits of code, Any comments would be much appreciated.
Note that regarding the trigger for the target image onset, we use this function in line 421
def sendCode(code,dur):
parallel.setData(code)
core.wait(dur)
parallel.setData(0)
in combination with: win.callOnFlip(sendCode, int(temp_correctAns),0.001) # in line 431
Later in line 671 we send the triggers for the response
if response.keys == "1":
trigger_code = 3
elif response.keys == "2":
trigger_code = 4
parallel.setData( int(trigger_code))
win.logOnFlip(level=logging.EXP,msg="rep trigger {}".format(int(trigger_code)))
core.wait(0.01)
parallel.setData(int(0))
Many thanks
DavidExpEEG_pilot.py (38.7 KB)