Programming an experiment

From biophysics
Jump to navigation Jump to search

Introduction

%todo


Experiment Programming Framework

In the toolbox on Gitlab (biofysica\experiment\experiment programming framework) you can find the framework on which the new TestLab program (in the Electronics Workshop) and the new sphereMinor program for the Auditory Perception Lab have been build.

The framework enables you to create a main program in a compact format:

    version = 'V1.02';

    environment    = TL_environment(version);
    configuration  = TL_configuration;
    experiment     = TL_experiment;
    system         = TL_system(configuration);    
    setupInfo      = TL_setupinfo;
    recordings     = TL_recordingsHandler(environment, setupInfo);
    guihandler     = TL_guiHandler(environment, experiment, configuration);    
    expPlayer      = TL_experimentPlayer(system, environment, configuration, experiment, recordings, guihandler);
                                         
    %--------------------------Launch GUI-------------------------

    TL_Gui(expPlayer, guihandler);

The TL_xxxxxxxxx are classes derived from EXP_xxxxxxxx classes defined in the framework. The classes will be discussed below.

In order to build a new program, you need to make a two letter shorthand for the program (e.g. AB) and then derive new child classes and a Gui with the names AB_xxxxxxxxxx. Change the main program accordingly. Other newly child classes that need to be defined are classes for the subsystems that are used:

  • XX_bioxSystem
  • XX_tasklist
  • XX_eventSystem
  • XX_ledSystem
  • XX_tasklist
  • XX_trialPlayer


You also need an environment (.env) file, a setupinfo (.info) file, a system (.sys) file.

Environment class

This class reads the .env file