Millisecond Forums

GNGT: Problems with the script (intertrial interval)

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

By c.witteki - 2/5/2018

Hi,

we adapted a script and programmed a GNGT. We defined a testblock, the pictorial stimuli and the trials (see elements of the scripts below). Originally, we wanted the stimuli to be presented for 250ms, thus, blankscreen was set to 250ms. However, in a new study, the stimuli should be presented for a max. of 1000ms (or until a response is made for no targets) and then an intertrial interval of 1000ms should follow.
However, if blankscreen (written in bold) is set to 1000, the stimuli are presented longer, but if the spacebar is pressed, the next pictures appears on the screen immediately. What do I have to do in order to insert an ITI of 1s after the correct response was executed?

Thanks a lot in advance for your help!
Best,
Charlotte


<trial notarget>
/ ontrialbegin = [if(values.expcondition == 1) {values.stimulus=list.nt1_stimuli.nextvalue;values.trialcount += 1; values.count_nogo += 1; values.targettype = 2}
else if(values.expcondition == 2) {values.stimulus=list.nt2_stimuli.nextvalue;values.trialcount += 1; values.count_nogo += 1; values.targettype = 2}]
/ stimulustimes = [0=blankscreen; 1=stimuli; 250=blankscreen; 1150=blankscreen]
/ validresponse = (57, noresponse)
/ correctresponse = (57)
/ beginresponsetime = 1
/ posttrialpause = 500
/ response = timeout(1000)
/ ontrialend = [if (trial.notarget.correct) values.correctcount += 1]
/ ontrialend = [if (trial.notarget.correct) {values.correct_go += 1; values.sumrt += trial.notarget.latency}]
/ ontrialend = [if (trial.notarget.error) values.omissionerrors += 1]
/ recorddata = true
</trial>

<block testblock>
/ trials = [1=start; 2-321=noreplace(notarget, notarget, notarget, notarget, notarget, notarget, target,target)]
/ preinstructions = (Experiment)
/ onblockbegin = [values.targettype = 0; values.correctresp = 0; values.trialcount = 0; values.correctcount = 0; values.count_go = 0; values.correct_go = 0; values.count_nogo = 0; values.correct_nogo = 0; values.commissionerror = 0; values.sumrt = 0; values.omissionerrors = 0]
/ recorddata = true
</block>

<picture stimuli >
/ items = stimuli
/ select = values.stimulus
/ position = (50%,50%)
/ size = (30%,30%)
/erase = false
</picture>

By Dave - 2/5/2018

c.witteki - Monday, February 5, 2018
Hi,

we adapted a script and programmed a GNGT. We defined a testblock, the pictorial stimuli and the trials (see elements of the scripts below). Originally, we wanted the stimuli to be presented for 250ms, thus, blankscreen was set to 250ms. However, in a new study, the stimuli should be presented for a max. of 1000ms (or until a response is made for no targets) and then an intertrial interval of 1000ms should follow.
However, if blankscreen (written in bold) is set to 1000, the stimuli are presented longer, but if the spacebar is pressed, the next pictures appears on the screen immediately. What do I have to do in order to insert an ITI of 1s after the correct response was executed?

Thanks a lot in advance for your help!
Best,
Charlotte


<trial notarget>
/ ontrialbegin = [if(values.expcondition == 1) {values.stimulus=list.nt1_stimuli.nextvalue;values.trialcount += 1; values.count_nogo += 1; values.targettype = 2}
else if(values.expcondition == 2) {values.stimulus=list.nt2_stimuli.nextvalue;values.trialcount += 1; values.count_nogo += 1; values.targettype = 2}]
/ stimulustimes = [0=blankscreen; 1=stimuli; 250=blankscreen; 1150=blankscreen]
/ validresponse = (57, noresponse)
/ correctresponse = (57)
/ beginresponsetime = 1
/ posttrialpause = 500
/ response = timeout(1000)
/ ontrialend = [if (trial.notarget.correct) values.correctcount += 1]
/ ontrialend = [if (trial.notarget.correct) {values.correct_go += 1; values.sumrt += trial.notarget.latency}]
/ ontrialend = [if (trial.notarget.error) values.omissionerrors += 1]
/ recorddata = true
</trial>

<block testblock>
/ trials = [1=start; 2-321=noreplace(notarget, notarget, notarget, notarget, notarget, notarget, target,target)]
/ preinstructions = (Experiment)
/ onblockbegin = [values.targettype = 0; values.correctresp = 0; values.trialcount = 0; values.correctcount = 0; values.count_go = 0; values.correct_go = 0; values.count_nogo = 0; values.correct_nogo = 0; values.commissionerror = 0; values.sumrt = 0; values.omissionerrors = 0]
/ recorddata = true
</block>

<picture stimuli >
/ items = stimuli
/ select = values.stimulus
/ position = (50%,50%)
/ size = (30%,30%)
/erase = false
</picture>


Your <picture> element is set to /erase=false, i.e. it will remain on-screen unless it is overwritten by a blank or other stimulus later in the trial. This doesn't happen if a response occurs prior to the blankscreen stimulus --  the image will remain visible during the 500ms posttrialpause you defined.

<picture stimuli >
/ items = stimuli
/ select = values.stimulus
/ position = (50%,50%)
/ size = (30%,30%)
/erase = false
</picture>

Either remove the /erase attribute from the <picture> (which will lead to it being automatically erased in case of a response) or make use of an additional /responsemessage attribute in the <trial> that overwrites the picture with the blankscreen stimulus in case of anyresponse.

Finally, for an ITI of 1000ms, you'll want the /posttrialpause set to 1000 (not 500).

Hope this helps.
By c.witteki - 2/5/2018

Hi Dave,

I think that worked! Thanks for your help.

Best
Charlotte