psychopy.org | Reference | Downloads | Github

refreshTest parameter of RunTimeInfo not honoured if win=None?

It appears that passing anything for “refreshTest” into RunTimeInfo() is ignored and replaced with refreshTest=grating if no window is supplied.

So:

from psychopy.info import RunTimeInfo

r = RunTimeInfo(refreshTest=None)

Should run without the refresh test, but instead the grating test is run. However, if a window is created first and passed in:

from psychopy.info import RunTimeInfo
from psychopy.visual import Window

w = Window()
r = RunTimeInfo(win=w, refreshTest=None)

Then the new window is created, and no refresh test is performed.

I believe this line is forcing the refreshTest to “grating” regardless of the passed in option: https://github.com/psychopy/versions/blob/e42533798a74c3a06452bdb2c7643120c6e5109a/psychopy/info.py#L141

Is there a reason a grating test is forced if no window is specified? Seems like the option should be honoured, or at least the documentation be updated to note this behaviour.

Using PsychoPy 1.90.1 on Windows 10

Hi @danbjorn, according to the RunTimeInfo code, a window is needed for frame timing, and some of the OpenGL drivers need a window open. Thus, when no window is supplied, a temporary window is created and refreshTest is set to ‘grating’. However, the reason for redefining refreshTest = 'grating' is not clear, because ‘grating’ is already the default option if refreshTest is not passed an argument. If refreshTest is not redefined at line 141, it should operate as the user requests, the difference being that when ‘refreshTest’ is None, then no refresh data is returned.

Thanks @dvbridges

I get why the temporary window is opened (although I note that you can override window creation by setting win=False), I don’t get why the grating test is forced? Particularly as the test isn’t forced if a window is passed in, so it can’t be anything to do with OpenGL compatibility.

Surely it should honour the setting of refreshTest regardless of whether the window is passed in or a temporary window is used?

Regardless, if this behaviour remains, perhaps the docs should be updated to reflect this behaviour - I can put a pull request together if that’s helpful

1 Like

Sorry to put this on you @dvbridges, but what do you think I should do next? I can raise this in the dev list, or raise an issue, or just create a pull request?

Don’t really want to leave this unfinished!

Hi @danbjorn, if you would like, you could resolve the issue in your local code repository and following these guidelines submit a pull request on Github (https://github.com/psychopy/psychopy) :slight_smile:

Will do, thanks @dvbridges!