using previous response latencies as presentation times


Author
Message
plush
plush
Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)
Group: Forum Members
Posts: 57, Visits: 96
Works great! Thx for the quick replies!
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: 13K, Visits: 104K
You can absolutely store several latencies and use them later on. You can use a <list> for that:

<expt >
/blocks = [1=one;2=two]
</expt>

<block one>
/trials = [1-5=one_trials]
</block>

<block two>
/trials = [1-5=two_trials]
</block>

<trial one_trials>
/stimulustimes = [1=press]
/validresponse = (" ")
/ ontrialend = [list.latencylist.appenditem(trial.one_trials.latency)]
</trial>

<list latencylist>
/ selectionmode = sequence
</list>


<trial two_trials>
/stimulustimes = [1=fixationcross]
/ timeout = list.latencylist.nextvalue
</trial>

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

<text press>
/items = (" press the spacebar ")
</text>


plush
plush
Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)
Group: Forum Members
Posts: 57, Visits: 96
Thx for the response as always! I was hoping for something along the following lines to work: 

<values>
/ one_trialslatency=0
</values>

<expt >
/blocks = [1=one;2=two]
</expt>

<block one>
/trials = [1-5=one_trials]
</block>

<block two>
/trials = [1-5=two_trials]
</block>

<trial one_trials>
/stimulustimes = [1=press]
/validresponse = (" ")
/ ontrialend = [values.one_trialslatency=trial.one_trials.latency]
</trial>

<trial two_trials>
/stimulustimes = [1=fixationcross]
/ timeout = values.one_trialslatency
</trial>

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

<text press>
/items = (" press the spacebar ")
</text>

The big question is whether I can save somehow 5 latencies, as timeouts for 5 trials in the second block. As it is currently designed it only uses the latency of the last trial.

Thx!
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: 13K, Visits: 104K
Yes, you can do that. You need to store the latency / latencies (or mean latency?) from the 1st block somewhere. You can then set the stimulus duration in the 2nd block via the <trial> element's setstimulustime() function. Simple example:

<expt>
/ blocks = [1=block1; 2=block2]
</expt>

<values>
/ alatency= 0
</values>


<block block1>
/ trials = [1=atrial]
</block>

<block block2>
/ trials = [1=btrial]
</block>

<trial atrial>
/ ontrialend = [values.alatency=trial.atrial.latency]
/ stimulusframes = [1=atext]
/ validresponse = (57)
</trial>

<trial btrial>
/ ontrialbegin = [trial.btrial.setstimulustime(shape.eraser, values.alatency); ]
/ stimulusframes = [1=btext]
/ validresponse = (57)
</trial>

<text atext>
/ items = ("Press the spacebar")
</text>

<text btext>
/ items = ("This stimulus will disappear after <%values.alatency%> milliseconds.")
</text>

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


Edited 9 Years Ago by Dave
plush
plush
Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)Guru (5.3K reputation)
Group: Forum Members
Posts: 57, Visits: 96
Dear friends, I'm sure my question has been answered before somewhere, however I did not manage to find the answer.

What I would like to do, is use the response latencies provided in a first block, as the presentation times for a stimuli in a second block.

Is there an efficient way to do this? Thx for the help!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search