Negative onset delay in event timing

95 views
Skip to first unread message

Brian

unread,
Feb 4, 2008, 2:06:31 PM2/4/08
to E-Prime
In my experiment, I have a fixation text display object set to event
timing. The next object after this
is a slide (which is also set to event timing). When I specify a
prerelease greater than zero (e.g. 100 ms) on the fixation object, I'm
noticing something strange happening. In edataaid, it says on about
10% of trials that the onset delay of the next object (the slide) is
-1 ms. For these trials, edataaid lists the offset time of the
fixation text object as one millisecond later (e.g. offset time of
12000 ms) than the onset time of the next slide (e.g. onset time of
11999 ms). Both objects are listed as being on the screen for the
correct duration (I calculated this by looking at each object's offset-
onset time).
Does anyone know what is going on here? The prerelease is nice because
it shortens the onset delay for trials, but the occurrence of this
timing irregularity makes me hesitant to use it.

I'm currently running eprime version 1.1.4.1 in windows xp pro.

Thanks,
Brian

David McFarlane

unread,
Jul 19, 2016, 4:07:42 PM7/19/16
to e-p...@googlegroups.com
Wow, this post has lingered in my inbox for over 8 years, waiting until
I could write a full response. I finally did that at
https://groups.google.com/d/topic/e-prime/f6viimk4tvM . Note that
Anne-Wil (liwenna) also addressed this topic in another thread in 2011,
https://groups.google.com/d/topic/e-prime/gS4FRijqqMA .

-- David McFarlane

Rachel R

unread,
Dec 13, 2016, 6:09:42 PM12/13/16
to E-Prime
I am so glad I came across this post. I am also having issues with negative onset delays. I am running an ERP study using a Flanker task. The stimulus is presented for 300ms, followed by a 2000ms response window and lastly 200 ms before the next trial. I carefully picked my display times so that they would be divisible by the refresh rate (60Hz). 1000/60Hz = 16.666667. If I am understanding things correctly, 300/16.666=18 and 2000/16.666 =120, which are both whole numbers. When I run my task without specifying pre-release values, my onset delays are consistently between 16-17ms. When I specify pre-release values of 100, the majority of my onset delays are 0, but about 10% of them are -1 and there is always one random one that is 17. I am trying to figure out a way to make all of my onset delays 0. Any suggestions would be greatly appreciated!!

David McFarlane

unread,
Dec 14, 2016, 4:44:53 PM12/14/16
to e-p...@googlegroups.com
First, in *principle*, at 60 Hz, you could specify durations exactly in
steps of 50 ms (3 cycles/50 ms = 60 cycles/s). In *practice* however,
monitors may vary ever so slightly from 60 Hz (see the number that
E-Prime automatically measures & reports for you in any of your .edat2
files). So it's best not to base your settings exactly on that 60 Hz.

Second, I do not think that getting OnsetDelay exactly to 0 is in & of
itself a worthwhile goal. What you really care about is getting your
stimuli to last for a well controlled duration; thought of another way,
you really care about stimulus onset-to-onset times, and the Durations
are just a proxy for that.

So let's take your example. You have already translated your stimulus
durations to numbers of video frames, so all good there. Of course, for
any given monitor, 18 frames may not come out exactly to 300 ms. Given
such a monitor we could not get any closer to 300 ms than 18 frames, so
how can we make sure that we always get our 18 frames for any given monitor?

The trick is to deliberately add in a bit of slop, and take advantage of
E-Prime's Onset Sync, Refresh Alignment, PreRelease, and Generate
PreRun. Instead of setting the stimulus Duration exactly to 300, set it
to something shy of 300, but still within one video frame of 300. Some
people suggest subtracting 1/2 frame time from the desired duration, so
in this case you would use 300-8 = 292 Others suggest subtracting some
suitable fixed amount like 5, so in this case you would use 295 (this is
my approach because I am too lazy to figure out the frame rate for a
given lab monitor and then calculate 1/2 of that).

Now, with Onset Sync set to "vertical blank" when E-Prime reaches 292 or
295 ms or whatever with the stimulus, it allows the next stimulus to
proceed. But that visual stimulus will have to wait until the next
video frame starts. So you will see an OnsetDelay of 8 or 5 ms or
whatever, but now that is *exactly* what you want! Instead, look at the
onset-to-onset times between the stimuli, and you should see that they
come consistently within 1 ms of the 300 ms that you want, and really
that's all that you can ask for.

(BTW, in some programming platforms such as PsychoPy, you may specify
stimulus durations directly in terms of video frames, which can simplify
all of this.)

Good question. I hope this helps.

---------------
David McFarlane
E-Prime training online:
http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)
Reply all
Reply to author
Forward
0 new messages