Previous topic

Window

Next topic

BufferImageStim

This Page

Quick links

Aperture

class psychopy.visual.Aperture(win, size, pos=(0, 0), ori=0, nVert=120, shape='circle', units=None, name='', autoLog=True)

Restrict a stimulus visibility area to a basic shape (circle, square, triangle)

When enabled, any drawing commands will only operate on pixels within the Aperture. Once disabled, subsequent draw operations affect the whole screen as usual.

See demos/stimuli/aperture.py for example usage

Author :2011, Yuri Spitsyn 2011, Jon Peirce added units options, Jeremy Gray added shape & orientation
disable()

Disable the Aperture. Any subsequent drawing operations will not be affected by the aperture until re-enabled.

enable()

Enable the aperture so that it is used in future drawing operations

NB. The Aperture is enabled by default, when created.

setPos(pos, needReset=True)

Set the pos (centre) of the Aperture

setSize(size, needReset=True)

Set the size (diameter) of the Aperture