Skip to content

kclamar/stimpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI version PyPI pyversions Documentation Status Code style: black Imports: isort Checked with mypy

StimPy

StimPy is a thin PsychoPy wrapper to simplify the creation of visual stimuli.

Installation

Use the package manager pip to install StimPy.

pip install stimpy

Usage

import stimpy as sp

circle = sp.visual.Circle(
    size=(2, 2), fillColor=(1, 1, 1),
    pos=sp.Animate([(-40, -20), (-40, 20), (40, 20), (40, -20)], [1, 1, 1, 1])
)

scene = sp.Scene(color=(-1, -1, -1), units="deg")
scene.add(circle, begin=0, dur=4)

win = sp.Window(distance=13, width=26)
trial = sp.Trial(scene, win=win)
trial.start()

trial.save_movie("example.mp4", fps=60)