Envelope Grating

To import EnvelopeGrating, you can either use: `python from psychopy_visionscience.secondorder import EnvelopeGrating ` or, any time after psychopy.plugins.activatePlugins has been called: `python from psychopy.visual import EnvelopeGrating `

class psychopy_visionscience.secondorder.EnvelopeGrating(win, carrier='noise', mask='none', envelope='sin', anchor='center', units='', pos=(0.0, 0.0), size=None, sf=None, envsf=None, ori=0.0, envori=0.0, phase=(0.0, 0.0), envphase=(0.0, 0.0), beat=False, texRes=128, rgb=None, dkl=None, lms=None, color=(1.0, 1.0, 1.0), colorSpace='rgb', contrast=0.5, moddepth=1.0, power=1.0, opacity=1.0, depth=0, rgbPedestal=(0.0, 0.0, 0.0), interpolate=False, blendmode='avg', name=None, autoLog=None, autoDraw=False, maskParams=None)[source]

Second-order envelope stimuli with 3 textures; a carrier, an envelope and a mask

Examples

env1 = EnvelopeGrating(win,ori=0, carrier=’sin’, envelope=’sin’,

mask = ‘gauss’, sf=24, envsf=4, size=1, contrast=0.5, moddepth=1.0, envori=0, pos=[-.5,.5],interpolate=0) # gives a circular patch of high frequency carrier with a # low frequency envelope

env2 = EnvelopeGrating(win,ori=0, carrier=noise, envelope=’sin’,

mask = None, sf=1, envsf=4, size=1, contrast=0.5, moddepth=0.8, envori=0, pos=[-.5,-.5],interpolate=0) # If noise is some numpy array containing random values gives a # patch of noise with a low frequency sinewave envelope

env4 = EnvelopeGrating(win,ori=90, carrier=’sin’, envelope=’sin’,

mask = ‘gauss’, sf=24, envsf=4, size=1, contrast=0.5, moddepth=1.0, envori=0, pos=[.5,.5], beat=True, interpolate=0) # Setting beat will create a second order beat stimulus which # critically contains no net energy at the carrier frequency # even though it appears to be present. In this case carrier # and envelope are at 90 degree to each other

With an EnvelopeStim the carrier and envelope can have different spatial frequencies, phases and orientations. Its position can be shifted as a whole.

contrast controls the contrast of the carrier and moddepth the modulation depth of the envelope. contrast and moddepth must work together, for moddepth=1 the max carrier contrast is 0.5 otherwise the displayable range will be exceeded. If moddepth < 1 higher contrasts can be accommodated.

Opacity controls the transparency of the whole stimulus.

Because orientation is implemented very differently for the carrier and envelope using this function without a broadly circular mask may produce unexpected results

Using EnvelopeStim with images from disk (jpg, tif, png, …)

Ideally texture images to be rendered should be square with ‘power-of-2’ dimensions e.g. 16x16, 128x128. Any image that is not will be upscaled (with linear interpolation) to the nearest such texture by PsychoPy. The size of the stimulus should be specified in the normal way using the appropriate units (deg, pix, cm, …). Be sure to get the aspect ratio the same as the image (if you don’t want it stretched!).

property RGB

Legacy property for setting the foreground color of a stimulus in RGB, instead use obj._foreColor.rgb

Type:

DEPRECATED

property anchor
autoDraw

Determines whether the stimulus should be automatically drawn on every frame flip.

Value should be: True or False. You do NOT need to set this on every frame flip!

autoLog

Whether every change in this stimulus should be auto logged.

Value should be: True or False. Set to False if your stimulus is updating frequently (e.g. updating its position every frame) and you want to avoid swamping the log file with messages that aren’t likely to be useful.

property backColor

Alternative way of setting fillColor

property backColorSpace

Deprecated, please use colorSpace to set color space for the entire object.

property backRGB

Legacy property for setting the fill color of a stimulus in RGB, instead use obj._fillColor.rgb

Type:

DEPRECATED

property backgroundColor

Alternative way of setting fillColor

beat

Beat (True) stimulus or full moduaiton (False)

‘The differences is that the spatial frequency components of the carrier are absent in a beat (although the carrier will still be a visible component of the overall image) whereas they are present in a full modulation. Beats will always appear to have a 100% modulation depth and if sinusoidal the modulation will appear to be twice the requested spatial frequency. The modulation depth of fully modulated stimuli can be varied and they appear at their true frequency. Both beats and full modulations appear in the literature and have specific uses.

blendmode

The OpenGL mode in which the stimulus is draw

Can the ‘avg’ or ‘add’. Average (avg) places the new stimulus over the old one with a transparency given by its opacity. Opaque stimuli will hide other stimuli transparent stimuli won’t. Add performs the arithmetic sum of the new stimulus and the ones already present.

property borderColor
property borderColorSpace

Deprecated, please use colorSpace to set color space for the entire object

property borderRGB

Legacy property for setting the border color of a stimulus in RGB, instead use obj._borderColor.rgb

Type:

DEPRECATED

borderWidth
carrier

Texture to use in the stimulus as a carrier, typically noise array.

This can be one of various options:
  • the name of an image file (most formats supported)

  • a numpy array (1xN or NxN) ranging -1:1

If specifying your own texture using an image or numpy array you should ensure that the image has square power-of-two dimesnions (e.g. 256 x 256). If not then PsychoPy will upsample your stimulus to the next larger power of two.

clearTextures()[source]

This will be used by the __del__ method of EnvelopeGrating

property color

Alternative way of setting foreColor.

property colorSpace

The name of the color space currently being used

Value should be: a string or None

For strings and hex values this is not needed. If None the default colorSpace for the stimulus is used (defined during initialisation).

Please note that changing colorSpace does not change stimulus parameters. Thus you usually want to specify colorSpace before setting the color. Example:

# A light green text
stim = visual.TextStim(win, 'Color me!',
                       color=(0, 1, 0), colorSpace='rgb')

# An almost-black text
stim.colorSpace = 'rgb255'

# Make it light green again
stim.color = (128, 255, 128)
contains(x, y=None, units=None)

Returns True if a point x,y is inside the stimulus’ border.

Can accept variety of input options:
  • two separate args, x and y

  • one arg (list, tuple or array) containing two vals (x,y)

  • an object with a getPos() method that returns x,y, such

    as a Mouse.

Returns True if the point is within the area defined either by its border attribute (if one defined), or its vertices attribute if there is no .border. This method handles complex shapes, including concavities and self-crossings.

Note that, if your stimulus uses a mask (such as a Gaussian) then this is not accounted for by the contains method; the extent of the stimulus is determined purely by the size, position (pos), and orientation (ori) settings (and by the vertices for shape stimuli).

See Coder demos: shapeContains.py See Coder demos: shapeContains.py

property contrast

A value that is simply multiplied by the color.

Value should be: a float between -1 (negative) and 1 (unchanged).

Operations supported.

Set the contrast of the stimulus, i.e. scales how far the stimulus deviates from the middle grey. You can also use the stimulus opacity to control contrast, but that cannot be negative.

Examples:

stim.contrast =  1.0  # unchanged contrast
stim.contrast =  0.5  # decrease contrast
stim.contrast =  0.0  # uniform, no contrast
stim.contrast = -0.5  # slightly inverted
stim.contrast = -1.0  # totally inverted

Setting contrast outside range -1 to 1 is permitted, but may produce strange results if color values exceeds the monitor limits.:

stim.contrast =  1.2  # increases contrast
stim.contrast = -1.2  # inverts with increased contrast
depth

DEPRECATED, depth is now controlled simply by drawing order.

doDragging()

If this stimulus is draggable, do the necessary actions on a frame flip to drag it.

draggable

Can this stimulus be dragged by a mouse click?

draw(win=None)

Draw the stimulus in its relevant window.

You must call this method after every MyWin.flip() if you want the stimulus to appear on that frame and then update the screen again.

Parameters:

win (~psychopy.visual.Window or None) – Window to draw the stimulus to. Context sharing must be enabled if any other window beside the one specified during creation of this stimulus is specified.

envelope

Texture to use on the stimulus as a envelope, typically a grating.

This can be one of various options:
  • ‘sin’,’sqr’, ‘saw’, ‘tri’, None (resets to default)

  • the name of an image file (most formats supported)

  • a numpy array (1xN or NxN) ranging -1:1

If specifying your own texture using an image or numpy array you should ensure that the image has square power-of-two dimesnions (e.g. 256 x 256). If not then PsychoPy will upsample your stimulus to the next larger power of two.

envori

The orientation for the envelope texture (in degrees).

Should be a single value (scalar). Operations are supported. Orientation convention is like a clock: 0 is vertical, and positive values rotate clockwise. Beyond 360 and below zero values wrap appropriately. Note ori is inhertied from gratingStim and controls only the orientation of the carrier

envphase

Phase of the modulation in each dimension of the envelope texture.

Should be an x,y-pair or scalar

NB phase has modulus 1 (rather than 360 or 2*pi) This is a little unconventional but has the nice effect that setting phase=t*n drifts a stimulus at n Hz Note phase in inherited from GratingStim and controls the phase of the carrier

envsf

Spatial frequency of the envelope texture

Should be a x,y-pair or scalar or None. If units == ‘deg’ or ‘cm’ units are in cycles per deg or cm as appropriate. If units == ‘norm’ then sf units are in cycles per stimulus (and so envsf scales with stimulus size). If texture is an image loaded from a file then envsf=None defaults to 1/stimSize to give one cycle of the image. Note sf is inhertited from GratingStim and controls the spatial frequency of the carrier

property fillColor

Set the fill color for the shape.

property fillColorSpace

Deprecated, please use colorSpace to set color space for the entire object.

property fillRGB

Legacy property for setting the fill color of a stimulus in RGB, instead use obj._fillColor.rgb

Type:

DEPRECATED

property flip

1x2 array for flipping vertices along each axis; set as True to flip or False to not flip. If set as a single value, will duplicate across both axes. Accessing the protected attribute (._flip) will give an array of 1s and -1s with which to multiply vertices.

property flipHoriz
property flipVert
property fontColor

Alternative way of setting foreColor.

property foreColor

Foreground color of the stimulus

Value should be one of:
  • string: to specify a colorNames. Any of the standard html/X11 color names <http://www.w3schools.com/html/html_colornames.asp> can be used.

  • hexColors

  • numerically: (scalar or triplet) for DKL, RGB or

    other colorspaces. For these, operations are supported.

When color is specified using numbers, it is interpreted with respect to the stimulus’ current colorSpace. If color is given as a single value (scalar) then this will be applied to all 3 channels.

Examples

For whatever stim you have:

stim.color = 'white'
stim.color = 'RoyalBlue'  # (the case is actually ignored)
stim.color = '#DDA0DD'  # DDA0DD is hexadecimal for plum
stim.color = [1.0, -1.0, -1.0]  # if stim.colorSpace='rgb':
                # a red color in rgb space
stim.color = [0.0, 45.0, 1.0]  # if stim.colorSpace='dkl':
                # DKL space with elev=0, azimuth=45
stim.color = [0, 0, 255]  # if stim.colorSpace='rgb255':
                # a blue stimulus using rgb255 space
stim.color = 255  # interpreted as (255, 255, 255)
                  # which is white in rgb255.

Operations work as normal for all numeric colorSpaces (e.g. ‘rgb’, ‘hsv’ and ‘rgb255’) but not for strings, like named and hex. For example, assuming that colorSpace=’rgb’:

stim.color += [1, 1, 1]  # increment all guns by 1 value
stim.color *= -1  # multiply the color by -1 (which in this
                    # space inverts the contrast)
stim.color *= [0.5, 0, 1]  # decrease red, remove green, keep blue

You can use setColor if you want to set color and colorSpace in one line. These two are equivalent:

stim.setColor((0, 128, 255), 'rgb255')
# ... is equivalent to
stim.colorSpace = 'rgb255'
stim.color = (0, 128, 255)
property foreColorSpace

Deprecated, please use colorSpace to set color space for the entire object.

property foreRGB

Legacy property for setting the foreground color of a stimulus in RGB, instead use obj._foreColor.rgb

Type:

DEPRECATED

getAnchor()
getAutoDraw()
getAutoLog()
getBackColor()
getBackColorSpace()
getBackRGB()
getBackgroundColor()
getBeat()
getBlendmode()
getBorderColor()
getBorderColorSpace()
getBorderRGB()
getBorderWidth()
getCarrier()
getColor()
getColorSpace()
getContrast()
getDepth()
getDraggable()
getEnvelope()
getEnvori()
getEnvphase()
getEnvsf()
getFillColor()
getFillColorSpace()
getFillRGB()
getFlip()
getFlipHoriz()
getFlipVert()
getFontColor()
getForeColor()
getForeColorSpace()
getForeRGB()
getHeight()
getInterpolate()
getLineColor()
getLineColorSpace()
getLineRGB()
getLineWidth()
getMask()
getMaskParams()
getModdepth()
getName()
getOpacity()
getOri()
getPhase()
getPos()
getPower()
getRGB()
getSf()
getSize()
getTex()
getTexRes()
getUnits()
getVertices()
getVerticesPix()
getWidth()
getWin()
get_borderPix()
property height
interpolate

Whether to interpolate (linearly) the texture in the stimulus.

If set to False then nearest neighbour will be used when needed, otherwise some form of interpolation will be used.

isDragging = False
property lineColor

Alternative way of setting borderColor.

property lineColorSpace

Deprecated, please use colorSpace to set color space for the entire object

property lineRGB

Legacy property for setting the border color of a stimulus in RGB, instead use obj._borderColor.rgb

Type:

DEPRECATED

lineWidth
mask

The alpha mask (forming the shape of the image).

This can be one of various options:
  • ‘circle’, ‘gauss’, ‘raisedCos’, ‘cross’

  • None (resets to default)

  • the name of an image file (most formats supported)

  • a numpy array (1xN or NxN) ranging -1:1

maskParams

Various types of input. Default to None.

This is used to pass additional parameters to the mask if those are needed.

  • For ‘gauss’ mask, pass dict {‘sd’: 5} to control

    standard deviation.

  • For the ‘raisedCos’ mask, pass a dict: {‘fringeWidth’:0.2},

    where ‘fringeWidth’ is a parameter (float, 0-1), determining the proportion of the patch that will be blurred by the raised cosine edge.

moddepth

Modulation depth or ‘contrast’ for the envelope component (0.0 - 1.0)

Sets the range of variation in carrier contrast. MD=(Cmax-Cmin)/(Cma+Cmin)

name

The name (str) of the object to be using during logged messages about this stim. If you have multiple stimuli in your experiment this really helps to make sense of log files!

If name = None your stimulus will be called “unnamed <type>”, e.g. visual.TextStim(win) will be called “unnamed TextStim” in the logs.

property opacity

Determines how visible the stimulus is relative to background.

The value should be a single float ranging 1.0 (opaque) to 0.0 (transparent). Operations are supported. Precisely how this is used depends on the blendMode.

ori

The orientation of the stimulus (in degrees).

Should be a single value (scalar). Operations are supported.

Orientation convention is like a clock: 0 is vertical, and positive values rotate clockwise. Beyond 360 and below zero values wrap appropriately.

overlaps(polygon)

Returns True if this stimulus intersects another one.

If polygon is another stimulus instance, then the vertices and location of that stimulus will be used as the polygon. Overlap detection is typically very good, but it can fail with very pointy shapes in a crossed-swords configuration.

Note that, if your stimulus uses a mask (such as a Gaussian blob) then this is not accounted for by the overlaps method; the extent of the stimulus is determined purely by the size, pos, and orientation settings (and by the vertices for shape stimuli).

See coder demo, shapeContains.py

phase

Phase of the stimulus in each dimension of the texture.

Should be an x,y-pair or scalar

NB phase has modulus 1 (rather than 360 or 2*pi) This is a little unconventional but has the nice effect that setting phase=t*n drifts a stimulus at n Hz.

property pos

The position of the center of the stimulus in the stimulus units

value should be an x,y-pair. Operations are also supported.

Example:

stim.pos = (0.5, 0)  # Set slightly to the right of center
stim.pos += (0.5, -1)  # Increment pos rightwards and upwards.
    Is now (1.0, -1.0)
stim.pos *= 0.2  # Move stim towards the center.
    Is now (0.2, -0.2)

Tip: If you need the position of stim in pixels, you can obtain it like this:

from psychopy.tools.monitorunittools import posToPix
posPix = posToPix(stim)
power

Will raise the modulator to the given power using the equation S=C*(1+M)^power where C is the carrier and M is the modulator. Only works with AM envelopes (hence +1) in equation. Power is ignored if a beat is requested. This is used to obtain the square root of the modulator (power = 0.5) which is useful if combining two envelope gratings with different carriers and a 180 degree phase shift as the resulting combined signal will not have any reduction in local contrast at any point in the image. This is similar - but not identical to the method used by Landy and Oruc, Vis Res 2002. Note overall contrast (apparent carrier contrast) will be altered.

setAnchor(value, log=None)
setAutoDraw(value, log=None)

Sets autoDraw. Usually you can use ‘stim.attribute = value’ syntax instead, but use this method to suppress the log message.

setAutoLog(value=True, log=None)

Usually you can use ‘stim.attribute = value’ syntax instead, but use this method if you need to suppress the log message.

setBackColor(color, colorSpace=None, operation='', log=None)
setBackColorSpace(value, log=None, operation=False, stealth=False)
setBackRGB(color, operation='', log=None)

DEPRECATED: Legacy setter for fill RGB, instead set obj._fillColor.rgb

setBackgroundColor(color, colorSpace=None, operation='', log=None)
setBeat(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setBlendmode(value, log=None)

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setBorderColor(color, colorSpace=None, operation='', log=None)

Hard setter for fillColor, allows suppression of the log message, simultaneous colorSpace setting and calls update methods.

setBorderColorSpace(value, log=None, operation=False, stealth=False)
setBorderRGB(color, operation='', log=None)

DEPRECATED: Legacy setter for border RGB, instead set obj._borderColor.rgb

setBorderWidth(newWidth, operation='', log=None)
setCarrier(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setColor(color, colorSpace=None, operation='', log=None)
setColorSpace(value, log=None, operation=False, stealth=False)
setContrast(newContrast, operation='', log=None)

Usually you can use ‘stim.attribute = value’ syntax instead, but use this method if you need to suppress the log message

setDKL(color, operation='')

DEPRECATED since v1.60.05: Please use the color attribute

setDepth(newDepth, operation='', log=None)

Usually you can use ‘stim.attribute = value’ syntax instead, but use this method if you need to suppress the log message

setDraggable(value, log=None, operation=False, stealth=False)
setEnvelope(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setEnvori(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setEnvphase(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setEnvsf(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setFillColor(color, colorSpace=None, operation='', log=None)

Hard setter for fillColor, allows suppression of the log message, simultaneous colorSpace setting and calls update methods.

setFillColorSpace(value, log=None, operation=False, stealth=False)
setFillRGB(color, operation='', log=None)

DEPRECATED: Legacy setter for fill RGB, instead set obj._fillColor.rgb

setFlip(value, log=None, operation=False, stealth=False)
setFlipHoriz(value, log=None, operation=False, stealth=False)
setFlipVert(value, log=None, operation=False, stealth=False)
setFontColor(color, colorSpace=None, operation='', log=None)
setForeColor(color, colorSpace=None, operation='', log=None)

Hard setter for foreColor, allows suppression of the log message, simultaneous colorSpace setting and calls update methods.

setForeColorSpace(value, log=None, operation=False, stealth=False)
setForeRGB(color, operation='', log=None)

DEPRECATED: Legacy setter for foreground RGB, instead set obj._foreColor.rgb

setHeight(value, log=None, operation=False, stealth=False)
setInterpolate(value, log=None, operation=False, stealth=False)
setLMS(color, operation='')

DEPRECATED since v1.60.05: Please use the color attribute

setLineColor(color, colorSpace=None, operation='', log=None)
setLineColorSpace(value, log=None, operation=False, stealth=False)
setLineRGB(color, operation='', log=None)

DEPRECATED: Legacy setter for border RGB, instead set obj._borderColor.rgb

setLineWidth(newWidth, operation='', log=None)
setMask(value, log=None)

Usually you can use ‘stim.attribute = value’ syntax instead, but use this method if you need to suppress the log message.

setMaskParams(value, log=None, operation=False, stealth=False)
setModdepth(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setName(value, log=None, operation=False, stealth=False)
setOpacity(newOpacity, operation='', log=None)

Hard setter for opacity, allows the suppression of log messages and calls the update method

setOri(newOri, operation='', log=None)

Usually you can use ‘stim.attribute = value’ syntax instead, but use this method if you need to suppress the log message

setPhase(value, operation='', log=None)

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setPos(newPos, operation='', log=None)

Usually you can use ‘stim.attribute = value’ syntax instead, but use this method if you need to suppress the log message.

setPower(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setRGB(color, operation='', log=None)

DEPRECATED: Legacy setter for foreground RGB, instead set obj._foreColor.rgb

setSF(value, operation='', log=None)

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setSf(value, log=None, operation=False, stealth=False)
setSize(newSize, operation='', units=None, log=None)

Usually you can use ‘stim.attribute = value’ syntax instead, but use this method if you need to suppress the log message

setTex(value, log=None)

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setTexRes(value, log=None)[source]

DEPRECATED. Use ‘stim.parameter = value’ syntax instead

setUnits(value, log=None, operation=False, stealth=False)
setVertices(value, log=None, operation=False, stealth=False)
setWidth(value, log=None, operation=False, stealth=False)
setWin(value, log=None, operation=False, stealth=False)
sf

Spatial frequency of the grating texture.

Should be a x,y-pair or scalar or None. If units == ‘deg’ or ‘cm’ units are in cycles per deg or cm as appropriate. If units == ‘norm’ then sf units are in cycles per stimulus (and so SF scales with stimulus size). If texture is an image loaded from a file then sf=None defaults to 1/stimSize to give one cycle of the image.

property size

The size (width, height) of the stimulus in the stimulus units

Value should be x,y-pair, scalar (applies to both dimensions) or None (resets to default). Operations are supported.

Sizes can be negative (causing a mirror-image reversal) and can extend beyond the window.

Example:

stim.size = 0.8  # Set size to (xsize, ysize) = (0.8, 0.8)
print(stim.size)  # Outputs array([0.8, 0.8])
stim.size += (0.5, -0.5)  # make wider and flatter: (1.3, 0.3)

Tip: if you can see the actual pixel range this corresponds to by looking at stim._sizeRendered

tex

Texture to used on the stimulus as a grating (aka carrier).

This can be one of various options:
  • ‘sin’,’sqr’, ‘saw’, ‘tri’, None (resets to default)

  • the name of an image file (most formats supported)

  • a numpy array (1xN or NxN) ranging -1:1

If specifying your own texture using an image or numpy array you should ensure that the image has square power-of-two dimensions (e.g. 256 x 256). If not then PsychoPy will up-sample your stimulus to the next larger power of two.

texRes

Power-of-two int. Sets the resolution of the mask and texture. texRes is overridden if an array or image is provided as mask.

Operations supported.

property units
updateColors()

Placeholder method to update colours when set externally, for example updating the pallette attribute of a textbox

updateOpacity()

Placeholder method to update colours when set externally, for example updating the pallette attribute of a textbox.

property vertices
property verticesPix

This determines the coordinates of the vertices for the current stimulus in pixels, accounting for size, ori, pos and units

property width
property win

The Window object in which the stimulus will be rendered by default. (required)

Example, drawing same stimulus in two different windows and display simultaneously. Assuming that you have two windows and a stimulus (win1, win2 and stim):

stim.win = win1  # stimulus will be drawn in win1
stim.draw()  # stimulus is now drawn to win1
stim.win = win2  # stimulus will be drawn in win2
stim.draw()  # it is now drawn in win2
win1.flip(waitBlanking=False)  # do not wait for next
             # monitor update
win2.flip()  # wait for vertical blanking.

Note that this just changes default window for stimulus.

You could also specify window-to-draw-to when drawing:

stim.draw(win1)
stim.draw(win2)

Back to top