EXP programs: Difference between revisions

From biophysics
Jump to navigation Jump to search
 
(33 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Introduction==
==Introduction==
EXP programs are MATLAB programs for each auditory lab based on the EXP framework. The EXP framework is a MATLAB toolbox developed by [[Ruurd Lof]]. The framework is a collection of classes and functions that are the basis for Lab programs. The toolbox is mainly programmed object oriented programming style. It is modular with respect to the hardware that can be used.


Each lab program is created by defining a gui and a few sub classes of certain classes in the EXP framework.
The software is designed to control biophysical experiments in various specialized environments, such as the Patient Lab, the Robot Arm Lab, and the NIRS/EEG facilities. The code defines an extensive structure of classes and functions for managing hardware, including LED controllers, sound cards, motors, and head-coil calibration systems. Additionally, the script incorporates logic for adaptive algorithms, stimulus generation, and the handling of real-time experimental data via various protocols. Detailed specifications for audiological equipment and loudspeakers are integrated directly into the code to ensure accurate calibration. Collectively, the system forms a robust framework for the automation and synchronization of scientific research into human perception and motor control.
 
The EXP framework is a MATLAB toolbox developed by [[Ruurd Lof]]. The toolbox is mainly programmed object oriented programming style. It is modular with respect to the hardware that can be used.
 
Each lab program has its own version of the program, but most of the code is shared in the form of the EXP_framework. The code is part of the biophysics toolbox on [https://gitlab.science.ru.nl/ gitlab]
 
The following programs are available:
  TL_Program for the test lab
  PL_Program for the auditory perception lab (patient lab)
  EG_Program for the EEG/NIRS lab
  RA_Program for the auditory persuit lab (robot arm)
  VC_Program for the vestibular chair lab
 
==EXP framework==
 
The EXP framework consists of about 150 files and is written in Matlab in the Object Oriented Programming (OOP) paradigm.


The main classes in the EXP framework are:
The main classes in the EXP framework are:


     EXP_programParameters
     EXP_environment
     EXP_hardwareSystems
     EXP_hardwareSystem
     EXP_experiment
     EXP_experiment
     EXP_recordingsHandler  
     EXP_recordingsHandler  
     EXP_experimentPlayer
     EXP_experimentPlayer
     EXP_guiHandler
     EXP_guiHandler
    EXP_gui
*These EXP_ classes and a few others are the templates for building a lab specific program.
*All programs use the same GUI that is always responsive and displays real time information during the experiment.


Other classes represent hardware that can be used in the experiment:
*A .exp file specifies the whole experiment.


    EXP_bioxSystem
*The program outputs a .mat file for every trial (and block) with a struct called 'trialInfo'.
    EXP_eventRecorder
 
    EXP_ledController
*There is no need for the experimenter to do any Matlab programming.


==Lab program example==
==Lab program example==
Line 23: Line 42:
An example of a Lab program is the TestLabProgram. All programs have the same basic structure:
An example of a Lab program is the TestLabProgram. All programs have the same basic structure:


Six objects (TestLab classes are starting with TL_) are created in a fixed order and linked by passing references to the objects.  
A few objects (TestLab classes are starting with TL_) are created in a fixed order and linked by passing references to each other.  
   
   
     programPar      = TL_programParameters(version);
     environment    = TL_environment;
     hardwareSystems = TL_hardwareSystems(programPar);                       
     hardware        = TL_hardwareSystems(environment);                       
     experiment      = TL_experiment(programPar);             
     experiment      = TL_experiment(environment, hardware);             
     trialRecordings = TL_recordingsHandler(programPar, experiment, hardwareSystems);     
     recordings      = TL_recordingsHandler(environment, experiment);     
     player          = TL_experimentPlayer(hardwareSystems, trialRecordings, programPar, experiment);
     player          = TL_experimentPlayer(hardware, recordings, experiment);
     guihandler     = TL_guiHandler(player, programPar, experiment, hardwareSystems);
     guiHandler     = TL_guiHandler(player, environment, experiment, hardware);


At last a GUI is launched with a link to the guihandler object.
At last a GUI is launched with a link to the guihandler object.
      
      
     TL_Gui(guihandler);
     TL_Gui(guiHandler);
 
===Program parameters===
The programPar object ....
 
===Hardware systems===
The hardwareSystems object ....
 
===Experiment===
The eperiment object ....
 
===Trial recordings===
The trialRecordings object ....
 
===Experiment player===
The experimentPlayer object ....
 
===Gui handler===
The guiHandler object ....
 
===The GUI===
The Gui object ...

Latest revision as of 08:30, 31 August 2026

Introduction

The software is designed to control biophysical experiments in various specialized environments, such as the Patient Lab, the Robot Arm Lab, and the NIRS/EEG facilities. The code defines an extensive structure of classes and functions for managing hardware, including LED controllers, sound cards, motors, and head-coil calibration systems. Additionally, the script incorporates logic for adaptive algorithms, stimulus generation, and the handling of real-time experimental data via various protocols. Detailed specifications for audiological equipment and loudspeakers are integrated directly into the code to ensure accurate calibration. Collectively, the system forms a robust framework for the automation and synchronization of scientific research into human perception and motor control.

The EXP framework is a MATLAB toolbox developed by Ruurd Lof. The toolbox is mainly programmed object oriented programming style. It is modular with respect to the hardware that can be used.

Each lab program has its own version of the program, but most of the code is shared in the form of the EXP_framework. The code is part of the biophysics toolbox on gitlab

The following programs are available:

  TL_Program for the test lab
  PL_Program for the auditory perception lab (patient lab)
  EG_Program for the EEG/NIRS lab 
  RA_Program for the auditory persuit lab (robot arm)
  VC_Program for the vestibular chair lab

EXP framework

The EXP framework consists of about 150 files and is written in Matlab in the Object Oriented Programming (OOP) paradigm.

The main classes in the EXP framework are:

   EXP_environment
   EXP_hardwareSystem
   EXP_experiment
   EXP_recordingsHandler 
   EXP_experimentPlayer
   EXP_guiHandler
   EXP_gui
  • These EXP_ classes and a few others are the templates for building a lab specific program.
  • All programs use the same GUI that is always responsive and displays real time information during the experiment.
  • A .exp file specifies the whole experiment.
  • The program outputs a .mat file for every trial (and block) with a struct called 'trialInfo'.
  • There is no need for the experimenter to do any Matlab programming.

Lab program example

An example of a Lab program is the TestLabProgram. All programs have the same basic structure:

A few objects (TestLab classes are starting with TL_) are created in a fixed order and linked by passing references to each other.

   environment     = TL_environment;
   hardware        = TL_hardwareSystems(environment);                      
   experiment      = TL_experiment(environment, hardware);             
   recordings      = TL_recordingsHandler(environment, experiment);     
   player          = TL_experimentPlayer(hardware, recordings, experiment);
   guiHandler      = TL_guiHandler(player, environment, experiment, hardware);

At last a GUI is launched with a link to the guihandler object.

   TL_Gui(guiHandler);