[visionegg] WARNINGs in the log file
- From: "Joyca Lacroix" <j.lacroix@xxxxxxxxxxxxx>
- To: <visionegg@xxxxxxxxxxxxx>
- Date: Wed, 27 Nov 2002 17:09:27 +0100
Dear Andrew,
Thank you for the code you sent me last week! I have a question concerning
the use of this code (see below, second code part). When I run the program
with this code and set the duration_per_image at 0.1 sec. I can see that the
duration of display differs per image. Also, several WARNINGs occur in the
VisionEgg log file (see here):
*********************************************
VisionEgg info (2002-11-27 17:00:57): C:\Documents and Settings\j.lacroix\My
Documents\python\stimuli.py
started.
VisionEgg info (2002-11-27 17:01:03): Requesting window 768 x 576 32 bpp (8
8 8 0 RGBA).
VisionEgg info (2002-11-27 17:01:05): OpenGL 1.3.1, GeForce2 MX/PCI/SSE2,
NVIDIA Corporation
VisionEgg info (2002-11-27 17:01:05): Video system reports 32 bpp (8 8 8 0
RGBA).
VisionEgg WARNING (2002-11-27 17:01:16): Calculated frames per second was
9.440, while the
VISIONEGG_MONITOR_REFRESH_HZ variable is 100.0.
VisionEgg WARNING (2002-11-27 17:01:16): One or more frames took 582.3 msec,
which is signficantly
longer than the expected inter frame interval of 10.0 msec for your
frame rate (100.0 Hz).
VisionEgg info (2002-11-27 17:01:17): During the last "go" loop, 19 frames
were drawn.
Longest frame was 582.25 msec.
histogram:
10
*
9
*
8
*
7
*
6
*
4
*
3
*
2 *
*
1 * *
*
0 * * * * *
*
Time: 0 2 4 6 8 10 12 14 16 18 20 22 24 26
28 30 32 34 36 +(msec)
Total: 0 0 0 0 0 0 1 0 1 1 2 0 3
0 0 0 0 0 11
***************************************************************************
My videocard is nVidea GeForce MX 100/200 and the refresh rate is set at 100
herz. I work with windows 2000
Could you please explain why I still get these warnings.
Thank you in anticipation!
Kind regards, Joyca Lacroix
j.lacroix@xxxxxxxxxxxxx
----- Original Message -----
From: "Andrew Straw" <andrew.straw@xxxxxxxxxxxxxxx>
To: <visionegg@xxxxxxxxxxxxx>
Sent: Friday, November 22, 2002 2:15 AM
Subject: [visionegg] Re: timing in vision egg
>
> Hi Joyca,
>
> It's within a single "go loop" that the Vision Egg is able to maintain
> timing accuracy, but your code starts a "go loop" each time you want to
> display a new stimulus. The go loop itself is lasting the duration you
> specify. Because your program doesn't clear the screen after the go
> loop finishes, the last frame drawn is displayed for too long -- the
> duration it takes for the next go loop to start. In this case, an
> image must be read in from file, so it takes a while. The simplest
> solution is to pre-load all your images like this: (This would
> minimize the wait, although it still may not be absolutely temporally
> precise because multiple go loops are still spawned.)
>
> *****************************************************
> preloaded_stimulus_list = []
> for i in range(0, len(photoX)):
> texture = TextureFromFile(photoX[i])
> stimulus = TextureStimulus(texture = texture,
> size = texture.orig.size,
> shrink_texture_ok=1)
> preloaded_stimulus_list.append( stimulus )
>
> viewport = Viewport(screen=screen)
> p = Presentation(go_duration=(0.5,'seconds'),viewports=[viewport])
>
> for i in range(0, len(photoX)):
> viewport.parameters.stimuli = [preloaded_stimulus_list[i]]
> p.go()
> *****************************************************
>
> The "ultimate" way would be to do everything in a single go loop,
> thereby ensuring timing across all your images. This requires a
> Controller to select the image used.
>
> *****************************************************
> duration_per_image = 0.5 # seconds
> num_images = len(photoX)
>
> # Create list of stimuli
> preloaded_stimulus_list = [] # empty at first
> for i in range(num_images):
> # Read the texture file
> texture = TextureFromFile(photoX[i])
>
> # Load the texture to OpenGL, prepare for display
> stimulus = TextureStimulus(texture = texture,
> size = texture.orig.size,
> shrink_texture_ok=1)
>
> # Add to list of stimuli
> preloaded_stimulus_list.append( stimulus )
>
> def image_selector( t ):
> i = int(t/duration_per_image)
> return [ preloaded_stimulus_list[i] ]
>
> viewport = Viewport(screen=screen)
> p = Presentation(go_duration=(duration_per_image *
> num_images,'seconds'),viewports=[viewport])
> p.add_controller(viewport,'stimuli',
> FunctionController(during_go_func=image_selector) )
> p.go()
> *****************************************************
>
> Hopefully this helps.
>
> Cheers!
> Andrew
>
> On Thursday, November 21, 2002, at 09:08 PM, Joyca Lacroix wrote:
>
> > L.S.
> >
> > Currently I'm working on a psychological experiment in which I present
> > (timed) images of faces (tif format). I'm trying to present the images
> > in a sequence, every image for 1 second. Because I have only just
> > begun using vision egg I took one of the demo's in the VisionEgg
> > folder as a strating point (texture.py).
> > I notice that when I present the pictures, the timing becomes less and
> > less precise (after a few images the presentation takes up to 2 sec.
> > and this delay becomes larger and larger)
> > here is part of my code:
> > ************************************************
> > for i in range(0, len(photoX)):
> > texture = TextureFromFile(photoX[i])
> > stimulus = TextureStimulus(texture = texture,
> > size = texture.orig.size,
> > shrink_texture_ok=1)
> > viewport = Viewport(screen=screen,
> > stimuli=[stimulus])
> > p = Presentation(go_duration=(0.5,'seconds'),viewports=[viewport])
> >
> > p.go()
> > *****************************************************
> >
> > Can you help me get the timing more precise? (the problem is not my
> > videocard)
> >
> > Thank you in anticipation
> > Greetings, J.L.
> >
> > j.lacroix@xxxxxxxxxxxxx
> > ======================================
> > The Vision Egg mailing list
> > Archives: http://www.freelists.org/archives/visionegg
> > Website: http://www.visionegg.org/mailinglist.html
>
> ======================================
> The Vision Egg mailing list
> Archives: http://www.freelists.org/archives/visionegg
> Website: http://www.visionegg.org/mailinglist.html
>
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- Follow-Ups:
- [visionegg] Re: WARNINGs in the log file
- From: Andrew Straw
- References:
- [visionegg] Re: timing in vision egg
- From: Andrew Straw
Other related posts:
- » [visionegg] WARNINGs in the log file
- » [visionegg] Re: WARNINGs in the log file
- » [visionegg] Re: WARNINGs in the log file
- [visionegg] Re: WARNINGs in the log file
- From: Andrew Straw
- [visionegg] Re: timing in vision egg
- From: Andrew Straw