[open] xpyriment does not force vsync per default: should we warn users?
A colleague just informed me that he thought he had seen some irregularities in displaying stimuli using the xpyriment back-end. After a quick test, I noticed that he was right. The script below is a simple test that should rapidly alternate the monitor colour (either black or white). It works perfectly with the legacy and psycho back-ends. With xpyriment, however, black and white lines appear on screen together! This is a clear sign of not waiting for the vertical refresh.
This behaviour only occurs when the vsync is not explicitly enabled in the graphics card settings, which will not come as a surprise to you (when it is forced, xpyriment behaves correctly). However, I think it would be a good idea to more explicitly warn users about this. Granted: the enabling of the v-sync is mentioned in the documentation of expyriment (and probably on osdoc too). But this is quite hard to miss and regular Intel graphics cards do not seem to have the option of enabling it (tested on a student's new windows 8 laptop: could not find ANY option for v-syncing anywhere!).
Of course, we could assume that the users that think timing is critical, all use computers with decent enough specifications and are aware of the fact that the syncing should be enabled. But I still think we should warn people about this and consider using either the psycho or the legacy as default back-end (since these DO enable the sync, regardless of the graphics card settings).
from openexp.canvas import canvas from openexp.keyboard import keyboard # create objects canvas1 = canvas(exp) canvas1.clear(color='white') canvas2 = canvas(exp) canvas2.clear(color='black') kb = keyboard(exp) # run until keypress while True: canvas1.show() canvas2.show() if kb.get_key(timeout=0): break