Group: Administrators
Posts: 13K,
Visits: 104K
|
#1: If you want only two distinct values for fixduration, you should simply do:
/ ontrialbegin = [values.fixduration = replace(400, 1600)]
#2: You will want to *reset* the stimulus presentation sequence /ontrialend. Otherwise the insertion of stimuli will be cumulative across trials.
/ ontrialend = [trial.practise_trial.resetstimulusframes(); ]
Beyond that, the timings should work out regardless of whether you do
/ontrialbegin = [values.fixduration = 400 + round(rand(0,1))*1200]
or
/ ontrialbegin = [values.fixduration = replace(400, 1600)]
If you run
<values> / fixduration = 0 </values>
<trial practice_trial> /ontrialbegin = [values.fixduration = 400 + round(rand(0,1))*1200] /ontrialbegin = [trial.practice_trial.insertstimulustime(text.mask, 200+values.fixduration);] /stimulustimes = [1=fixation_cross_text; 200=practice_text] /validresponse = (31, 38) / ontrialend = [trial.practice_trial.resetstimulusframes(); ] </trial>
<text fixation_cross_text> / items = ("+") </text>
<text practice_text> / items = ("fixduration = <%values.fixduration%>") </text>
<text mask> / items = ("MASK_MASK_MASK") </text>
<block myblock> / trials = [1-4 = practice_trial] </block>
<data> / columns = [trialnum values.fixduration text.mask.stimulusonset] / separatefiles = true </data>
vs
<values> / fixduration = 0 </values>
<trial practice_trial> / ontrialbegin = [values.fixduration = replace(400, 1600)] /ontrialbegin = [trial.practice_trial.insertstimulustime(text.mask, 200+values.fixduration);] /stimulustimes = [1=fixation_cross_text; 200=practice_text] /validresponse = (31, 38) / ontrialend = [trial.practice_trial.resetstimulusframes(); ] </trial>
<text fixation_cross_text> / items = ("+") </text>
<text practice_text> / items = ("fixduration = <%values.fixduration%>") </text>
<text mask> / items = ("MASK_MASK_MASK") </text>
<block myblock> / trials = [1-4 = practice_trial] </block>
<data> / columns = [trialnum values.fixduration text.mask.stimulusonset] / separatefiles = true </data>
and look at the text.mask.stimulusonset column, you should see that the timings are what they are supposed to be in both cases:
1 1600 1799 2 1600 1799 3 400 599 4 400 599
|