Programming an experiment: Difference between revisions

From biophysics
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Introduction==
==Introduction==
%todo
The EXP_framework is meant for programming sound related experiments based on the TDT RZ6. The framework can be found in the biofysica toolbox. There are four biophysics labs that have a dedicated program.


*[[Auditory Motion Lab]] (''aka Robot Arm'')
*[[Auditory Perception Lab]] (''aka Patient Lab'')
*[[NIRS-EEG lab|NIRS-EEG Lab]]
*[[Vestibular Chair|Vestibular Chair Lab]]
The electronics workshop has an RZ6 as well for testing. So there are five dedicated programs:
*RA_program for the robot arm lab
*PL_program for the patient lab
*EG_program for the NIRS-EEG lab
*VC_program for the Vestibular Chair
*TL_program for the test setup in the electronics workshop.


==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]] have been build.
You can finde the Experiment Programming Framework (EXP_) and the lab programs in the biofysica toolbox on Gitlab (biofysica\experiment\EXP_programs)  


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


<pre>
<pre>
     version = 'V1.02';
     environment    = PL_environment;  
 
     hardware        = PL_hardwareSystem(environment);
     environment    = TL_environment(version);
     experiment     = PL_experiment(environment, hardware);                            
    configuration  = TL_configuration;
     recordings     = PL_recordingsHandler(environment, experiment);    
     experiment     = TL_experiment;
     player          = PL_experimentPlayer(hardware, recordings, experiment);
    system        = TL_system(configuration);  
     guihandler     = PL_guiHandler(player, environment, experiment, hardware);
     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-------------------------
     %--------------------------Launch GUI-------------------------


     TL_Gui(expPlayer, guihandler);
     TL_Gui(guihandler);
</pre>
</pre>


Line 30: Line 38:


*XX_bioxSystem
*XX_bioxSystem
*XX_tasklist
*XX_eventSystem
*XX_eventSystem
*XX_ledSystem
*XX_ledSystem

Latest revision as of 09:14, 29 October 2026

Introduction

The EXP_framework is meant for programming sound related experiments based on the TDT RZ6. The framework can be found in the biofysica toolbox. There are four biophysics labs that have a dedicated program.

The electronics workshop has an RZ6 as well for testing. So there are five dedicated programs:

  • RA_program for the robot arm lab
  • PL_program for the patient lab
  • EG_program for the NIRS-EEG lab
  • VC_program for the Vestibular Chair
  • TL_program for the test setup in the electronics workshop.

Experiment Programming Framework

You can finde the Experiment Programming Framework (EXP_) and the lab programs in the biofysica toolbox on Gitlab (biofysica\experiment\EXP_programs)

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

    environment     = PL_environment;    
    hardware        = PL_hardwareSystem(environment);
    experiment      = PL_experiment(environment, hardware);                             
    recordings      = PL_recordingsHandler(environment, experiment);     
    player          = PL_experimentPlayer(hardware, recordings, experiment);
    guihandler      = PL_guiHandler(player, environment, experiment, hardware);
                                         
    %--------------------------Launch GUI-------------------------

    TL_Gui(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_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