Drawing gratings with a specific mean luminance and contrast range

Hi,

I want to create grating stimuli. My screen is extremely bright (200cd/m2) and I want my stimuli and experiments to run at a mean luminance of 40cd/m2 (so max brightness of 80cd/m2). I have no way of turning down the brightness of the screen. Is there a way to define gratings with known mean luminance and contrast range (i.e., known amplitude of modulation around the mean) ?

In the modern world of uber bright and accurate monitors, there has to be a way to operate only in a sub-range of the possible brightness levels!

Cheers,
Tushar

It would be good to know what monitor you are using. Remember, the only way to know luminance is to measure it. You cannot guess in experimental work. Worse, sometimes subjects or labmates fiddle with controls, wires, or even swap monitors, etc so you need to check it before every run. I have some suggestions, but I need more info.

There are several ways in psychopy to specify the values given to the monitor. Look for
… coder/stimuli/plaid.py
in your psychopy installation.

Hi,

Thank you for the input! I have calibrated each channel of my display and estimated the gamma-grid that psychopy needs (columns 0,1,2, and 4 - I don’t know what columns 3 and 5 encode…). So the display is well calibrated. This is not about calibration.

I am trying to figure out if you can use a sub-range of my display’s entire range of luminance to display stimuli. If the display goes from 0 to 200 cd/m2, can one display gratings with mean luminance of, say, 50cd/m2 and a peak-to-peak of, say, 30cd/m2. So far, the only likely solution I have found is to use an alpha-mask, but that does not seem very intuitive or reliable.

Couldn’t you use the Opacity method? Draw your grating as you want it then put Opacity to 0.5. This should drop the mean from 100 to 50 cd/m2 and scale all value of the waveform proportionally?

Opacity of the stimulus (1=opaque, 0=fully transparent, 0.5=translucent). Leave blank for each color to have its own opacity (recommended if any color is None).

Yes. I somehow don’t like the idea of a translucency mask over the image. But I agree, as it stands right now, it is the only way to accomplish what I want with the gratings. Eventually I will also be working in other stimuli into my studies so I wanted to see if there is a way to have psychopy use only a sub-range of the possible luminances offered by the screen. I think the answer is an overwhelming no, unless there is a global mapping that can be implemented somewhere.

Does setting the Foreground color (under Appearance) to something like
$[0.5,0.5,0.5] work? This seems to create a grating with reduced mean luminance and proportionally scaled contrast.

1 Like

Thank you for the suggestion. We are running some experiments on the rig toay now, but can’t wait to try this on Monday! It would be the solution to so many problems (for me) if if this worked !!

tc