visigoth.Experiment

class visigoth.Experiment(arglist=None)[source]

Main object for controlling experiment execution.

__init__(arglist=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([arglist])

Initialize self.

check_abort()

Check whether the quit key has been pressed and exit if so.

check_fixation([allow_blinks, fix_pos])

Enforce fixation but possibly allow blinks.

compute_performance()

Extract performance metrics from trial data log.

create_stimuli()

Initialize study-specific stimulus objects.

define_cmdline_params(parser)

Augment the command line parser to set params at runtime.

demo_mode()

Show stimuli and other aspects of the task prior to training.

draw(stims[, flip])

Draw each named stimulus in the order provided.

flicker(stim[, duration, rate, other_stims])

Repeatedly turn a stimulus off and on.

frame_range([seconds, frames, round_func, …])

Generator function for timing events based on screen flips.

generate_trials()

Generator that yields data for each trial.

initialize_data_output()

Define stem for output filenames and ensure directory exists.

initialize_display([gamma_correct, debug, …])

Open the PsychoPy window to begin the experiment.

initialize_eyetracker()

Connect to and calibrate eyetracker.

initialize_params()

Determine parameters for this run of the experiment.

initialize_server()

Start a server in an independent thread for experiment control.

initialize_sounds()

Create PsychoPy Sound objects for auditory feedback.

initialize_stimuli()

Setup stimulus objects.

iti_end(iti_duration[, check_abort])

Return True if current time is within a flip of the ITI end.

run()

Outer loop for executing the experiment.

run_trial(trial_info)

Execute an individual trial of the experiment.

save_data()

Write out data files at the end of the run.

serialize_trial_info(trial_info)

Serialize the trial results so they can be be sent to the remote.

show_feedback(stim, result[, idx])

Change the color of a stimulus to show feedback.

show_performance(mean_acc, mean_rt)

Show end-of-run feedback to the subject about performance.

shutdown_display()

Cleanly exit out of the psychopy window.

shutdown_eyetracker()

End Eyetracker recording and save eyetracker log files.

shutdown_server()

Cleanly close down the experiment server process.

sync_remote_params()

Update eyetracking params using values from the remote client.

sync_remote_screen(stims)

Send information about what’s on the screen to the client.

sync_remote_trials(trial_info)

Send trial information to the remote client for plotting.

trial_count([max])

Generator of trial index.

trial_info(**kwargs)

Generate a Series with trial information.

wait_for_exit()

Wait until the experimenter quits.

wait_for_trigger()

Wait for a trigger key (or an abort).

wait_until([end, timeout, sleep, draw, …])

Wait limited by callback and timeout, possibly drawing stimuli.

Attributes

abort_keys