EXP programs

From biophysics
Revision as of 08:15, 31 August 2026 by Lof (talk | contribs) (Introduction)
Jump to navigation Jump to search

Introduction

This resource contains the MATLAB source code for a modular system named EXP_programs, developed by Ruurd Lof for the DCN at Radboud University. The software is specifically 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 is created by defining a gui and a few sub classes of certain classes in the EXP framework.

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 over 200 files and is written in the Object Oriented Programming (OOP) paradigm by Ruurd Lof.

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 sounds, sound locations, led locations and acquisition results for every trial.
  • 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);