Home | | News | | Documentation | | Tutorial | | Screen Cast | | Download | |

Getting started

One of the first steps you should take is defining global variables. The Experiment class in the pypsyexp library requires three variables passed to it. In lines 24-40, we define all the variables that we will be using in the experiment. Of particular importance are the experimentname, laptop, LAPTOPRES and FULLSCREENRES variables.



In line 46, we have our main class inherit from the Experiment class that is in pypsyexp.py. For the initialization, we pass our main class StroopExperiment, laptop, experimentname, and experimentversion. In order to initialize the Experiment class, we pass the laptop, experimentname, and screenres variables. The Experiment class will set up the display window based on the value passed in addition to the main Surface, self.screen. The title of the experiment will be taken from experimentname.

If laptop is True it will display in a windowed mode in a screen resolution of LAPTOPRES , which here is 800x800. Otherwise it will be displayed full screen with resolution of FULLSCREENRES. Note that if the resolution passed does not match the resolution of the screen it is displayed on, the images will stretch or compress resulting in loss of detail.



See documentation on:

class Experiment




Previous || 1 2 3 4 5 6 7 8 || Next


Our work is supported by grants from


Copyright 2008-2013 - Todd Gureckis - New York University