When you create a rectangular aperture using 4 vertices, the aperture object ignores the units that I specify in the object creation. Instead, it keeps the units of the window.
from psychopy import visual
import numpy as np
stimWin = visual.Window(
[1000,800],screen = 0,fullscr = False,
monitor = 'tryMonitor',units = 'deg',allowStencil = True,
)
gratingBack = visual.GratingStim(
stimWin,tex = 'sqr',mask = None,units = 'deg',
maskParams = None,pos = (0.0, 0.0),size = [30],sf = 0.5,
ori = 0.0,phase = (0.0, 0.0),texRes = 128,contrast = 0.9,
opacity = 1.0,autoDraw = False
)
mask = np.array([(-5, 3),(-5, -3),(5, -3),(5, 3)])
rectMak = visual.Aperture(
stimWin,
size = 1,
units = 'pix',
shape = mask,
)
for i in range(120):
gratingBack.phase += 0.01
gratingBack.draw()
stimWin.flip()
changing the units value of the rectMask in ‘deg’, or ‘norm’ does not have any effect.
Is this the expected behavior? Is there a way to specifically select units for the aperture that are different from the window’s unit?