Programming an experiment
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.
- Auditory Motion Lab (aka Robot Arm)
- Auditory Perception Lab (aka Patient Lab)
- NIRS-EEG Lab
- 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
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:
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