Millisecond Forums

Stimulus during same frames with insertstimulusframes

https://forums.millisecond.com/Topic19542.aspx

By BenS - 8/21/2016

Hi,

I have a problem with insertstimulusframe - I have different SOA, and one SOA (9 frames) requires the target ("picture.righttarget") to be drawn on the exact same frame (70) the cue ends ("rightsquare_out, rightsquare_in" whereby rightsquare_in is the black interior of a white square ("rightsqaure_out"), like so: https://www.millisecond.com/forums/uploads/images/7561eb3c-250f-4f76-a258-873e.png

Unfortunately, insertstimulusframe seems to draw the target before the squares, which leads to the target not appearing at all when currentsoa = 9. Is there any way to specify the order several things are drawn during one frame with insertstimulusframes?

My code is
<trial same_late_right>
/ontrialbegin = [trial.same_late_right.insertstimulusframe(picture.righttarget, (61 + values.currentsoa))]
/stimulusframes = [1 = fixation; 31=centersquare_out, centersquare_in, leftsquare_out, leftsquare_in,
                rightsquare_out, rightsquare_in; 61 = rightsquare_out_bright, rightsquare_in; 70 = rightsquare_out,
                rightsquare_in; 91 = centersquare_out_bright, centersquare_in; 100 = centersquare_out, centersquare_in]
...
</trial>

By Dave - 8/21/2016

> Unfortunately, insertstimulusframe seems to draw the target before the squares, which leads to the target not appearing at all when
> currentsoa = 9.

Actually that is not how insertstimulusframe() is supposed to behave (and it doesn't behave like that for me). The target is (supposed to be) inserted *after* the stimuli that are already present in the frame (the outer and inner squares). Here's a simplified script for testing purposes

<block myblock>
/ trials = [1-4=example]
</block>

<trial example>
/ontrialbegin = [trial.example.insertstimulusframe(text.target, (61 + values.currentsoa))]
/ ontrialend = [trial.example.resetstimulusframes(); ]
/stimulusframes = [1 = fixation; 70 = square_out, square_in; 91 = blank]
/ validresponse = (57)
</trial>

<values>
/ currentsoa = 9
</values>

<text fixation>
/ items = ("+")
</text>

<shape square_out>
/ shape = rectangle
/ color = orangered
/ size = (210px, 210px)
</shape>

<shape square_in>
/ shape = rectangle
/ color = black
/ size = (200px, 200px)
</shape>

<text target>
/ items = ("TARGET")
/ txcolor = yellow
</text>

<shape blank>
/ shape = rectangle
/ color = white
/ size = (100%, 100%)
</shape>

and a screenshot of the result.

https://www.millisecond.com/forums/uploads/images/ed18e5f1-2c43-4967-a385-1f4c.jpg

I'm running this under the most recent Inquisit 4 release. Does the target stimulus show up on your system when running the above example script?
By BenS - 8/26/2016

It does, which makes me very confused :D. I'll take a dive into my code and try to find differences.