Remove a channel from the window

Hello,
What I am trying to do is to use only two channels for my stimulus. Basically, I would like to have the red always to 0 (in rgb255 notation).
I tried different methods, like using my window in “add” or “avg” mode, but none could solve this problem.

With the add mode, I understood that black values are for subtracting color so I tried:
having a turquoise window ([-1,0,0])
add a grating stimulus
add a rectangle on the whole image with values [-1,0,0] -> The red should be subtracted and green/blue unchanged

BlendMode doc
Quote from documentation for blendMode add:
“The sum is performed using the signed values of the color representation in PsychoPy, with the mean grey being represented by zero. So a dark patch added to a dark background will get even darker”

Many thanks !

I found a solution for this, but still it doesn’t match the documentation. Is the doc outdated ?

Set the window blendMode on “add” , and set the windows background as [-1,-1,-1]
My grating stimulus set with color [0,1,1]
Then I need to draw two times my stimulus to have the right intensities

The first weird thing are that it works with color for stimulus as [0,1,1]. With [-1,1,1], the grating is alternation of turquoise and red. Why ? What is this color in grating used for, shouldn’t there an easiest way to suppress a color ?

Thanks

You can stop drawing affecting the red channel by:

import pyglet.gl
pyglet.gl.glColorMask(0, 1, 1, 1)

2 Likes