Psych_Josh
|
|
Group: Forum Members
Posts: 85,
Visits: 397
|
Dear Inquisit,
A part of my experiment requires storing response times to a stimuli (i.e., a reaction time) to use later for stimuli presentation times. Specifically, there'll be 20 reaction time trials, and I wish to be able to use this time between stimuli onset and response time as a presentation time of the same stimuli in different trials later on. Obviously, there is the method of creating each trial individually, and storing their response times within a global variable (value), and then for the later trials use a list to draw those values for presentation times, but I feel this is quite an inelegant/poor solution. To clarify, my experiment requires each specific reaction times (20 in total), so I can't simply calculate an average and use that. If there was a better way to do this that would be much appreciated!
Many thanks, Josh
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+xDear Inquisit, A part of my experiment requires storing response times to a stimuli (i.e., a reaction time) to use later for stimuli presentation times. Specifically, there'll be 20 reaction time trials, and I wish to be able to use this time between stimuli onset and response time as a presentation time of the same stimuli in different trials later on. Obviously, there is the method of creating each trial individually, and storing their response times within a global variable (value), and then for the later trials use a list to draw those values for presentation times, but I feel this is quite an inelegant/poor solution. To clarify, my experiment requires each specific reaction times (20 in total), so I can't simply calculate an average and use that. If there was a better way to do this that would be much appreciated! Many thanks, Josh Store the RTs in a <list> linked to the respective stimulus element (the with your 20 items). Then, in the 2nd part, retrieve the RT tied to a given item from the <list> and use the insertstimulustime() function to insert the stimulus in the trial at the desired time.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+xDear Inquisit, A part of my experiment requires storing response times to a stimuli (i.e., a reaction time) to use later for stimuli presentation times. Specifically, there'll be 20 reaction time trials, and I wish to be able to use this time between stimuli onset and response time as a presentation time of the same stimuli in different trials later on. Obviously, there is the method of creating each trial individually, and storing their response times within a global variable (value), and then for the later trials use a list to draw those values for presentation times, but I feel this is quite an inelegant/poor solution. To clarify, my experiment requires each specific reaction times (20 in total), so I can't simply calculate an average and use that. If there was a better way to do this that would be much appreciated! Many thanks, Josh Store the RTs in a <list> linked to the respective stimulus element (the with your 20 items). Then, in the 2nd part, retrieve the RT tied to a given item from the <list> and use the insertstimulustime() function to insert the stimulus in the trial at the desired time. Here's a quick example: <expt> / blocks = [1=a_block; 2=b_block] </expt> <values> / itemnumber = 1 / offset = 0 </values> <block a_block> / trials = [1-4 = a_trial] </block> <trial a_trial> / ontrialbegin = [values.itemnumber = list.itemnumbers.nextindex; ] / ontrialend = [list.latencies.setitem(trial.a_trial.latency, values.itemnumber);] / stimulusframes = [1=mytext] / validresponse = (57) </trial> <text mytext> / items = myitems / select = values.itemnumber </text> <item myitems> / 1 = "A" / 2 = "B" / 3 = "C" / 4 = "D" </item> <list itemnumbers> / poolsize = 4 </list> <list latencies> / items = (0,0,0,0) / selectionmode = values.itemnumber </list> <block b_block> / trials = [1-4 = b_trial] </block> <trial b_trial> / ontrialbegin = [values.itemnumber = list.itemnumbers.nextindex; values.offset = list.latencies.nextvalue; ] / ontrialbegin = [trial.b_trial.insertstimulustime(shape.offset, values.offset);] / ontrialend = [trial.b_trial.resetstimulusframes();] / stimulustimes = [0=mytext] / validresponse = (57) </trial> <shape offset> / shape = rectangle / color = white / size = (50%, 50%) </shape> <data> / columns = [date time subject group blocknum blockcode trialnum trialcode stimulusitem response latency values.offset] / separatefiles = true </data>
|
|
|
Psych_Josh
|
|
Group: Forum Members
Posts: 85,
Visits: 397
|
Hi Dave,
Thanks for your help.
When testing it out, the stimuli times presented in the the second set of trials don't appear to correspond with my reaction times (which I deliberately delayed) - the stimuli appear immediately without any delay. So, I'm probably making an error somewhere. Just clarify, the stimulus participants would respond to is the same stimulus across the 20 trials. Here's what I have:
(the '500' is a condition label)
******** Stimulus ******** <item Rocket_Double> /1 = "Rocket_Double.jpeg" </item>
<picture Rocket_Double> /items = Rocket_Double /position = (50, 50) /size = (50%, 50%) /erase = false </picture>
******** Lists ******** <list itemnumbers500> /poolsize = 20 </list>
<list latencies500> /items = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) - 20 0s for the 20 different /selectionmode = values.itemnumber500 </list>
******* Values ******* <values> /itemnumber500 = 1 /offset = 0 </values>
******* First set of trials where RTs are collected ******* 10 trials from:
<trial selfpracrocket900> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex] /ontrialbegin = [trial.selfpracrocket900.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfpracrocket900.latency<1000 && trial.selfpracrocket900.response == 16) trial.selfprac900 else trial.selfprac900error] /ontrialend = [trial.selfpracrocket900.resetstimulusframes(0)] /ontrialend = [list.latencies900.setitem(trial.selfpracrocket900.latency, values.itemnumber900)] /recorddata = false </trial>
And 10 trials from:
<trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial.selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial>
******* Second set of trials where RTs are used as onset time for the same stimulus (an initial stimulus is presented first after 500ms, so the stimulus in question would need occur at RT + 500) *******
10 trials in:
<trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial>
And 10 trials in:
<trial baselineprac900> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex; values.offset = list.latencies900.nextvalue + 900] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.launch_b, values.offset + 900)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 900] /ontrialend = [values.responsetime = trial.baselineprac900.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac900.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac900] </trial>
******* Blocks (contains trials which I do not want to take RTs from but included here for whole picture) <block experiment> /trials = [1-20 = noreplace(selfpracclick500, otherpracclick500); 21-40 = noreplace(selfclick500, trial.otherclick500) </block>
<block baseline> /trials = [1-10 = noreplace(baselineprac500); 11-20 = noreplace(baseline500)] </block>
<expt> /blocks = [1 = experiment; 2 = baseline] </expt>
I hope that's clear enough; apologises if not, and sorry for most likely making an error somewhere!
Many thanks, Josh
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+xHi Dave, Thanks for your help. When testing it out, the stimuli times presented in the the second set of trials don't appear to correspond with my reaction times (which I deliberately delayed) - the stimuli appear immediately without any delay. So, I'm probably making an error somewhere. Just clarify, the stimulus participants would respond to is the same stimulus across the 20 trials. Here's what I have: (the '500' is a condition label) ******** Stimulus ******** <item Rocket_Double> /1 = "Rocket_Double.jpeg" </item> <picture Rocket_Double> /items = Rocket_Double /position = (50, 50) /size = (50%, 50%) /erase = false </picture> ******** Lists ******** <list itemnumbers500> /poolsize = 20 </list> <list latencies500> /items = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) - 20 0s for the 20 different /selectionmode = values.itemnumber500 </list> ******* Values ******* <values> /itemnumber500 = 1 /offset = 0 </values> ******* First set of trials where RTs are collected ******* 10 trials from: <trial selfpracrocket900> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex] /ontrialbegin = [trial.selfpracrocket900.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfpracrocket900.latency<1000 && trial.selfpracrocket900.response == 16) trial.selfprac900 else trial.selfprac900error] /ontrialend = [trial.selfpracrocket900.resetstimulusframes(0)] /ontrialend = [list.latencies900.setitem(trial.selfpracrocket900.latency, values.itemnumber900)] /recorddata = false </trial> And 10 trials from: <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial.selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial> ******* Second set of trials where RTs are used as onset time for the same stimulus (an initial stimulus is presented first after 500ms, so the stimulus in question would need occur at RT + 500) ******* 10 trials in: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> And 10 trials in: <trial baselineprac900> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex; values.offset = list.latencies900.nextvalue + 900] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.launch_b, values.offset + 900)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 900] /ontrialend = [values.responsetime = trial.baselineprac900.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac900.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac900] </trial> ******* Blocks (contains trials which I do not want to take RTs from but included here for whole picture) <block experiment> /trials = [1-20 = noreplace(selfpracclick500, otherpracclick500); 21-40 = noreplace(selfclick500, trial.otherclick500) </block> <block baseline> /trials = [1-10 = noreplace(baselineprac500); 11-20 = noreplace(baseline500)] </block> <expt> /blocks = [1 = experiment; 2 = baseline] </expt> I hope that's clear enough; apologises if not, and sorry for most likely making an error somewhere! Many thanks, Josh > the stimuli appear immediately without any delay. Which stimuli? Please refer to them as exactly as named in the code you posted. And please spell out precisely when which stimulus is supposed to be displayed.
|
|
|
Psych_Josh
|
|
Group: Forum Members
Posts: 85,
Visits: 397
|
+x+xHi Dave, Thanks for your help. When testing it out, the stimuli times presented in the the second set of trials don't appear to correspond with my reaction times (which I deliberately delayed) - the stimuli appear immediately without any delay. So, I'm probably making an error somewhere. Just clarify, the stimulus participants would respond to is the same stimulus across the 20 trials. Here's what I have: (the '500' is a condition label) ******** Stimulus ******** <item Rocket_Double> /1 = "Rocket_Double.jpeg" </item> <picture Rocket_Double> /items = Rocket_Double /position = (50, 50) /size = (50%, 50%) /erase = false </picture> ******** Lists ******** <list itemnumbers500> /poolsize = 20 </list> <list latencies500> /items = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) - 20 0s for the 20 different /selectionmode = values.itemnumber500 </list> ******* Values ******* <values> /itemnumber500 = 1 /offset = 0 </values> ******* First set of trials where RTs are collected ******* 10 trials from: <trial selfpracrocket900> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex] /ontrialbegin = [trial.selfpracrocket900.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfpracrocket900.latency<1000 && trial.selfpracrocket900.response == 16) trial.selfprac900 else trial.selfprac900error] /ontrialend = [trial.selfpracrocket900.resetstimulusframes(0)] /ontrialend = [list.latencies900.setitem(trial.selfpracrocket900.latency, values.itemnumber900)] /recorddata = false </trial> And 10 trials from: <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial.selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial> ******* Second set of trials where RTs are used as onset time for the same stimulus (an initial stimulus is presented first after 500ms, so the stimulus in question would need occur at RT + 500) ******* 10 trials in: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> And 10 trials in: <trial baselineprac900> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex; values.offset = list.latencies900.nextvalue + 900] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.launch_b, values.offset + 900)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 900] /ontrialend = [values.responsetime = trial.baselineprac900.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac900.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac900] </trial> ******* Blocks (contains trials which I do not want to take RTs from but included here for whole picture) <block experiment> /trials = [1-20 = noreplace(selfpracclick500, otherpracclick500); 21-40 = noreplace(selfclick500, trial.otherclick500) </block> <block baseline> /trials = [1-10 = noreplace(baselineprac500); 11-20 = noreplace(baseline500)] </block> <expt> /blocks = [1 = experiment; 2 = baseline] </expt> I hope that's clear enough; apologises if not, and sorry for most likely making an error somewhere! Many thanks, Josh > the stimuli appear immediately without any delay. Which stimuli? Please refer to them as exactly as named in the code you posted. And please spell out precisely when which stimulus is supposed to be displayed. Hi Dave, Pardon my lack of specificity. The stimuli I'm referring to is: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)]
/ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> i.e., I need picture.rocket_b2 to be displayed (in addition to the 500ms) after one of the twenty stored reaction times to the stimulus picture.rocket_double. The sequence of these events should be: 1ms = fixation cross ('+'), 500ms = rocket_b, then the stimuli in question, rocket_b2, after one of the stored reaction times. When I say it is appearing immediately, I mean that rocket_b2 appears after 500ms without rocket_b appearing. I hope this helps! Many thanks, Josh
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+x+xHi Dave, Thanks for your help. When testing it out, the stimuli times presented in the the second set of trials don't appear to correspond with my reaction times (which I deliberately delayed) - the stimuli appear immediately without any delay. So, I'm probably making an error somewhere. Just clarify, the stimulus participants would respond to is the same stimulus across the 20 trials. Here's what I have: (the '500' is a condition label) ******** Stimulus ******** <item Rocket_Double> /1 = "Rocket_Double.jpeg" </item> <picture Rocket_Double> /items = Rocket_Double /position = (50, 50) /size = (50%, 50%) /erase = false </picture> ******** Lists ******** <list itemnumbers500> /poolsize = 20 </list> <list latencies500> /items = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) - 20 0s for the 20 different /selectionmode = values.itemnumber500 </list> ******* Values ******* <values> /itemnumber500 = 1 /offset = 0 </values> ******* First set of trials where RTs are collected ******* 10 trials from: <trial selfpracrocket900> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex] /ontrialbegin = [trial.selfpracrocket900.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfpracrocket900.latency<1000 && trial.selfpracrocket900.response == 16) trial.selfprac900 else trial.selfprac900error] /ontrialend = [trial.selfpracrocket900.resetstimulusframes(0)] /ontrialend = [list.latencies900.setitem(trial.selfpracrocket900.latency, values.itemnumber900)] /recorddata = false </trial> And 10 trials from: <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial.selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial> ******* Second set of trials where RTs are used as onset time for the same stimulus (an initial stimulus is presented first after 500ms, so the stimulus in question would need occur at RT + 500) ******* 10 trials in: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> And 10 trials in: <trial baselineprac900> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex; values.offset = list.latencies900.nextvalue + 900] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.launch_b, values.offset + 900)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 900] /ontrialend = [values.responsetime = trial.baselineprac900.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac900.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac900] </trial> ******* Blocks (contains trials which I do not want to take RTs from but included here for whole picture) <block experiment> /trials = [1-20 = noreplace(selfpracclick500, otherpracclick500); 21-40 = noreplace(selfclick500, trial.otherclick500) </block> <block baseline> /trials = [1-10 = noreplace(baselineprac500); 11-20 = noreplace(baseline500)] </block> <expt> /blocks = [1 = experiment; 2 = baseline] </expt> I hope that's clear enough; apologises if not, and sorry for most likely making an error somewhere! Many thanks, Josh > the stimuli appear immediately without any delay. Which stimuli? Please refer to them as exactly as named in the code you posted. And please spell out precisely when which stimulus is supposed to be displayed. Hi Dave, Pardon my lack of specificity. The stimuli I'm referring to is: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)]
/ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> i.e., I need picture.rocket_b2 to be displayed (in addition to the 500ms) after one of the twenty stored reaction times to the stimulus picture.rocket_double. The sequence of these events should be: 1ms = fixation cross ('+'), 500ms = rocket_b, then the stimuli in question, rocket_b2, after one of the stored reaction times. When I say it is appearing immediately, I mean that rocket_b2 appears after 500ms without rocket_b appearing. I hope this helps! Many thanks, Josh Why is <trial selfrocket500> <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial. selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial> inserting the latency from an entirely different <trial> element -- <trial self pracrocket500>?
|
|
|
Psych_Josh
|
|
Group: Forum Members
Posts: 85,
Visits: 397
|
+x+x+x+xHi Dave, Thanks for your help. When testing it out, the stimuli times presented in the the second set of trials don't appear to correspond with my reaction times (which I deliberately delayed) - the stimuli appear immediately without any delay. So, I'm probably making an error somewhere. Just clarify, the stimulus participants would respond to is the same stimulus across the 20 trials. Here's what I have: (the '500' is a condition label) ******** Stimulus ******** <item Rocket_Double> /1 = "Rocket_Double.jpeg" </item> <picture Rocket_Double> /items = Rocket_Double /position = (50, 50) /size = (50%, 50%) /erase = false </picture> ******** Lists ******** <list itemnumbers500> /poolsize = 20 </list> <list latencies500> /items = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) - 20 0s for the 20 different /selectionmode = values.itemnumber500 </list> ******* Values ******* <values> /itemnumber500 = 1 /offset = 0 </values> ******* First set of trials where RTs are collected ******* 10 trials from: <trial selfpracrocket900> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex] /ontrialbegin = [trial.selfpracrocket900.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfpracrocket900.latency<1000 && trial.selfpracrocket900.response == 16) trial.selfprac900 else trial.selfprac900error] /ontrialend = [trial.selfpracrocket900.resetstimulusframes(0)] /ontrialend = [list.latencies900.setitem(trial.selfpracrocket900.latency, values.itemnumber900)] /recorddata = false </trial> And 10 trials from: <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial.selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial> ******* Second set of trials where RTs are used as onset time for the same stimulus (an initial stimulus is presented first after 500ms, so the stimulus in question would need occur at RT + 500) ******* 10 trials in: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> And 10 trials in: <trial baselineprac900> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex; values.offset = list.latencies900.nextvalue + 900] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.launch_b, values.offset + 900)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 900] /ontrialend = [values.responsetime = trial.baselineprac900.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac900.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac900] </trial> ******* Blocks (contains trials which I do not want to take RTs from but included here for whole picture) <block experiment> /trials = [1-20 = noreplace(selfpracclick500, otherpracclick500); 21-40 = noreplace(selfclick500, trial.otherclick500) </block> <block baseline> /trials = [1-10 = noreplace(baselineprac500); 11-20 = noreplace(baseline500)] </block> <expt> /blocks = [1 = experiment; 2 = baseline] </expt> I hope that's clear enough; apologises if not, and sorry for most likely making an error somewhere! Many thanks, Josh > the stimuli appear immediately without any delay. Which stimuli? Please refer to them as exactly as named in the code you posted. And please spell out precisely when which stimulus is supposed to be displayed. Hi Dave, Pardon my lack of specificity. The stimuli I'm referring to is: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)]
/ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> i.e., I need picture.rocket_b2 to be displayed (in addition to the 500ms) after one of the twenty stored reaction times to the stimulus picture.rocket_double. The sequence of these events should be: 1ms = fixation cross ('+'), 500ms = rocket_b, then the stimuli in question, rocket_b2, after one of the stored reaction times. When I say it is appearing immediately, I mean that rocket_b2 appears after 500ms without rocket_b appearing. I hope this helps! Many thanks, Josh Why is <trial selfrocket500> <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial. selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial> inserting the latency from an entirely different <trial> element -- <trial self pracrocket500>? Hi Dave, My apologies, that was an error (the issue still occurs after fixing it). Many thanks, Josh
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+x+x+x+xHi Dave, Thanks for your help. When testing it out, the stimuli times presented in the the second set of trials don't appear to correspond with my reaction times (which I deliberately delayed) - the stimuli appear immediately without any delay. So, I'm probably making an error somewhere. Just clarify, the stimulus participants would respond to is the same stimulus across the 20 trials. Here's what I have: (the '500' is a condition label) ******** Stimulus ******** <item Rocket_Double> /1 = "Rocket_Double.jpeg" </item> <picture Rocket_Double> /items = Rocket_Double /position = (50, 50) /size = (50%, 50%) /erase = false </picture> ******** Lists ******** <list itemnumbers500> /poolsize = 20 </list> <list latencies500> /items = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) - 20 0s for the 20 different /selectionmode = values.itemnumber500 </list> ******* Values ******* <values> /itemnumber500 = 1 /offset = 0 </values> ******* First set of trials where RTs are collected ******* 10 trials from: <trial selfpracrocket900> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex] /ontrialbegin = [trial.selfpracrocket900.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfpracrocket900.latency<1000 && trial.selfpracrocket900.response == 16) trial.selfprac900 else trial.selfprac900error] /ontrialend = [trial.selfpracrocket900.resetstimulusframes(0)] /ontrialend = [list.latencies900.setitem(trial.selfpracrocket900.latency, values.itemnumber900)] /recorddata = false </trial> And 10 trials from: <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial.selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial> ******* Second set of trials where RTs are used as onset time for the same stimulus (an initial stimulus is presented first after 500ms, so the stimulus in question would need occur at RT + 500) ******* 10 trials in: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> And 10 trials in: <trial baselineprac900> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber900 = list.itemnumbers900.nextindex; values.offset = list.latencies900.nextvalue + 900] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac900.insertstimulustime(picture.launch_b, values.offset + 900)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 900] /ontrialend = [values.responsetime = trial.baselineprac900.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac900.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac900] </trial> ******* Blocks (contains trials which I do not want to take RTs from but included here for whole picture) <block experiment> /trials = [1-20 = noreplace(selfpracclick500, otherpracclick500); 21-40 = noreplace(selfclick500, trial.otherclick500) </block> <block baseline> /trials = [1-10 = noreplace(baselineprac500); 11-20 = noreplace(baseline500)] </block> <expt> /blocks = [1 = experiment; 2 = baseline] </expt> I hope that's clear enough; apologises if not, and sorry for most likely making an error somewhere! Many thanks, Josh > the stimuli appear immediately without any delay. Which stimuli? Please refer to them as exactly as named in the code you posted. And please spell out precisely when which stimulus is supposed to be displayed. Hi Dave, Pardon my lack of specificity. The stimuli I'm referring to is: <trial baselineprac500> /stimulustimes = [1 = cross; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.rocket_b2, values.offset)]
/ontrialbegin = [trial.baselineprac500.insertstimulustime(picture.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [values.onset = 500] /ontrialend = [values.responsetime = trial.baselineprac500.latency - list.nexttrial.currentvalue] /ontrialend = [trial.baselineprac500.resetstimulusframes(100)] /recorddata = false /branch = [trial.baselinecontinueprac500] </trial> i.e., I need picture.rocket_b2 to be displayed (in addition to the 500ms) after one of the twenty stored reaction times to the stimulus picture.rocket_double. The sequence of these events should be: 1ms = fixation cross ('+'), 500ms = rocket_b, then the stimuli in question, rocket_b2, after one of the stored reaction times. When I say it is appearing immediately, I mean that rocket_b2 appears after 500ms without rocket_b appearing. I hope this helps! Many thanks, Josh Why is <trial selfrocket500> <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(picture.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /branch = [if(trial.selfrocket500.latency<1000 && trial.selfrocket500.response == 16) trial.self500 else trial.self500error] /ontrialend = [trial.selfrocket500.resetstimulusframes(0)] /ontrialend = [list.latencies500.setitem(trial. selfpracrocket500.latency, values.itemnumber500)] /recorddata = false </trial> inserting the latency from an entirely different <trial> element -- <trial self pracrocket500>? Hi Dave, My apologies, that was an error (the issue still occurs after fixing it). Many thanks, Josh I've stripped down the code you posted to something runable: ******** Stimulus ******** <item Rocket_Double> /1 = "Rocket_Double.jpeg" </item> <text Rocket_Double> /items = Rocket_Double /position = (50, 50) /size = (50%, 50%) /erase = false </text> <text cross> / items = ("+") </text> <text rocket_b> / items = ("rocket_b") </text> <text rocket_b2> / items = ("rocket_b2") </text> <text launch_b> / items = ("launch_b") </text> ******** Lists ******** <list itemnumbers500> /poolsize = 20 </list> <list latencies500> /items = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) /selectionmode = values.itemnumber500 </list> <list nexttrial> / items = (1000, 2000, 3000, 4000, 5000) </list> ******* Values ******* <values> /itemnumber500 = 1 /offset = 0 </values> ******* First set of trials where RTs are collected ******* 10 trials from: And 10 trials from: <trial selfrocket500> /stimulustimes = [1 = cross] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex] /ontrialbegin = [trial.selfrocket500.insertstimulustime(text.rocket_double, list.nexttrial.nextvalue)] /beginresponsetime = list.nexttrial.currentvalue /responseinterrupt = trial /validresponse = (16) /ontrialend = [trial.selfrocket500.resetstimulusframes()] /ontrialend = [list.latencies500.setitem(trial.selfrocket500.latency, values.itemnumber500)] /recorddata = false </trial> ******* Second set of trials where RTs are used as onset time for the same stimulus (an initial stimulus is presented first after 500ms, so the stimulus in question would need occur at RT + 500) ******* 10 trials in: <trial baselineprac500> /stimulustimes = [1 = cross, debug; 500 = rocket_b] /ontrialbegin = [values.itemnumber500 = list.itemnumbers500.nextindex; values.offset = list.latencies500.nextvalue + 500] /ontrialbegin = [trial.baselineprac500.insertstimulustime(text.rocket_b2, values.offset)] /ontrialbegin = [trial.baselineprac500.insertstimulustime(text.launch_b, values.offset + 500)] /correctresponse = (25) /beginresponsetime = 0 /responseinterrupt = trial /ontrialend = [trial.baselineprac500.resetstimulusframes()] /recorddata = false </trial> ******* Blocks (contains trials which I do not want to take RTs from but included here for whole picture) <block experiment> /trials = [1-20 = selfrocket500] </block> <block baseline> /trials = [1-20 = baselineprac500] </block> <expt> /blocks = [1 = experiment; 2 = baseline] </expt> <text debug> / items = ("Offset: <%values.offset%>") / position = (50%, 10%) </text> It works just fine for me.
|
|
|
Psych_Josh
|
|
Group: Forum Members
Posts: 85,
Visits: 397
|
Hi Dave, many thanks for your assistance once again!
Josh
|
|
|