Problems with setGamma in 1.90.x PY3

Hi,
I use setGamma from the gamma module to set up a linear lut in my graphics card so that I can send Bits# T-Lock codes without them being currupted.

The PY3 verison of 1.90.x seems to defaultto laoding a version of the gamma module from vision.backends. This version does not seem to use the pygetlet window handle but instead wants the ScreenID. However it fails to set the LUT even with 10 attempts.

Reverting to the gamma module in visual has issues with the pygletWindow._dc attribute that we’ve met before and in PY2 could be fixed by rolling back the version of pyglet - but I guess might not work for PY3.

Any advice on how to proceed with setting the graphics card gamma in PY3 ?

Thanks
Andrew

Hi Andrew,

Which OS is this with?

Sorry, Win7 Enterprise, 64-bit

Can you post some demo code that produces the error, and the error message?

The following code now works.
However the win.winHandle._dc is needed because PsychoPy is defaluting to visual.backends.gamma not visual.gamma as one might think. visual.gamma would automatically find the ._dc from the handle but the backends version wants it made explicite.

from psychopy.visual import gamma
from psychopy.hardware import crs

bits = crs.BitsSharp(win, mode=‘mono++’)
gamma.setGamma(win.winHandle._dc, 1.0, 1)