Inquisit timing accuracy.


Author
Message
matt2004
matt2004
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 11, Visits: 1

Dear Inquisit-forum-denizens,


I have been struggling with a timing issue with Inquisit for some time now, in fact I posted a question about it some time ago, related to Inquisit 2: http://www.millisecond.com/forums/Topic2348.aspx. I'm now testing out Inquisit 3 with a view to upgrading and am finding the same issue.


The issue is a consistent timing error, such that the total length of each trial is slightly longer than it should be. Sean's response to my original post was to suggest inserting pre and post-trial pauses to give Inquisit time to wrap the trial up, however this doesn't seem to help. 


I've been coping with the issue by deliberately setting the trial duration lower than it 'should' be, so if I want a trial to last for 1000 ms, I actually set the trial duration to, say, 9900 ms. However, fixing the issue is not as simple as having a simple rule of "knock off 100ms from the duration of every trial" - the error seems to be somewhat capricious depending on what kind of stimuli (and how many) are being presented, although it's generally consistent across trials of the same type. Fixing the error and getting the timing I want therefore requires a fair bit of tedious data-logging with external hardware, or sitting there with a stopwatch timing the total length of the program and iteratively knocking off or adding a few milliseconds to the trial durations in order to get the total length as accurate as possible.


To illustrate this I've written a very simple example program. This presents shape stimuli (a green circle, and a black circle to 'erase' the green one) on every trial, and the trial duration has been set at 1000ms. There are 60 trials, so the total length of the program should be 1 minute. In fact, the total length of the program is approximately 1 minute and 3 seconds. Inquisit is therefore adding on approximately 50ms (or three frames) to each trial. Changing the pre and post trial pauses from 100 ms to 0 ms has no effect. Inquisit logs the trial duration in the data file as whatever is specified in the script, which is unhelpful.


Apologies for the length of this post, but I now have several queries:


1. Why does this happen? As I understand it, Inquisit uses the system timer, which should have sub-microsecond resolution. Given the timer's resolution it seems very odd that such a large error occurs.


2. How can I ensure that the timings I enter into the script are what I actually get when the script executes? Is there some little trick I'm missing here? I've tried controlling the length of trials using the timeout feature as well, but that doesn't seem to help. As noted before, Sean's original suggestion of inserting a post-trial pause doesn't seem to help.


3. Are the values for trialduration which are logged in the data file actually measured as the program executes, or are they just copied from the relevant parts of the script? I'm guessing the latter, since they seem to be inaccurate.


4. Has anyone else seen behaviour like this?


5. Can some kind person help me out by trying to reproduce the error using the attached script? The magnitude of the error does seem to be somewhat hardware dependent, but there's always some kind of lag. I generally use up-to-date hardware (dual core processer, lots of RAM, Windows XP, things like anti-virus disabled) for running my programs.


Many thanks for any help you can give me with this. I've been using Inquisit for years and genuinely adore it, but if I can't solve this problem I'll have to start using something else. Plus, I've just embarrassed myself in front of my supervisor by running a load of fMRI scans with crappy timing. :o(


Thanks,


M.


Attachments
timing_example.exp (1K views, 1,004 bytes)
Tags
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
matt2004 - 14 Years Ago
Dave - 14 Years Ago
matt2004 - 14 Years Ago
Dave - 14 Years Ago
seandr - 14 Years Ago
                         [quote]<data> / audit = true </audit> [/quote]
...
Dave - 14 Years Ago
                             Dear Dave/Sean,
Many, many thanks for all your help with this -...
matt2004 - 14 Years Ago
                                 Oh - it appears I can't attach two files at once. Here is the log file...
matt2004 - 14 Years Ago
                                     Matt,
definitely sounds like an issue with your specific...
Dave - 14 Years Ago
                                         Hmm, looking at the data file you posted there's something fishy going...
Dave - 14 Years Ago
                                             Yes, since that old build, I added some optimizations in the way that...
seandr - 14 Years Ago
                                                 [quote]Yes, since that old build, I added some optimizations in the...
Dave - 14 Years Ago
                                                 Oh, btw, while coming up with the time auditing bits for the test...
Dave - 14 Years Ago
                                                     A little more info on the timing optimization - there were...
seandr - 14 Years Ago
                                                         [quote]A posttrialpause gives Inquisit a fixed time buffer after the...
Dave - 14 Years Ago
                                                             I've tested the script with /postrialpause=0 and am seeing...
seandr - 14 Years Ago
                                                                 Hi Sean,
many thanks for giving this another look and your...
Dave - 14 Years Ago
                                                                     A couple of more observations from tests conducted today:
- Even...
Dave - 14 Years Ago
                                                                         Weird. I've run the test several more times with both data recording...
seandr - 14 Years Ago
                                                                             Thanks for the reply, Sean. Really weird. I can reproduce these delays...
Dave - 14 Years Ago
                                                                                 Ah, that might explain the discrepancy. The mean difference includes...
seandr - 14 Years Ago
                                                                                     [quote]Ah, that might explain the discrepancy. The mean difference...
Dave - 14 Years Ago
                                                                                         More weird - did you update the test script? I just downloaded it...
seandr - 14 Years Ago
                                                                                             [quote]More weird - did you update the test script? I just downloaded...
Dave - 14 Years Ago
                                                                                                 Dear Dave/Sean,
Many thanks once again for the extensive testing...
matt2004 - 14 Years Ago
                                                                                                     [quote]Interestingly, the above is only true on the computer I use for...
Dave - 14 Years Ago
                                                                                                         Dave,
Sorry for being unclear - what I meant was b), i.e. the...
matt2004 - 14 Years Ago
                                                                                                             Ok, I've dug more deeply into this, and identified the cause of the...
seandr - 14 Years Ago
                                                                                                                 Ha! Huge thanks for digging into and solving the timing lag mystery,...
Dave - 14 Years Ago
                                                                                                                     Hi Dave, Sean


I stumbled across this thread while trying...
JonRamsay - 12 Years Ago
                                                                                                                         Jon,

I'm seeing no such delays with your script, doesn't...
Dave - 12 Years Ago
                                                                                                                             Hi Dave,

That's really strange. I reinstalled Inquisit...
JonRamsay - 12 Years Ago
                                                                                                                                 I've tried with the same version. Still, I'm not seeing any issue....
Dave - 12 Years Ago
                                                                                                                                     Hi Dave,

The "delay" I'm speaking of hasn't been recorded by...
JonRamsay - 12 Years Ago
                                                                                                                                         I'm definitely not seeing any such pronounced delays (~1000ms) with...
Dave - 12 Years Ago
                                                                                                                                             Hi Jonathan,
I've tested out your script and looked it over, and...
Admin - 12 Years Ago
                                                                         P.S. If you are still seeing the delays, it would be interesting to...
seandr - 14 Years Ago
                             [quote]Wonderful feature, too bad this isn't mentioned anywhere in the...
seandr - 14 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search