Group: Forum Members
Posts: 118,
Visits: 396
|
Hi,
long-time lurker, first time poster here. We recently upgraded our lab licences from Inquisit 3 to Inquisit 5 and I've run into a bit of an issue with a new script.
The experiment I'm working on reads the median RT from the last 11 trials and adjusts the timeout of the current trial accordingly. The /responsewindow function doesn't seem to have the precise functionality I'm looking for, as it always refers to blocks as opposed to the last X trials within a block, so I wrote a listsort function:
<trial sort1> /ontrialbegin = [values.j = values.j + 1] /ontrialbegin = [if (values.j <= counter.unsortedlist.itemcount) values.sortitem = getitem(counter.unsortedlist, values.j)] /branch = [if (values.j <= counter.unsortedlist.itemcount) {values.i = 0; trial.sort2} else trial.feedback] /recorddata = false / pretrialpause = 0 /trialduration = 0 </trial>
<trial sort2> /ontrialbegin = [values.i = values.i + 1] /branch = [if (values.sortitem <= getitem(counter.sortedlist, values.i)) {values.k = 1; trial.sort3}] /branch = [if (values.i < counter.sortedlist.itemcount) trial.sort2] /branch = [if (getitem(counter.sortedlist, counter.sortedlist.itemcount) == 0) {setitem(counter.sortedlist, values.sortitem, counter.sortedlist.itemcount); trial.sort1}] / branch = [{values.m = 0; values.k = -1; trial.sort4}] /recorddata = false / pretrialpause = 0 /trialduration = 0 </trial>
<trial sort3> / ontrialbegin = [values.k = values.k + 1] / ontrialbegin = [if (values.k <= values.i-1) setitem(counter.sortedlist, getitem(counter.sortedlist, values.k), values.k - 1)] / branch = [if (values.k < (values.i-1)) trial.sort3] / branch = [if (values.k == (values.i-1)) {setitem(counter.sortedlist, values.sortitem, values.i-1); trial.sort1}] / branch = [if (values.k == values.i) {setitem(counter.sortedlist, values.sortitem, 1); trial.sort1}] / recorddata = false / pretrialpause = 0 / trialduration = 0 </trial>
<trial sort4> / ontrialbegin = [values.k = values.k + 1] / branch = [if (getitem(counter.sortedlist, counter.sortedlist.itemcount - values.k) != 0) {values.m = values.m+1; trial.sort4}] / branch = [values.k = -1; trial.sort5] / recorddata = false / pretrialpause = 0 / trialduration = 0 </trial>
<trial sort5> / ontrialbegin = [values.k = values.k + 1] / ontrialbegin = [values.fourier = counter.sortedlist.itemcount + values.k - values.m] / ontrialbegin = [setitem(counter.sortedlist, getitem(counter.sortedlist, (values.fourier+1)), (values.fourier))] / branch = [if (values.m == values.k + 1) {setitem(counter.sortedlist, values.sortitem, counter.sortedlist.itemcount); values.k = 0; trial.sort1}] / branch = [trial.sort5] / recorddata = false / pretrialpause = 0 / trialduration = 0 </trial>
<counter unsortedlist> / items = (values.lat1, values.lat2, values.lat3, values.lat4, values.lat5, values.lat6, values.lat7, values.lat8, values.lat9, values.lat10, values.lat11) / select = noreplace </counter>
<counter sortedlist> / items = (values.lat1, values.lat2, values.lat3, values.lat4, values.lat5, values.lat6, values.lat7, values.lat8, values.lat9, values.lat10, values.lat11) / select = noreplace </counter> / items = (0,0,0,0,0,0,0,0,0,0,0)
The lat1 - lat11 values are written at the end of each trial where the participant responded correctly and the timeout is implemented with a call to getitem(counter.sortedlist,6) in the iscorrectresponse of the main task trials. I'm aware that there is a simpler version of a sort list posted somewhere here (thanks for that, by the way!), but it didn't work with Inquisit 3 in an older experiment, so I adapted it as shown.
Now, the problem is this: when I use this script in Inquisit 3, everything works fine with no noticeable delays. But when the exact same script is run in Inquisit 5, there is a noticeable pause between the main task trials - as though the sort list trials were taking longer than they should. Does anyone happen to know the reason for this and a way to solve it? I've played around with setting pretrialpause and posttrialpause to 0, but no dice.
In a possibly related issue, this problem has been reproduced on a Mac and a Windows 7 PC, both of which also took a looong time to start up Inquisit 5 in the first place (consistently upwards of 15 seconds, sometimes as much as 45). Just adding this in case it is relevant.
Thanks so much for any help!
Best, AK
|