Difference between revisions of "Programming an experiment"

From biophysics
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
==Experiment Programming Framework==
 
==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]] has been build.
+
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  
+
The framework enables you to create a main program in a compact format:
  
 
<pre>
 
<pre>
 +
    version = 'V1.02';
 +
 
     environment    = TL_environment(version);
 
     environment    = TL_environment(version);
 
     configuration  = TL_configuration;
 
     configuration  = TL_configuration;
Line 16: Line 18:
 
     recordings    = TL_recordingsHandler(environment, setupInfo);
 
     recordings    = TL_recordingsHandler(environment, setupInfo);
 
     guihandler    = TL_guiHandler(environment, experiment, configuration);     
 
     guihandler    = TL_guiHandler(environment, experiment, configuration);     
     player        = TL_experimentPlayer(system, environment, configuration, experiment, recordings, guihandler);
+
     expPlayer      = TL_experimentPlayer(system, environment, configuration, experiment, recordings, guihandler);
 
                                          
 
                                          
 
     %--------------------------Launch GUI-------------------------
 
     %--------------------------Launch GUI-------------------------
  
     TL_Gui(player, guihandler);
+
     TL_Gui(expPlayer, guihandler);
<\pre>
+
</pre>
 +
 
 +
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. XX) and then derive new child classes and a Gui with the names XX_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

Latest revision as of 14:54, 18 November 2024

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. XX) and then derive new child classes and a Gui with the names XX_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