Basic architectureΒΆ

Functions in bold are mandatory to define. Everything else just works.

  • A Project (accessible via the command line or graphic user interface)
    • Control interface: Control
      • Choices of things to do: Choices - path to modyle to run, e.g., ‘scripts.main’ - name of experiment - alias to access experiment via command line - order of possible tasks (methods) to run
      • Initialization
        • Docstring to describe the experiment for participants
        • Call parent class: super(MyExp, self).__init__()
        • Define global parameters, like self.stim_size = 3
        • Redefine computer parameters, usually self.computer.valid_responses
        • Redefine self.paths
        • Define tasks in the experiment, if any: self.tasks = []
      • Setup: setup()
        • Collect run time information: psychopy.info.RunTimeInfo()
        • Set random seed
        • Set logging: set_logging()
        • Create psychopy.visualWindow: create_win()
      • Define tasks (inherit from Task or define within the experiment class if there is a single task only)
        • Initialization
          • Docstring to describe the task for participants
          • Call parent class: super(MyExp, self).__init__()
          • Define which column in self.exp_plan determines splitting into blocks (self.blockcol)
          • Define global parameters, like self.stim_size = 3
          • Redefine computer parameters, usually self.computer.valid_responses
          • Define data file name
        • Setup: setup_task()
          • Inherit properties from parent
          • Create stimuli: create_stimuli()
            • Create fixation: create_fixation()
            • Define your own stimuli
          • Create trial: create_trial()
            • Define events: Event
          • Create experimental plan: create_exp_plan()
          • Determine if stimulus presentation should be controlled by global timing
          • Set up auto run
          • Split into blocks: get_blocks()
      • Run: run()
    • Analysis
    • Simulation:
      • Get images of stimuli
      • Choose a model from models
      • Run it, e.g., run()