﻿<?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  » Mask image in a dot probe task</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Fri, 22 May 2026 23:51:57 GMT</lastBuildDate><ttl>20</ttl><item><title>Mask image in a dot probe task</title><link>https://forums.millisecond.com/Topic19282.aspx</link><description>Hey there,&lt;br/&gt;&lt;br/&gt;I´m currently working on a dot-probe-task. Therefore I customized the "alcohol dot probe task" (Miller et al. 2010) from the test library.&lt;br/&gt;In the next step, I want to add a mask image between the fixation cross and the target. &lt;br/&gt;Until now, every trial goes as follows: fixation cross (500 ms) --&amp;gt; target and distractor (231ms)&amp;nbsp;&amp;nbsp;--&amp;gt; probe (1000ms) --&amp;gt; next trial.&lt;br/&gt;&lt;br/&gt;I´ve already created the mask image with photoshop and added its duration value in the "values" part of the script:&lt;br/&gt;&amp;nbsp;&lt;br/&gt;&amp;lt;item mask_image&amp;gt;&lt;br/&gt;/1 = "mask.jpg"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mask&amp;gt;&lt;br/&gt;/items = mask_image&lt;br/&gt;/position = (50%, 50%)&lt;br/&gt;/size = (values.imageheight, values.imageheight)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;maskduration = 66&lt;br/&gt;[other values...]&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;By now, I want to add the mask image in every trail just after the fixation cross without destroying my dataset:&amp;nbsp;fixation cross (500 ms) --&amp;gt; &lt;strong&gt;mask (66ms)&lt;/strong&gt; --&amp;gt; &amp;nbsp;target and distractor (231ms)&amp;nbsp;&amp;nbsp;--&amp;gt; probe (1000ms) --&amp;gt; next trial&lt;br/&gt;&lt;br/&gt;The practice trials look as follows:&lt;br/&gt;&amp;lt;trial Practice&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.category = "Practice"]&lt;br/&gt;/ ontrialbegin = [values.target_position = list.PracticeTarget_positions.nextvalue]&lt;br/&gt;/ ontrialbegin = [values.congruence = list.PracticeTargetprobe_congruence.nextvalue]&lt;br/&gt;&lt;br/&gt;/ ontrialbegin = [if (values.target_position == 1) {values.target_x = values.target_left_x; values.comp_x = values.target_right_x}&lt;br/&gt;else {values.target_x = values.target_right_x; values.comp_x = values.target_left_x}]&lt;br/&gt;/ ontrialbegin = [if (values.congruence == 1) {values.probe_x = values.target_x} else {values.probe_x = values.comp_x}]&lt;br/&gt;&lt;br/&gt;/ ontrialbegin = [trial.Practice.insertstimulustime(shape.eraser, values.fixationduration)]&lt;br/&gt;/ ontrialbegin = [trial.Practice.insertstimulustime(picture.PracticeTarget, values.fixationduration)]&lt;br/&gt;/ ontrialbegin = [trial.Practice.insertstimulustime(picture.PracticeComp, values.fixationduration)]&lt;br/&gt;/ ontrialbegin = [trial.Practice.insertstimulustime(shape.eraser, (values.fixationduration + values.targetduration))]&lt;br/&gt;/ ontrialbegin = [trial.Practice.insertstimulustime(text.probe, (values.fixationduration + values.targetduration + values.TP_ISI))]&lt;br/&gt;/ ontrialend = [trial.Practice.resetstimulusframes()]&lt;br/&gt;/ stimulusframes = [1 = fixation]&lt;br/&gt;/ beginresponsetime = values.fixationduration + values.targetduration + values.TP_ISI&lt;br/&gt;/ responseinterrupt = immediate&lt;br/&gt;/ isvalidresponse = [trial.Practice.response == values.responsekey_left || trial.Practice.response == values.responsekey_right]&lt;br/&gt;/ iscorrectresponse = [(values.probe_x == values.target_left_x &amp;amp;&amp;amp; trial.Practice.response == values.responsekey_left) || &lt;br/&gt;(values.probe_x == values.target_right_x &amp;amp;&amp;amp; trial.Practice.response == values.responsekey_right)]&lt;br/&gt;/ monkeyresponse = (18, 23)&lt;br/&gt;/ ontrialend = [values.target_image = picture.PracticeTarget.currentitem; values.comp_image = picture.PracticeComp.currentitem]&lt;br/&gt;&lt;br/&gt;/ timeout = (values.fixationduration + values.targetduration + values.TP_ISI+ values.probeduration)&lt;br/&gt;/ posttrialpause = values.iti&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;My question: How do I implement the mask image? I tried /stimulusframes = &amp;nbsp;[1= fixation, 500=mask] with different versions of the /ontrialbegin command, but nothing worked ... Either the mask image appears on top of the other stimuli or my dataset gets mixed up.&lt;br/&gt;&lt;br/&gt;Thank you!&lt;br/&gt;Benne</description><pubDate>Wed, 22 Jun 2016 02:04:23 GMT</pubDate><dc:creator>Benne</dc:creator></item><item><title>RE: Mask image in a dot probe task</title><link>https://forums.millisecond.com/Topic19297.aspx</link><description>Works fine now! Thanks a lot!</description><pubDate>Wed, 22 Jun 2016 02:04:23 GMT</pubDate><dc:creator>Benne</dc:creator></item><item><title>RE: Mask image in a dot probe task</title><link>https://forums.millisecond.com/Topic19286.aspx</link><description>&amp;gt; /stimulusframes = &amp;nbsp;[1= fixation, 500=mask]&lt;br/&gt;&lt;br/&gt;Using /stimulus&lt;strong&gt;frames&lt;/strong&gt; does not make sense. The above would display the "mask" stimulus in the 500th display refresh cycle, not at 500ms. Suppose your display runs at 100Hz, i.e. a 10ms refresh cycle: Then the above would display the mask at ~5000ms into the trial (500 * 10ms). If your display runs at a lower refresh rate (e.g. 60Hz), the mask would be displayed even later.&lt;br/&gt;&lt;br/&gt;You should use /stimulus&lt;strong&gt;times&lt;/strong&gt; instead:&lt;br/&gt;&lt;br/&gt;/stimulustimes = &amp;nbsp;[0= fixation, 500=mask]&lt;br/&gt;&lt;br/&gt;You can alternatively insert the mask at the desired point in time using the insertstimulustime() function in an /ontrialbegin attribute, just as is done with various other stimuli in the &amp;lt;trial&amp;gt;.&lt;br/&gt;&lt;br/&gt;&amp;lt;trial Practice&amp;gt;&lt;br/&gt;...&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(shape.eraser, values.fixationduration)]&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(picture.PracticeTarget, values.fixationduration)]&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(picture.PracticeComp, values.fixationduration)]&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(shape.eraser, (values.fixationduration + values.targetduration))]&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(text.probe, (values.fixationduration + values.targetduration + values.TP_ISI))]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;You will have to adjust those attributes accordingly to get the timings you want. In particular, note that a stimulus erasing the fixation cross (shape.eraser) and the target &amp;amp; comp pictures are all inserted at the same time. Those would *immediately* overwrite your mask. So, you'll want to push those out by the duration of the mask (66ms).&lt;br/&gt;&lt;br/&gt;&amp;lt;trial Practice&amp;gt;&lt;br/&gt;...&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(picture.mask, values.fixationduration)]&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(shape.eraser, (values.fixationduration + values.maskduration))]&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(picture.PracticeTarget, (values.fixationduration + values.maskduration))]&lt;br/&gt;/ ontrialbegin = [trial.Practice.&lt;strong&gt;insertstimulustime&lt;/strong&gt;(picture.PracticeComp, (values.fixationduration+ values.maskduration))]&lt;br/&gt;etc.&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;</description><pubDate>Tue, 21 Jun 2016 07:57:30 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>