Hi Dave,
I have a question regarding how to optimally match stimulus presentation time based on former presentation time.
In the task, a target stimulus is presented (screen 1). Next, participants see two stimuli (screen 2). One is the former target. Participants have to decide on which side the target was. After pressing a button, the stimuli disappear. Afterwards a new stimulus should be presented for as long as the participant saw either the target or the distractor in sum (screen 3). This means, the stimulus on the third screen (neutral) should be presented either the time screen 1 and screen 2 where presented OR the time only screen 2 was presented
My problem now is that I am not sure how to get the proper time. As the time the stimuli are displayed depends on the monitor refresh rate, which property takes this into account?
The latency measures the time from stimulus onset to response (or timeout if no response), but does not take into account, that after a response within a frame the picture can still be presented for a couple of milliseconds to finish the frame.
The timeout seems to take also other processes into account (trial preparation etc.). And the timeout also seems not to take into account that a frame is not finished when timeout occurs.
Do I have to specify the numframes to be exact? But than I would have to calculate the number of frames based on each monitor (if there are differences). Or do I have to add a blank filler stimulus to get the stimulusonset for that and use this?
Code example:
<trial present>
/ ontrialbegin = [values.target=list.target.nextvalue; values.distractor=list.distractor.nextvalue; values.neutral=list.neutral.nextvalue]
/ ontrialbegin = [values.target_hpos=50%]
/ stimulustimes = [0= target, present_text]
/ timeout = 1000
/ beginresponsetime = 0
</trial>
<trial comp_T>
/ ontrialbegin = [values.target_hpos=list.2pos.nextvalue;
values.distractor_hpos=list.2pos.nextvalue; ]
/ inputdevice = keyboard
/ validresponse = (30, 38)
/ responsemode = free
/ stimulustimes = [0= target, distractor]
/ beginresponsetime = 0
/ iscorrectresponse = [values.target_hpos >50% && trial.comp_T.response == 38]
/ iscorrectresponse = [values.target_hpos <50% && trial.comp_T.response == 30]
/ ontrialend = [if ((values.target_hpos <50% && trial.comp_T.response == 38)||(values.target_hpos >50% && trial.comp_T.response == 30)) {values.incorrect = TRUE}]
/ ontrialend = [values.duration = trial.comp_T.latency + trial.present.timeout]
</trial>
<trial comp_D>
/ ontrialbegin = [values.target_hpos=list.2pos.nextvalue;
values.distractor_hpos=list.2pos.nextvalue; ]
/ inputdevice = keyboard
/ validresponse = (30, 38)
/ responsemode = free
/ stimulustimes = [0= target, distractor]
/ responsetime = 0
/ iscorrectresponse = [values.target_hpos >50% && trial.comp_D.response == 38]
/ iscorrectresponse = [values.target_hpos <50% && trial.comp_D.response == 30]
/ ontrialend = [if ((values.target_hpos <50% && trial.comp_D.response == 38)||(values.target_hpos >50% && trial.comp_D.response == 30)) {values.incorrect = TRUE}]
/ ontrialend = [values.duration = trial.comp_D.latency]
</trial>
<trial neutral>
/ ontrialbegin = [if( values.cond == "target_comp" || values.cond == "choice_comp_T") {values.duration = trial.comp_t.latency + trial.present.latency}]
/ ontrialbegin = [if( values.cond == "distractor_comp" || values.cond == "choice_comp_D") {values.duration = trial.comp_d.latency}]
/ ontrialbegin = [values.neutral_hpos=50%]
/ stimulustimes = [0= neutral, clearing]
/ timeout = values.duration
</trial>
Thanks!