Stimuli


Author
Message
newbie
newbie
Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)
Group: Forum Members
Posts: 5, Visits: 24
I'm currently programming a version of the go/no-go task in which participants need to make a double-response in one condition recording 2 responses.
As such the trial has been programmed this way: 

<trial practicedoubleleft>
/ ontrialbegin = [values.cue_side=1]
/ pretrialpause = 0
/ posttrialpause = 0
/ validresponse = (46, 50, 57, noresponse)
/ correctresponse = (46, 57)
/ stimulustimes = [0=fix_green; 1000=practiceHS]
/ beginresponsetime = 1000
/ timeout = 2500
/ ontrialend = [values.double_time = 2500 - trial.practicedoubleleft.latency]
/ branch = [trial.p_double_l]
</trial>

<trial p_double_l>
/ ontrialbegin = [trial.p_double_l.insertstimulustime(clearscreen, values.double_time)]
/ validresponse = (57)
/ iscorrectresponse = [trial.p_double_l.response=="57" && trial.practicedoubleleft.response=="46"]
/ stimulustimes = [0=fix_green, practiceHS]
/ timeout = values.double_time
/ pretrialpause = 0
/ posttrialpause = 0
</trial>

The issue is that in the second 'trial', the practice HS stim changes whereas I need the stimuli to remain the same in both of these trials.
I have tried /erase = false in the picture element but this hasn't worked.

Thanks in advance 
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
newbie - Monday, May 13, 2019
I'm currently programming a version of the go/no-go task in which participants need to make a double-response in one condition recording 2 responses.
As such the trial has been programmed this way: 

<trial practicedoubleleft>
/ ontrialbegin = [values.cue_side=1]
/ pretrialpause = 0
/ posttrialpause = 0
/ validresponse = (46, 50, 57, noresponse)
/ correctresponse = (46, 57)
/ stimulustimes = [0=fix_green; 1000=practiceHS]
/ beginresponsetime = 1000
/ timeout = 2500
/ ontrialend = [values.double_time = 2500 - trial.practicedoubleleft.latency]
/ branch = [trial.p_double_l]
</trial>

<trial p_double_l>
/ ontrialbegin = [trial.p_double_l.insertstimulustime(clearscreen, values.double_time)]
/ validresponse = (57)
/ iscorrectresponse = [trial.p_double_l.response=="57" && trial.practicedoubleleft.response=="46"]
/ stimulustimes = [0=fix_green, practiceHS]
/ timeout = values.double_time
/ pretrialpause = 0
/ posttrialpause = 0
</trial>

The issue is that in the second 'trial', the practice HS stim changes whereas I need the stimuli to remain the same in both of these trials.
I have tried /erase = false in the picture element but this hasn't worked.

Thanks in advance 

What you need to do is use <values> and a <list> to select the HS stim item, and then you need to only do that at the start of the 1st trial, not the 2nd one. In short:

<values>
/ itemnumber = 1
</values>

<block exampleblock>
/ trials = [1-4 = first]
</block>

<trial first>
/ ontrialbegin = [
values.itemnumber = list.itemnumbers.nextindex;
]
/ stimulustimes = [0=fixation; 1000=examplestimulus]
/ timeout = 2500
/ validresponse = (46, 50, 57, noresponse)
/ correctresponse = (46, 57)
/ branch = [
trial.second
]
</trial>

<trial second>
/ stimulustimes = [0=fixation; 1000=examplestimulus]
/ timeout = 2500
/ validresponse = (57)
</trial>

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

<text examplestimulus>
/ items = exampleitems
/ select = values.itemnumber
</text>

<item exampleitems>
/ 1 = "Example A"
/ 1 = "Example B"
/ 1 = "Example C"
/ 1 = "Example D"
</item>

// 4 items in this example
<list itemnumbers>
/ poolsize = 4
</list>

newbie
newbie
Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)Respected Member (403 reputation)
Group: Forum Members
Posts: 5, Visits: 24
Dave - Monday, May 13, 2019
newbie - Monday, May 13, 2019
I'm currently programming a version of the go/no-go task in which participants need to make a double-response in one condition recording 2 responses.
As such the trial has been programmed this way: 

<trial practicedoubleleft>
/ ontrialbegin = [values.cue_side=1]
/ pretrialpause = 0
/ posttrialpause = 0
/ validresponse = (46, 50, 57, noresponse)
/ correctresponse = (46, 57)
/ stimulustimes = [0=fix_green; 1000=practiceHS]
/ beginresponsetime = 1000
/ timeout = 2500
/ ontrialend = [values.double_time = 2500 - trial.practicedoubleleft.latency]
/ branch = [trial.p_double_l]
</trial>

<trial p_double_l>
/ ontrialbegin = [trial.p_double_l.insertstimulustime(clearscreen, values.double_time)]
/ validresponse = (57)
/ iscorrectresponse = [trial.p_double_l.response=="57" && trial.practicedoubleleft.response=="46"]
/ stimulustimes = [0=fix_green, practiceHS]
/ timeout = values.double_time
/ pretrialpause = 0
/ posttrialpause = 0
</trial>

The issue is that in the second 'trial', the practice HS stim changes whereas I need the stimuli to remain the same in both of these trials.
I have tried /erase = false in the picture element but this hasn't worked.

Thanks in advance 

What you need to do is use <values> and a <list> to select the HS stim item, and then you need to only do that at the start of the 1st trial, not the 2nd one. In short:

<values>
/ itemnumber = 1
</values>

<block exampleblock>
/ trials = [1-4 = first]
</block>

<trial first>
/ ontrialbegin = [
values.itemnumber = list.itemnumbers.nextindex;
]
/ stimulustimes = [0=fixation; 1000=examplestimulus]
/ timeout = 2500
/ validresponse = (46, 50, 57, noresponse)
/ correctresponse = (46, 57)
/ branch = [
trial.second
]
</trial>

<trial second>
/ stimulustimes = [0=fixation; 1000=examplestimulus]
/ timeout = 2500
/ validresponse = (57)
</trial>

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

<text examplestimulus>
/ items = exampleitems
/ select = values.itemnumber
</text>

<item exampleitems>
/ 1 = "Example A"
/ 1 = "Example B"
/ 1 = "Example C"
/ 1 = "Example D"
</item>

// 4 items in this example
<list itemnumbers>
/ poolsize = 4
</list>

That's fantastic - thanks very much.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search