Experiment.__init__(name='', version='0.1', info=None, rp=None, actions=None, computer=<class psychopy_ext.exp.default_computer at 0x120781F0>, paths=None, data_fname=None, **kwargs)[source]

An extension of ExperimentHandler and TrialHandler with many useful functions.


When you inherit this class, you must have at least info and rp (or simply **kwargs) keywords because Control expects them.

  • name (str, default: ‘’)

    Name of the experiment. It will be used to call the experiment from the command-line.

  • version (str, default: ‘0.1’)

    Version of your experiment.

  • info (tuple, list of tuples, or dict, default: None)

    Information about the experiment that you want to see in the output file. This is equivalent to PsychoPy’s extraInfo. It will contain at least ('subjid', 'subj') even if a user did not specify that.

  • rp (tuple, list of tuples, or dict, default: None)

    Run parameters that apply for this particular run but need not be stored in the data output. It will contain at least the following:

    [('no_output', False),  # do you want output? or just playing around?
     ('debug', False),  # not fullscreen presentation etc
     ('autorun', 0),  # if >0, will autorun at the specified speed
     ('unittest', False),  # like autorun but no breaks at show_instructions
     ('repository', ('do nothing', 'commit and push', 'only commit')),  # add, commit and push to a hg repo?
                                                          # add and commit changes, like new data files?
  • actions (list of function names, default: None)

    A list of function names (as str) that can be called from GUI.

  • computer (module, default: default_computer)

    Computer parameter module.

  • paths (dict, default: None)

    A dictionary of paths where to store different outputs. If None, set_paths() is called.

  • data_fname (str, default=None)

    The name of the main data file for storing output. If None, becomes self.paths['data'] +['subjid'] + '.csv'. Then a Datafile instance is created in self.datafile for easy writing to a csv format.

  • **kwargs