Hopefully a simple question here.
I asked @Becca, but thought I would post it here.
A student programmed an EEG task using code from the forum. In the builder component, start time for stimulus was 200 ms.
In the code component (frame tab) we have this so we get a trigger sent:
# send trigger to port, converting to bytes
# acceptable trigger values are 1-255 (integer values)
if FourthB.status == STARTED and not stimulus_pulse_started:
# win.callOnFlip(port.write, str.encode(trig))
win.callOnFlip(port.write, BlockFourTrig.to_bytes(1,'little'))
stimulus_pulse_start_time = globalClock.getTime()
stimulus_pulse_started = True
# set port back to zero after 15 ms
if stimulus_pulse_started and not stimulus_pulse_ended:
if globalClock.getTime() - stimulus_pulse_start_time >= 0.015:
win.callOnFlip(port.write, b'\x00')
stimulus_pulse_ended = True
Now my question is this:
Is stimulus.status == STARTED relative to routine onset or when the stimulus is set to appear (200 ms in this case)?