Programming an experiment: Difference between revisions

From biophysics
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Introduction==
==Introduction==
The EXP_framework is meant for programming 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 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:

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