﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » Data recording - stimulus position</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 23 Sep 2026 07:19:38 GMT</lastBuildDate><ttl>20</ttl><item><title>Data recording - stimulus position</title><link>https://forums.millisecond.com/Topic22274.aspx</link><description>Dear Inquisit forum,&lt;br/&gt;&lt;br/&gt;I have a quick query regarding stimulus positions. I understand that providing multiple sets of&amp;nbsp;&lt;br/&gt;&lt;br/&gt;/columns = [stimulusnumber, stimulusitem, stimulusvpos, stimulushpos, stimulusonset, etc...]&lt;br/&gt;&lt;br/&gt;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?&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh</description><pubDate>Tue, 15 Aug 2017 10:12:25 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Data recording - stimulus position</title><link>https://forums.millisecond.com/Topic22276.aspx</link><description>&lt;div data-id="22274" class="if-quote-wrapper" unselectable="on" data-guid="1502816589610"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22274" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22274" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22274" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Psych_Josh - Tuesday, August 15, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22274"&gt;&lt;div class="if-quote-message-margin"&gt;Dear Inquisit forum,&lt;br/&gt;&lt;br/&gt;I have a quick query regarding stimulus positions. I understand that providing multiple sets of&amp;nbsp;&lt;br/&gt;&lt;br/&gt;/columns = [stimulusnumber, stimulusitem, stimulusvpos, stimulushpos, stimulusonset, etc...]&lt;br/&gt;&lt;br/&gt;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?&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh&lt;a class="if-quote-goto quote-link" href="#" data-id="22274"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;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&lt;br/&gt;&lt;br/&gt;&amp;lt;text a&amp;gt;&lt;br/&gt;/ items = ("A")&lt;br/&gt;/ hposition = list.a_x.nextvalue&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text b&amp;gt;&lt;br/&gt;/ items = ("B")&lt;br/&gt;/ hposition = list.b_x.nextvalue&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ h_diff = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list a_x&amp;gt;&lt;br/&gt;/ items = (5%, 10%, 15%, 20%, 25%)&lt;br/&gt;/ replace = true&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list b_x&amp;gt;&lt;br/&gt;/ items = (75%, 80%, 85%, 90%, 95%)&lt;br/&gt;/ replace = true&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialend = [values.h_diff = text.a.hposition - text.b.hposition]&lt;br/&gt;/ stimulusframes = [1=a,b]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-10 = mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = [date time subject group blocknum blockcode trialnum trialcode &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stimulusitem stimulusitem stimulushpos stimulushpos values.h_diff&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; response latency correct]&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;(same approach for the difference in vertical position)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 15 Aug 2017 10:12:25 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>