psychopy.org | Reference | Downloads | Github

Match mean screen luminance to mean luminance of stimuli drawn


#1

I have a simple experiment built in the coder in psychopy - where I’m presenting garbor patches with different shapes ( eg. circle, square, etc) on a gray background/screen.
I need to find a way to obtain the mean luminance of my backgroud screen (window) , specified below, and also the mean luminance of my stimuli being drawn in the screen. All this so I can ultimately change or match the luminance of the background screen with that of the stimuli.
Hopefully my problem makes sense, I’m a little stuck as to where to start. Any help/suggestions greatly appreciated!

#Gray window
win = visual.Window(size=(1680, 1050), fullscr=False, screen=0, allowGUI=False, allowStencil=False,
monitor=‘G89’, color=[0.3,0.3,0.3], colorSpace=‘rgb’, units=‘deg’)

#Garbor Patch stimuli example
myGratingLeft= visual.GratingStim(win, tex=‘sin’, sf=[0.03,0], texRes=256, mask= polyShapeLeft, units=‘pix’,contrast= 0.5, size=masksizeLeft, pos=[-1.7, 0])


#2

Luminance is a physical measure and at the end of the day, you strictly need a physical measurement with a photometer to verify this stuff. But hopefully this material by Jon is useful:

http://www.psychopy.org/recipes/isoluminance.html


#3

Hello,

I am also trying to match the mean luminace of background with that of stimuli. Have you figured out how to do that? I would really apprecaite if you have any suggestions.

Best,
Xin


#4

I didn’t figure it out, sorry. Good luck!


#5

PsychoPy’s grating colors are designed to balance around the mean grey, so I think you do not need to worry about this problem. However, I used a black background so I am really concerned about it. Otherwise, my subjects will respond to brightness instead of Gabor with cetain spatial frequency. Anyway, thank you all the same!


#6

It’s impossible if you are using a uniform black background since the mean luminance is zero.


#7

Bumping this up again. Did anyone figure out how to equate background luminance with stimulus luminance?