Aggregated Startle
Aggregated startle works much like averaging epochs in EEG data. Rather than picking parameters from single startle probes (e.g. onset, peak, peak latency, etc.), all the "good" startle probes from a subject are first averaged by condition. These average curves are then used to estimate parameters.
For the MIDUS study a matlab program, epochMidusStartle, was written to read in four separate task .STM files and write out a Matlab .mat file containing the epoched data and auxiliary information. During the Midus startle recordings picture valence and onset relative to startle probe failed to be recorded on their assigned event channels. Thus it was necessary for epochMidusStartle to read in the Eprime log file in order to fill in the picture valences and onsets. The form of the function is:
function
epochMidusStartle(pathName,task1FileName,task2FileName,task3FileName,task4FileName,logFileName,
...
intStlChannel,parChannel,probeChannel,startEpoch,endEpoch)
%
% function
aggMidusStartle(pathName,task1FileName,task2FileName,task3FileName,task4FileName,logFileName
...
% intStlChannel,parChannel,probeChannel,startEpoch,endEpoch)
%
% this function reads in the four task startle STM files, concatenates them,
extracts probe epochs
% for each picture presentation, creates three baseline probe epochs (2.9, 4.4
and 5.9 sec) for each
% noprobe picture and writes the data to a Matlab .mat file containing:
% stlEpoch stlEpochScore parEpoch parEpochScore epochCondx epochTime epochProbe
sr startSamp endSamp
% data along with picture valence and time between picture onset and probe
% stlEpoch and parEpoch are numEpoch x startSamp-endSamp+1 arrays of data
% stlEpochScore and parEpochScore are vectors of 0s and 1s with length
numEpoch
% indicating good or bad epochs
% epochCondx and epochProbe are cell arrays {'neg','neu','pos'}
% and {'yes','no'} respectively with length numEpoch
% epochTime is a numEpoch vector containing startle times 2900, 4400 and
% 5900 with negative values for the noprobe trials
% sr, startSamp, endSamp are scalar values
% example values:
% pathName = 'W:\exp\midus\data\startle\MS053\'; path to directory
containing data files
% task1FileName = 'MS053011_intRAW.STM';
% task2FileName = 'MS053012_intRAW.STM';
% task3FileName = 'MS053013_intRAW.STM';
% task4FileName = 'MS053014_intRAW.STM';
% logFileName = 'W:\exp\midus\data\behavioral\Startle
Task\midus_startle_90trials_set2_order2_purple1-053-18709.txt'; with complete
path
% intStlChannel = 2;
% parChannel = 5;
% probeChannel = 4;
% startEpoch = -0.250;
% endEpoch = 0.500;
For example:
epochMidusStartle('W:\exp\midus\data\startle\MS052\','MS052011_intRAW.STM',
...
'MS052012_intRAW.STM', ...
'MS052013_intRAW.STM','MS052014_intRAW.STM', ...
'W:\exp\midus\data\behavioral\Startle
Task\midus_startle_90trials_set2_order2_yellow1-052-11326.txt', ...
2,5,4,-0.250,0.500);
This example creates a Matlab file containing epoched data (startle and
PAR) named MS052_data.mat
MS052_data.mat contains the following variables: stlEpoch stlEpochScore
parEpoch parEpochScore epochCondx epochTime epochProbe sr startSamp endSamp
stlEpoch and parEpoch are numEpoch x startSamp-endSamp+1 arrays of data
stlEpochScore and parEpochScore are numEpoch vectors of 0s and 1s indicating
good or bad epochs (created with all 1s indicating all good data)
epochCondx and epochProbe are numEpoch cell arrays {'neg','neu','pos'} and {'yes','no'}
respectively
epochTime is a numEpoch vector containing startle times 2900, 4400 and 5900
(-2900, -4400 and -5900) for the noprobe trials
sr, startSamp, endSamp are scalar values containing the data sample rate, start
and end sample numbers
The _data.mat files can scored using 'aggStartleMidusScore'. When a
startle or PAR epoch is marked as bad the corresponding value in the
stlEpochScore or parEpochScore vector is set to 0. aggStartleMidusScore
looks like:

where the startle data for a single epoch is displayed in the upper and PAR data
in the lower graph. The epoch displayed can be changed by clicking on the
Next or previous buttons. Either type of epoch data can be scored as bad
by clicking the "Bad" radio button below its graph. Popup menus allow setting
the vertical scales for each plot and the "Add 0, 20, 1210 ms lines" will add
vertical blue marker lines at the listed times in order to facilitate the
startle scoring.
Another program, 'viewAggStartle', can be used to view the various mean signals computed using only good data epochs:

The GUI layout is similar to aggStartleMidusScore but without the Next/Prev and Good/Bad controls. Instead there is a popup menu for choosing the condition and time values used for computing the means.
BIOPAC data (3-October-2005):
Added program epochMidusAcqStartle to create _data.mat files from BIOPAC .acq files. Its form is similar to the .STM version except that a log file is not needed since all event information is coded in channels 6 through 9. It assumes that the raw startle signal is recorded on channel one and PAR on channel 2, with events recorded on channels 6 - 9. Event structure is as follows:
picture onset and valence are marked by long square pulses (> 100ms)
channel 6: negative picture
channel 7: neutral picture
channel 8: positive picture
startle probe events are binary coded by short square wave pulses (<
100 ms) on channels 6-9
channel 6: 1
channel 7: 2
channel 8: 4
channel 9: 8
where the event value is the total of channels with simultaneous (i.e. within a few ms) short pulses
Event value/event description correspondence is:
5: negative picture onset 2900 ms prior to probe
6: negative picture onset 4400 ms prior to probe
7: negative picture onset 5900 ms prior to probe
8: neutral picture onset 2900 ms prior to probe
9: neutral picture onset 4400 ms prior to probe
10: neutral picture onset 5900 ms prior to probe
11: positive picture onset 2900 ms prior to probe
12: positive picture onset 4400 ms prior to probe
13: positive picture onset 5900 ms prior to probe
The call to epochMidusAcqStartle has the form:
epochMidusAcqStartle(pathName,task1FileName,task2FileName,task3FileName,task4FileName,startEpoch,endEpoch)
and creates an _data.mat file with the same format as epochMidusStartle. Subsequent processing is the same as for STM data format.
createMeansText('.')
This program reads all the _data.mat files in a directory and computes the
mean startle and par signals for each condition and probe delay time for good
trials. These mean signals are written out to a text file for processing
with a Labview program. Each of these text files consist of two columns and
36x751 = 27036 lines. The first column contains a condition number and the
second column the mean epoch data value. Thus the first 751 lines contain the
entire mean epoch data (-250 to 500 ms = 751 samples) for negative valence
pictures at probe delay of 2900 ms corresponding to condition 1 (repeated 751
times in column 1).
Condition codes are:
1-9: Startle probe neg @ 2900, 4400 and 5900; neu @ 2900, 4400 and 5900; pos @
2900, 4400 and 5900
10-18: Startle no probe neg @ 2900, 4400 and 5900; neu @ 2900, 4400 and 5900;
pos @ 2900, 4400 and 5900
19-27: PAR probe neg @ 2900, 4400 and 5900; neu @ 2900, 4400 and 5900; pos @
2900, 4400 and 5900
28-36: PAR no probe neg @ 2900, 4400 and 5900; neu @ 2900, 4400 and 5900; pos @
2900, 4400 and 5900