API Reference¶
Experiment¶
Main interface¶
|
Main object for controlling experiment execution. |
Methods that must be defined for each study¶
Initialize study-specific stimulus objects. |
|
Generator that yields data for each trial. |
|
|
Execute an individual trial of the experiment. |
Methods that can be overridden to control execution¶
|
Augment the command line parser to set params at runtime. |
|
Serialize the trial results so they can be be sent to the remote. |
Write out data files at the end of the run. |
|
Extract performance metrics from trial data log. |
|
|
Show end-of-run feedback to the subject about performance. |
Execution methods¶
|
Generator of trial index. |
|
Generate a Series with trial information. |
Check whether the quit key has been pressed and exit if so. |
|
|
Wait limited by callback and timeout, possibly drawing stimuli. |
|
Return True if current time is within a flip of the ITI end. |
|
Draw each named stimulus in the order provided. |
|
Generator function for timing events based on screen flips. |
|
Enforce fixation but possibly allow blinks. |
|
Change the color of a stimulus to show feedback. |
|
Repeatedly turn a stimulus off and on. |
Initialization methods¶
Determine parameters for this run of the experiment. |
|
Define stem for output filenames and ensure directory exists. |
|
Create PsychoPy Sound objects for auditory feedback. |
|
Start a server in an independent thread for experiment control. |
|
Connect to and calibrate eyetracker. |
|
Open the PsychoPy window to begin the experiment. |
|
Setup stimulus objects. |
Shutdown methods¶
Cleanly close down the experiment server process. |
|
End Eyetracker recording and save eyetracker log files. |
|
Cleanly exit out of the psychopy window. |
Networking methods¶
Send information about what’s on the screen to the client. |
|
|
Send trial information to the remote client for plotting. |
Update eyetracking params using values from the remote client. |
Internal execution methods¶
Outer loop for executing the experiment. |
|
Wait for a trigger key (or an abort). |
|
Wait until the experimenter quits. |
Tools¶
|
Handler for waiting until subject fixates to begin trial. |
|
Handler for waiting until subject makes a eye or key response. |
|
Check whether gaze coordinates are on the point. |
|
Flexibly determine a number of values. |
|
Iteratively sample from a random variate rejecting values outside limits. |
|
Infinite generator with a constraint on number of repeats of each item. |
Stimuli¶
Fixation points, saccade targets, and spatial cues¶
|
Wrapper for a single psychopy.visual.Circle. |
|
Wrapper for multiple psychopy.visual.Circle objects. |
|
Line extending from fixation towards a stimulus location. |
|
Point extending from fixation towards at a stimulus location. |
|
Random dot motion¶
|
Random dot motion stimulus (from Newsome, Movshon, and others). |
|
Bivalent random dot stimulus with color and motion dimensions. |
Gratings, hyperplaids, and noise fields¶
|
Psychopy grating stimulus with variable luminance pedestal. |
|
Field of elements that are independently controlled and rapidly drawn. |
|
Contrast pattern created by averaging oriented gratings. |
|
Noise field with Gaussian statistics parameterized by contrast. |
|
Noise field with uniform statistics parameterized by contrast. |
Apertures¶
|
|
|
Simulated gaze position¶
|
Stimulus linked to eyetracker that shows gaze location. |
Eye Tracking¶
|
Interface to EyeLink eyetracker. |