| Reference | Downloads | Github

Trying to rotate texture of gratingStim but not mask

Hi all,

I have a gratingStim with a texture (noise - numpy array) and a numpy array mask that essentially blocks out two circles inside the texture.

What I’d like to do is rotate the texture (underneath the mask) every few frames, whilst keeping those blocked out circles (mask) in the same place.

My problem is that rotating the stimulus (e.g. changing stim.ori), obviously rotates both texture and mask. Is there any way to rotate the texture whilst keeping the mask in the same place?

Thanks in advance for any help!

No, the stimulus mask does always rotate with the stimulus.

You can use the aperture to create a mask of sorts. It masks all stimuli drawn when you enable it, and it can only have values of visible/not visible rather than the full alpha values that stimulus masks support. But it might be enough for what you need.