+xDear Inquisit forum,
I have a quick query regarding stimulus positions. I understand that providing multiple sets of
/columns = [stimulusnumber, stimulusitem, stimulusvpos, stimulushpos, stimulusonset, etc...]
gives you multiples of these columns per number of stimuli within the script, however for my current study I require the difference in both h and v positions of two stimuli (e.g., values.h_difference = stimulushpos1 - stimulushpos2) - however, obviously this does not work, presumably because stimlushpos1/2 are not predefined. Is there a way to calculate the difference between these two on a trial-by-trial basis?
Many thanks,
Josh
You would have to access the respective stimulus elements' hposition and vposition properties, calculate their difference, store the result in a value, and log that value to the data file. In a nutshell
<text a>
/ items = ("A")
/ hposition = list.a_x.nextvalue
</text>
<text b>
/ items = ("B")
/ hposition = list.b_x.nextvalue
</text>
<values>
/ h_diff = 0
</values>
<list a_x>
/ items = (5%, 10%, 15%, 20%, 25%)
/ replace = true
</list>
<list b_x>
/ items = (75%, 80%, 85%, 90%, 95%)
/ replace = true
</list>
<trial mytrial>
/ ontrialend = [values.h_diff = text.a.hposition - text.b.hposition]
/ stimulusframes = [1=a,b]
/ validresponse = (57)
</trial>
<block myblock>
/ trials = [1-10 = mytrial]
</block>
<data>
/ columns = [date time subject group blocknum blockcode trialnum trialcode
stimulusitem stimulusitem stimulushpos stimulushpos values.h_diff
response latency correct]
/ separatefiles = true
</data>
(same approach for the difference in vertical position)