folderasfen.blogg.se

Psychopy pyglet joystick
Psychopy pyglet joystick








psychopy pyglet joystick
  1. PSYCHOPY PYGLET JOYSTICK DRIVERS
  2. PSYCHOPY PYGLET JOYSTICK LICENSE

MovieStim( win, 'videos/baby_laugh.mp4', flipVert = False, flipHoriz = False, loop = False)ħ mov. in 4 colorSpace = 'rgb', color =, allowGUI = True, winType = 'pygame')ĥ - > 6 mov = visual. AttributeError Traceback ( most recent call last) size = value # _shape is a ShapeStim self. setter def size ( self, value ): WindowMixin. Use setSize() if you want to control logging and resetting. :ref:`Operations ` supported here as well as ShapeStim. This essentially controls a :class:`.ShapeStim` so see documentation for ShapeStim.size. glPopMatrix () def size ( self ): """Set the size (diameter) of the Aperture. GL_ALPHA_TEST ) else : # draw without push/pop matrix self. enabled = True # attributeSetter, turns on. You have to explicitly turn resetting off by setting self._needReset = False """ if not self.

psychopy pyglet joystick

def _reset ( self ): """Internal method to rebuild the shape - shouldn't be called by the user. pos = pos # set autoLog now that params have been initialised wantLog = autoLog is None and self.

psychopy pyglet joystick

Also sets # self._needReset = True on every call self. _needReset = True # Default when setting attributes # implicitly runs a self.enabled = True. win, vertices = vertices, fillColor = 1, lineColor = None, colorSpace = 'rgb', interpolate = False, pos = pos, size = size, anchor = anchor, autoLog = False, units = self. _dict_, pos = pos, size = size, autoLog = False, units = self. Expected 'circle'," " 'square', 'triangle', vertices, filename, or None " " got %s " ) logging. _dict_ = shape else : msg = ( "Unrecognized shape for aperture. lower () if shape is None or shape = 'circle' : # NB: pentagon etc point upwards by setting x,y to be y,x # (sin,cos): vertices = elif isinstance ( shape, int ): # if given a number, take it as a number of vertices and behave as if shape='circle and nVerts=shape vertices = elif shape = 'square' : vertices =, ,, ] elif shape = 'triangle' : vertices =, , ] elif type ( shape ) in and len ( shape ) > 2 : vertices = shape elif isinstance ( shape, str ): # is a string - see if it points to a file if os. units # set vertices using shape, or default to a circle with nVerts edges if hasattr ( shape, 'lower' ) and not os. _dict_ = False # unit conversions if units != None and len ( units ): self. error ( 'Aperture has no effect in a window created ' 'without allowStencil=True' ) core. autoLog = False # change after attribs are set self. _init_ ( name = name, autoLog = False ) # set self params self. remove ( 'self' ) super ( Aperture, self ). contains() option 2015, Thomas Emmerling added ImageStim option """ def _init_ ( self, win, size = 1, pos = ( 0, 0 ), anchor = None, ori = 0, nVert = 120, shape = 'circle', inverted = False, units = None, name = None, autoLog = None ): # what local vars are defined (these are the init params) for use by # _repr_ self. See demos/stimuli/aperture.py for example usage :Author: 2011, Yuri Spitsyn 2011, Jon Peirce added units options, Jeremy Gray added shape & orientation 2014, Jeremy Gray added. in a PNG file) will not be included in the mask shape. Note that transparent parts in the image (e.g. Supported shapes: * 'square', 'triangle', 'circle' or `None`: a polygon with appropriate nVerts will be used (120 for 'circle') * integer: a polygon with that many vertices will be used * list or numpy array (Nx2): it will be used directly as the vertices to a :class:`~` * a filename then it will be used to load and image as a :class:`~`. Once disabled, subsequent draw operations affect the whole screen as usual. When enabled, any drawing commands will only operate on pixels within the Aperture. class Aperture ( MinimalStim, ContainerMixin ): """Restrict a stimulus visibility area to a basic shape or list of vertices. gl import psychopy # so we can get the _path_ from psychopy import logging, core import psychopy.event # tools must only be imported *after* event or MovieStim breaks on win32 # (JWP has no idea why!) from import cm2pix, deg2pix, convertToPix from import attributeSetter, setAttribute from import BaseShapeStim from import ImageStim from import MinimalStim, ContainerMixin, WindowMixin import numpy from numpy import cos, sin, radians from nstants import STARTED, STOPPED

PSYCHOPY PYGLET JOYSTICK DRIVERS

# Shaders will work but require OpenGL2.0 drivers AND PyOpenG元.0+ import pyglet pyglet. import os # Ensure setting pyglet.options to False is done prior to any # other calls to pyglet or pyglet submodules, otherwise it may not get picked # up by the pyglet GL engine and have no effect.

PSYCHOPY PYGLET JOYSTICK LICENSE

# Distributed under the terms of the GNU General Public License (GPL). """ # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd. #!/usr/bin/env python # -*- coding: utf-8 -*- """Restrict a stimulus visibility area to a basic shape or list of vertices.










Psychopy pyglet joystick