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 11-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 26, we have our main class inherit from the Experiment class that is in pypsyexp.py. For the initialization, we pass our main class Direction, 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 1024x768. 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.

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

Our work is supported by grants from

Copyright 2008-2013 - Todd Gureckis - New York University