Customized scoring of event related data

The program scoreEventData (use addpath W:\d1\local\matlab\score_Event_Data) was written to allow easy scoring of single channel event related data such as EDA, pupil diameter, corrugator emg, etc. It is designed to allow for flexible preprocessing of data as specified in a generic configuration file. A preprocessing Matlab function is customized and designated by a unique study name contained in the configuration file. Currently the only study supported is MIDUSEDA for processing the MIDUS study's skin conductance measurement using the Biopac system. This study is described below. The first step is to create a configuration file for the data to be processed which specifies parameters for processing the data as well as displaying it in the scoring program. The MIDUSEDA configuration file looks like:

SAMPLE_RATE: 1000

PLOT_YMIN: -1.500

PLOT_YMAX: 1.500

PLOT_XMIN: -4.000

PLOT_XMAX: 8.000

PLOT_X_LABEL: Time (sec)

PLOT_Y_LABEL: Conductance

DATA_TYPE: ACQ

STUDYNAME: MIDUSEDA

A customized Matlab function 'loadMIDUSEDA.m' was written to read in four separate Biopac .acq files, run a 10 Hz lowpass filter followed by a 150 sample median filter on the EDA channel of each segment, concatenate them, decode events from the DIN channels and then extract EDA epochs for each event from PLOT_XMIN to PLOT_XMAX. All this processing of each subject's data is controlled by calling scoreEventData with arguments specifying the configuration file, path to the Biopac data files, and the list of the four task files. Here is an example from a batch file for processing several subjects (just copy it from W:\d1\local\matlab\score_Event_Data to your work folder and modify it appropriately with your favorite text editor):

scoreEventData('midus_eda.txt','/d8b/larry/skin_conductance/scoreEventData_update_Aug2008/', ... '/exp/midus/data/keck_startle/ms058/', ... 'MS058_TASK0008.acq','MS058_TASK0009.acq','MS058_TASK0010.acq','MS058_TASK0011.acq');

scoreEventData('midus_eda.txt','/d8b/larry/skin_conductance/scoreEventData_update_Aug2008/', ... '/exp/midus/data/keck_startle/ms062/', ... 'MS062_TASK0009.acq','MS062_TASK0010.acq','MS062_TASK0011.acq','MS062_TASK0012.acq');

etc

This function has the form: scoreEventData(configuration file,destination folder,source folder,taskfile1,taskfile2,taskfile3,taskfile4). The results from this batch run, saved in Matlab files MS058_EDA.mat and MS062_EDA.mat in the destination directory, /d8b/larry/skin_conductance/scoreEventData_update_Aug2008/, are ready to be scored. These matlab files contain the data epochs, event, scoring and timing information. Scoring is done by typing scoreEventData at the Matlab prompt (or scoreEventData('midus_eda.txt') in order to bypass the load configuration file step). The scoreEventData interface is shown below:

The interface is fairly intuitive. Bad sections of data can be scored out by selecting and dragging with the left mouse button and hitting return to choose the default 'Bad' from the pop-up dialog box. If too much is marked bad it's easy to select and change data back to good (bad data is plotted in red). The zero offset value shows the Y-value at t = 0 which is useful for determining whether the EDA data are in the normal range of 2-20 micro-mho. It is also possible to change the vertical (Y) range of the plot and save the new settings to the configuration file. After data have been scored, customized Matlab programs will be used to output results into a form suitable for statistical analysis.