Briefly about PsychoPy

I watched somehow the software available in the Ubuntu application center and came across a thing called "PsychoPy - a program for creating experiments in neurology and experimental psychology." In the search bar, habrahabr entered “PsychoPy” and the search did not tell me anything interesting. I decided to google and tell the community at the same time about what this thing is.

So meet. PsychoPy.

PsyсhoPy - software written in Python and using OpenGL to generate various irritants on a PC. The program is designed to create experiments in neurology and psychology. The user can create various visual and auditory stimuli (stimulants) and interact with external devices (electroencephalography, MEG, image brain activity and other interesting devices). The script structure is simple and straightforward. PsychoPy also allows you to generate movies and a sequence of images that can help simulate neurological experiments.


Most of the experiments in modern neurology do not take place without the presentation of auditory or visual stimuli in order to trace the activity of GM / to study the influence of stimuli, etc. ... Therefore, PsychoPy was invented in order to make life easier when carrying out a kind of experimentation. PsychoPy is the power of the Python language and several cross-platform libraries for Python. PsyhoPy is completely platform independent and can be used on Windows, Mac OS X and Linux.


Modeling language - Python.
Hardware Accelerated Graphics (OpenGL)
independent software Modular structure (for example, the line imports modules for visual stimuli and events from the subject of the experiment):

from psychopy import visual, core, event

Built-in code editor (PsychoPyIDE), supporting code-completion, code-folding.


PathStim is one of the most commonly used. Used to control the viral area on the screen. It may consist of bitmap data, textures, photos. Supports alpha masks. They can be manipulated in real time in different ways: rotate, phase shift, change the number of cycles, etc. It is used to study the influence of graphic information.

TextStim - text stimuli (orders, text information). Unicode support. Color, rotation.

Sound - audio irritants. Supports mpg, wav files, set sound using notes and octaves, etc. Support Stereo.

DotStim - a pattern of random points (aka Random Dot Kinematogram) - is an array of points or an array of other stimuli (for example, PathStim).

MovieStim - video annoyance. Support for various formats (Mpeg, DivX, avi, Quicktime). Supports transformation (rotation, stretching, etc.)

PsychoPy provides simple and complete access to input / output devices via serial and parallel ports (including USB serial / parallel emulators)

And finally, an example script (video player):
from psychopy import core, visual, event
from numpy import ceil   
#устанавливаем окно для мувика
myWin=visual.Window((1000,1000), allowGUI=False)                   
#наш мувик
mov=visual.MovieStim(myWin, 'stimulus_movie.mp4', flipVert=False)  
#выставляем fps
#количество кадров
#movie duration в секундах
print mov.duration                                                 
#высота ширина мувика  
print mov.format.width, mov.format.height                          
#инициализация счётчика
#показываем первый кадр
#бежим по всем кадрам
while t < total_frames:                                            
	#к следующему кадру
	#показывае следующий кадр
   #инкремент счётчика

Useful links:
Official site
Generating stimuli for neurosince using PsychoPy by JWPeirce
PsyhoPy on the Neural Wiki

Also popular now: