Neuroscan 4.5 Edit
Neuroscan 4.5 Edit
Neuroscan 4.5 Edit
Table of Contents
Part I Edit 1
1 Contact...................................................................................................................................
Information 3
2 Introduction
................................................................................................................................... 4
3 Operating
...................................................................................................................................
EDIT 5
4 Stim2 Response
...................................................................................................................................
Devices and EDIT 4.4 7
5 Starting
...................................................................................................................................
EDIT 11
<%COPYRIGHT - 2008%>
Contents II
Cross Correlation.......................................................................................................................................................... 86
Cut Epoch .......................................................................................................................................................... 90
DC Offset Correction
.......................................................................................................................................................... 90
Deblock .......................................................................................................................................................... 94
Decimate .......................................................................................................................................................... 96
Delete Bad Channels
.......................................................................................................................................................... 97
Delete Rejected ..........................................................................................................................................................
Sweeps 97
EKG Noise Reduction
.......................................................................................................................................................... 98
Epoch File .......................................................................................................................................................... 98
Some notes .........................................................................................................................................................
about response codes 100
Event File .......................................................................................................................................................... 101
Event-Related..........................................................................................................................................................
Band Power 105
Event-related..........................................................................................................................................................
Coherence 115
Extract Channels
.......................................................................................................................................................... 119
Filter .......................................................................................................................................................... 120
Forward FFT .......................................................................................................................................................... 124
FSP Average.......................................................................................................................................................... 125
GFP/Reference .......................................................................................................................................................... 130
Import Event..........................................................................................................................................................
File 133
Integrate .......................................................................................................................................................... 134
Intra-class Correlation
.......................................................................................................................................................... 135
Inverse FFT .......................................................................................................................................................... 137
Linear Derivation
.......................................................................................................................................................... 137
Linear Detrend .......................................................................................................................................................... 142
Merge Task ..........................................................................................................................................................
Data 143
Ocular Artifact..........................................................................................................................................................
Reduction 145
Paired t-score .......................................................................................................................................................... 153
Peak Detection .......................................................................................................................................................... 154
Pearson's r .......................................................................................................................................................... 159
QRS Detection .......................................................................................................................................................... 162
Rectify .......................................................................................................................................................... 164
RespWin .......................................................................................................................................................... 165
Smooth Data.......................................................................................................................................................... 173
SNR .......................................................................................................................................................... 174
Sort Sweeps.......................................................................................................................................................... 176
Spatial Filter .......................................................................................................................................................... 176
Spatial SVD .......................................................................................................................................................... 197
Spectrum .......................................................................................................................................................... 200
Spline Fit .......................................................................................................................................................... 203
Subtract .......................................................................................................................................................... 204
Subtract Average
.......................................................................................................................................................... 205
t-score .......................................................................................................................................................... 212
Voltage Threshold
.......................................................................................................................................................... 214
Window .......................................................................................................................................................... 216
z-score .......................................................................................................................................................... 217
Group/Individual
..........................................................................................................................................................
Avg 219
User Defined.......................................................................................................................................................... 222
Script .......................................................................................................................................................... 223
5 Options
................................................................................................................................... 231
Multiple Window
..........................................................................................................................................................
Settings 231
Single Window
..........................................................................................................................................................
Settings 238
Load Workspace
.......................................................................................................................................................... 239
Save Workspace
.......................................................................................................................................................... 239
Batch .......................................................................................................................................................... 239
<%7317A Edit%>
II
III Edit 4.5
6 Tools................................................................................................................................... 240
7 Window
................................................................................................................................... 240
8 Help ................................................................................................................................... 241
Index 0
<%COPYRIGHT - 2008%>
Edit 1
1 Edit
SCAN Vol. II
EDIT 4.5
Offline Analysis of Acquired Data
<%7317A Edit%>
2 Edit 4.5
<%COPYRIGHT - 2008%>
Edit 3
If you live outside the USA or Canada, and purchased your system through one
of our international distributors, please contact the distributor first, especially if
your system is under warranty.
Or, if you live in the USA or Canada, please call 1-877-717-3975. International
callers should use 1-704-749-3200.
For Sales related questions, please contact your local distributor, or contact us
at [email protected].
Note
The e-mail addresses for Neuroscan Sales and Technical Support have
changed. Please use [email protected] and [email protected]
for e-mail.
7317A Edit45
<%7317A Edit%>
4 Edit 4.5
1.2 Introduction
The EDIT program performs a variety of offline modifications to EEG data obtained by the
ACQUIRE program. The following are some of the capabilities of EDIT:
Typographical Conventions
The following conventions are used in the SCAN manuals.
Mouse Buttons
The use of "click", as in click on a specified option, refers to the left mouse button. If
the right mouse button is indicated instead, right mouse will be in italics to draw
attention to it. Similarly, the mouse wheel and keyboard will be in italics.
<%COPYRIGHT - 2008%>
Edit 5
Sequence of Selections
In some instances you will be directed to perform a sequence of selections. For
example, if you are directed to click the Options option on the Main Menu bar, then
the Multiple Window Settings option, and then the General tab, that sequence will
be indicated by Options g Multiple Window Settings g General tab.
There can be up to three ways to access the same option: from the lists under
options on the Main Menu bar, from the Standard Toolbar icons, and from accelerator
keys on the keyboard. For example, the Open data file command can be selected
from File g Open data file, from the icon on the Toolbar, or by using the Ctrl+O
keyboard combination.
A complete list of keyboard combination strokes is found at the end of this manual.
You may want to print or make a copy of that page to keep at hand for easy
reference.
<%7317A Edit%>
6 Edit 4.5
to bottom and left to right fashion. The first part starts with the options from the Main
Menu bar , and goes through the options
for each one. The largest section, and the main one for user reference, is the Transform
section, where all of the Transforms are listed in alphabetical order. The next part explains
the functions for each of the Toolbar icons The final part
explains the functions that are accessed from context menu lists seen when you click the
right mouse button in a single window display, between electrode displays in a multiple
window display, within an electrode window in a multiple window display, on maps, and so
forth.
As mentioned above, you will find that some options may be accessed from up to three
different ways: from the Main Menu lists, from the Toolbar icons, and from right mouse
options. Rather than duplicate the information in each of the relevant places in the
manual, there is typically one explanation, and other places refer to that section. Usually,
the explanation accompanies the method of easiest access to the option. For example,
mapping is described in the Toolbar section, rather than from the Main Menu list or right
mouse option list, as the Toolbar is most easily accessed. The easiest way to find what
you are looking for is to keep the organizational structure in mind, and then use the Table
of Contents. Words written with a blue, bold, Arial font are hyperlinks. Click the word to
go directly to that section.
If you have not worked through the SCAN Tutorials, you are encouraged to do so. The
Tutorials will help familiarize you with much of the functioning of EDIT (and ACQUIRE).
The Transforms that are available will depend on the type of file you have retrieved. For
convenience, all of the Transforms have been listed in alphabetical order, with the
exception of Group Average and Script. These two options are always present at the
bottom of the Transform list, regardless of the file type, and are there when no files have
been retrieved.
This Help File (as are all of the SCAN 4.5 manuals) is installed on your PC. You may access
it from EDIT, by clicking on the Help g Edit Manual option. For printing, the PDF versions
are also included (in the ...\Scan4.5\Pdf folder).
Some differences in EDIT 4.2 (and continued in later versions) - Some minor changes
have been made to the transforms in EDIT 4.2 (and newer), as compared to earlier
versions of EDIT (3.2, 4.0 and 4.1). In general, these modifications do not affect your
data, and files recorded with earlier versions should be compatible with newer versions.
We recommend, however, that you not switch acquisition or analysis packages in the
middle of a study. You should 1) reanalyze your data completely within the new version,
2) continue to use your prior versions until you have completed all studies in progress, or
3) analyze at least a subset of the data files using both packages to demonstrate that
there are no differences.
Note
There has been one notable change in SCAN 4.2 (and subsequent versions), which is to
<%COPYRIGHT - 2008%>
Edit 7
make the data point count more accurate. For example, in prior versions, if you had an
AD rate of 1000, and epoch spans from -100 to 900ms, the program would show that
you have 1000 data points (one per ms). In reality there are 1001 data points, when you
include the starting point, the ending point, and the zero point. In 4.2, all points are
counted. In the 4.2 Epoching transform, for example, let's say you have an AD rate of
250, and you wish to create epochs from 0 to 1000ms. You will find that there are now
251 points, rather than 250 points in the prior versions. If you wish to create epochs
with a "power of 2" number of points, you should go by the points field (512), not the
Start/Stop times.
Does this mean you cannot combine your old data files with new ones? No. Your old data
files will be read in the new way. For example, retrieve the vep.avg file in a prior version
of EDIT, and it will show an epoch span from -50 to 500ms. Retrieve the same file in 4.2,
and it will show -50 to 499ms. The last point is dropped automatically (there is no
latency shift). When you retrieve your prior setup files in ACQUIRE 4.2, the epoch
settings will be automatically adjusted to insure that old and new files will be compatible.
The only way to encounter problems is if you, for example, create a new setup file
where you specify -50 to 500ms, and try to compare those files with older ones. The
new ones will have one additional data point, so the files cannot be compared. Should
that happen, the Cut Epoch transform can be used to remove the additional point from
the end of the file.
Difference in EDIT 4.3 - Beginning with SCAN 4.3, the transforms are actually executed
from BATCH. That means whenever you execute a transform in point-and-click mode, the
corresponding Tcl BATCH line is created automatically and displayed in the Immediate
command line. You can then either use the same command with the next like data file, or
else copy and paste the line(s) into a BATCH file you are creating (see the BATCH
manual).
2
If you have the Stim Software Only version, or if you are using the Mouse or Keyboard
2
with the Stim Complete version, there are some special considerations to keep in mind
when you perform certain operations with the data files in EDIT.
If you are using the 4-button Response Pad from STIM, the responses will appear in the
CNT files as red type codes of 1, 2, 4, or 8, corresponding to buttons 1, 2, 3, and 4.
If you are using the Mouse or Keyboard for the response device, the responses will appear
in the CNT files as blue codes of 1 or 2 for the Mouse, and 1, 2, 3, and 4 for Keys #1-4
on the keyboard.
<%7317A Edit%>
8 Edit 4.5
With the Response Pad, the response type codes are automatically distinguished from the
stimulus type codes in SCAN. I.e., you can have stimulus and response type codes of 1,
and SCAN can interpret them correctly.
With the Mouse and Keyboard responses, SCAN does not differentiate the stimulus and
response type codes. You do this by making sure you use stimulus and response type
codes that do not overlap.
2
for the behavioral data files . In Stim , go to Options g Program
Settings. Select Stim2 from the ".dat format" field. This adds an extra column at the
end of the .dat file, containing Stim or Resp. Type codes on the Stim lines will be read
as the regular stimulus type codes. Type codes on the Resp lines will be converted to
red response type codes in the CNT file, after you merge the .dat file with the CNT
file.
2. In this case, EDIT will successfully differentiate stimuli and responses, even if they
have the same type codes. However, we still recommend that you not use overlapping
stimulus and response type codes.
3. Once the conversion has been performed, you can then use all of the options and
transforms that require STIM Response Pad responses (described next).
The EDIT software, in several places, expects responses to be coming from the STIM
Response Pad.
When you Epoch the CNT file, there is an option on the Epoching Properties dialog
screen for Response. The Epochs will be created around the Responses only. This can
be use to create response-locked averages.
Again, this is assuming you have responses from the STIM Response Pad in the CNT
file. It will not recognize responses from the Mouse and Keyboard. (Note: KeyBoard,
on the same screen, does not refer to Keyboard responses, but rather to manually
inserted events - annotations - that were created in SCAN).
<%COPYRIGHT - 2008%>
Edit 9
Does this mean you cannot perform response-locked averaging, or you cannot Sort by
Response when you use the Mouse or Keyboard? No. You can still do both, assuming
2
you have merged the Stim2 format .dat file from Stim with the CNT file. From the
same Epoching Properties screen, select the option. For example, you
might enter the following settings:
These settings will create epochs around stimulus type codes of 1, where the
response is 65, where the Latency of the response is between 300-700ms, and where
the response was scored as Correct. The response type code, latency and accuracy
information are coming from the .dat file, rather than from the type codes in the CNT
file.
To create simple response-locked averages, you must again merge the .dat file with
the CNT file, then simply enter the response type code:
Similarly, the Event File transform in EDIT has a Response option. This again assumes
that the responses are from the STIM Response Pad. It will not recognize responses
from the Mouse or Keyboard. (Note: KeyBoard, on the same screen, does not refer to
Keyboard responses, but rather to manually inserted events - annotations - that were
created in SCAN). If you select the Stimulus Event Type, the resulting event file will
contain stimuli and response type codes (undifferentiated from each other).
On the other hand, you must use the Response Pad if you want to use the RespWin
transform in EDIT. RespWin will not recognize responses from the Mouse or Keyboard,
so you must merge the .dat file first.
<%7317A Edit%>
10 Edit 4.5
Trigger Conversion Program. There is another method you can use to convert the
blue responses from the mouse or keyboard to red Response Pad type responses in the
CNT file. This uses the Stim2Resp.tcl batch program, and does not require a .dat file.
For example, let's say you have a file similar to the one below, where 1, 2, 3, and 4
are mouse or keyboard responses (the 10's are stimuli).
To convert them all to "response pad" responses, you would need to run the batch file
four times: change the stimulus 1's to response 1's, stimulus 2's to response 2's, and
so on. The resulting file would then be fully compatible with the EDIT software, and
would appear as follows.
Note
The batch program can only be run in the SCAN 4.3.2 or newer versions. Older
versions will not recognize the REMOVEEVENT command. The program assumes the
stimulus and response codes are already differentiated by type code. In other words,
it will not distinguish between stimulus and response codes having the same type
code, such as 1. All 1's would be converted to response pad responses.
The Stim2Resp.tcl batch file is displayed below, if needed (you can copy and paste it
to the Tcl Batch Editor). Retrieve the CNT file in EDIT, then run the batch file. You will
be asked first for the "Stimulus code to change". (Blue type codes in SCAN are
generally regarded as stimulus type codes. In this case, "Stimulus code" refers to the
response codes that you wish to change). Enter, for example, "1" to change the
responses from the left mouse button or Key #1 from the keyboard. Then enter the
"Response code to substitute". This might typically be a "1" also, although you could
use other numbers. You will then see the changes applied to the CNT file. Repeat the
process for additional changes, if needed. Then save the modified CNT file.
<%COPYRIGHT - 2008%>
Edit 11
Start the EDIT program by clicking first on the SCAN 4.5 icon to run the Program
Launcher.
Then click the EDIT icon . You will see a small green rectangle appear in the
upper right corner on the EDIT icon on the Program Launcher. This is to let you know that
a version of EDIT is open. If EDIT should close due to some illegal operation, and the
green rectangle is still there, you will need to close and reopen the Program Launcher
before reopening EDIT.
<%7317A Edit%>
12 Edit 4.5
2.1 File
Clicking the File button displays a drop-down menu of additional options. The availability
of the options depends upon previous operations, such as, having already opened a file.
Note
In this as well as other pull-down menus, the corresponding Toolbar icons are shown
adjacent to the menu items, wherever applicable.
<%COPYRIGHT - 2008%>
Main Menu bar 13
Select the type of file, then go to the appropriate folder and select the file either by
double clicking it, or by clicking it once and then clicking the Open button.
There are four types of Neuroscan data files: AVG, EEG, COH and CNT. Additionally,
there are ASCII files (.dat) and files from other sources.
AVG files (.AVG extension). AVG files are averaged files, containing a single sweep
of evoked potential or FFT spectrum data. They can be created online in ACQUIRE
(when acquiring data in Average mode, or with Sorted averages enabled), or they
can be created offline in EDIT when averaging an EEG file. They can result from
averaging an EEG file in a single subject, or they can be the group average of AVG
files from multiple subjects.
EEG files (.EEG extension). EEG files contain data from multiple sweeps. The
sweeps are either the raw EEG sweeps (as with evoked potential recordings), or
single sweeps of FFT spectra data (after performing a Forward FFT). EEG files can
be created online in ACQUIRE (when acquiring data in Epoched mode), or offline in
EDIT when epoching a continuous file.
COH files (.COH extension). COH, or coherence files, result from performing
coherence analyses with epoched data files in EDIT (.EEG files). These are
single-sweep files, like AVG files.
CNT files (.CNT extension). CNT, or continuous, files are created in ACQUIRE when
acquiring data in continuous mode. They appear on replay as a scrolling,
continuous recording of the entire session, and include all the stimulus, response
and keyboard triggers.
Note
Behavioral data from Stim (the .dat files) may be merged only with continuous
files.
All Neuroscan Files. This option will display all of the Neuroscan files in the folder.
ASCII Files (*.dat). This option will display all of the .dat files in the folder. These
will generally be the ASCII files you have created in EDIT (see the ASCII file
section below), but the list will also include the .dat files from STIM, and any other
.dat files. Only the ASCII data files can be opened by EDIT.
European Data Format EDF (*.edf). European Data Format continuous files may
be imported directly into EDIT.
Nicolet BMSI (*.bni). Nicolet BMSI files can be opened directly in EDIT (.bni
extension).
<%7317A Edit%>
14 Edit 4.5
Status boxes. When you retrieve AVG, EEG, or CNT files, you will see a Status
box appear. These contain specific file-related information, as follows.
With AVG files - When you retrieve an AVG file, a status box similar to the
following one will appear.
The Accepted field shows the number of sweeps that were accepted into the
average file. The Rejected field shows how many sweeps were rejected, or
excluded from the average. The Type field will be "0" for AVG files. The %
Complete field (where present) displays the percentage of the file that was
acquired, as set by the number of sweeps under Epochs (in Average acquisition
mode).
The thumb-tack, or "sticky pin", in the upper right area is used to "stick" the
status box to the relevant data display. Click the pin to "push" it, and the
status box will remain with that file display.
With EEG files - When you retrieve an EEG file, a status file similar to the one
shown will appear.
The Accepted field indicates how many of the sweeps in the EEG file are
tagged as Accepted sweeps. The Rejected field shows how many of the
sweeps are tagged as Rejected. These numbers will change as you step
through the file and reject bad sweeps. The total of the two will add up to the
total number of sweeps in the EEG file. The Current field displays the current
sweep number. The Status field displays whether the current sweep is
Accepted or Rejected. The Accuracy, Latency and Response fields will be
empty if you have not Merged the Behavioral Data (.dat file) with the
continuous data file. Accuracy displays a code indicating whether the
subject's response was correct (1), incorrect (2), missing (-1), or not expected
(0). The Response field displays the subject's response, that is, which button
was pressed on the STIM response pad. (Again, this assumes you have Merged
the Task Data). The Type field displays the stimulus trigger type code sent
from STIM. The % Complete field (where displayed) shows the percentage of
sweeps that were acquired, as set in the number of sweeps field under Epochs
<%COPYRIGHT - 2008%>
Main Menu bar 15
With CNT files - When you retrieve a CNT file, the status box will be similar to
the one shown. The Recording Time field will start at 00:00:00, and increment
in seconds as you replay the file. It displays how far (in seconds) the beginning
of the current display is into the entire file. The Event Count is the sum of all
the events prior to and including those in the current section being displayed.
Event Number, Event Time and Event Class are displayed when you position
the mouse over one of the events at the bottom of the single window display.
The blue numbers are stimulus events, the red numbers are response events,
and green characters are keyboard events. The status box will display the
number of the event, the current time point in the CNT file, and which type of
an event it is.
When you attempt to open the file in Edit, you will see the following message.
If you have the setup file (.ast), click Yes and supply the file when prompted. If not,
Edit will attempt to recover the file anyway. You may see the following second
message.
<%7317A Edit%>
16 Edit 4.5
Acquire writes a temporary event file that will have a "_1.ev2" extension (e.g.,
myfile_1.ev2). That file will be placed in the same folder as the original data file. If you
select "Yes" to the above question, you will see the Import Event File dialog, where
you can import that file.
Selecting or not selecting the Replace the existing event table option makes no
difference, since the event file does not exist. Do not select the "Offsets are in
seconds" option. Then select the "_1.ev2" file. This is a temporary file that will be
deleted automatically when acquisition terminates normally.
After importing the events, be sure to resave the .cnt file (or Update it) to make the
change permanent.
<%COPYRIGHT - 2008%>
Main Menu bar 17
The top region displays the list of open files. Highlight one of them, and the Properties
information will be available for that file.
Properties. Under Properties there are four buttons: Setup, Chan. Assign.,
Chan. Layout and Subject. These same options may be accessed from the Edit
option on the Main Menu bar, and also by clicking the right mouse button in the
data window. They are discussed in the Edit section below.
2.1.4 Close
Clicking this option will close only the file that has the focus.
2.1.5 Save As
If you wish to save a file that you have modified, or if you wish to save the file in
ASCII format, select the Save As... line. You will see the standard Save As utility
display. Select a folder and enter a file name for the new file. If you want to overwrite
an existing file, you will see a confirmation display.
If you click the pull-down arrow on the Save as Type line, you will see options similar
to the following.
The type of file will depend on which type of Neuroscan file you are saving (e.g., AVG,
EEG, CNT, etc.). Enter a new file name, specify a path, and click the Save button to
save the file. For many of the Neuroscan files, you have the option to save, or export,
the file in ASCII format. Please refer to the ASCII section below for more details. With
<%7317A Edit%>
18 Edit 4.5
CNT files, you have the option to save the file in European Data Format (*.rec
extension). See the EDF Export section below. With AVG files, you can save the file in
BESA format (*.avr).
2.1.8 Print
The Print option opens a standard Print display. Note that there is an Output Properties
area that has a "Stretch output to fit page" fields. This will stretch the output to fit the
printed page.
2.1.12 Exit
Exits the EDIT program. If you have modified a data file and not saved it, you will be
asked whether or not to save the modified version.
<%COPYRIGHT - 2008%>
Main Menu bar 19
The Import/Export options are accessed from the pull-down menu for the Files of type
line (in Open File displays), and the Save as type line on Output File displays. It is not
possible to save every file type to ASCII. Basically, if you have a file displayed and you
wish to save it in ASCII format, look to see if the option for the ASCII File (.dat) is
present. If it is, you may export the file to ASCII.
To export a file to ASCII, make sure that file has the "focus", then select the Save As
option under File. Click the pull-down menu on the Save as type line, and select ASCII
File (.dat) or European Data Format EDF (.rec). Enter a file name, specify a path, and
click Save. With ASCII files, you will see the following display.
<%7317A Edit%>
20 Edit 4.5
Method. The first choice allows you specify the format for the data in the ASCII file.
Rows = Points. Selecting the Rows = Points option will result in an ASCII file where
the electrodes are displayed on a line across the screen, with the data points for each
electrode displayed in a column beneath the electrode label. An example is shown
below.
Rows = Electrodes. If you select the Rows = Electrodes option, the data in the
ASCII file will be arranged where the electrodes go down the y-axis, and the data
points extend along the rows for each electrode.
Whether or not an option is available depends on the type of file it is, as well as other
factors described below.
Header. Selecting the Header option will include the subject, date, and acquisition
parameters in the beginning of the ASCII file. If you plan to retrieve the file in EDIT,
you should save it with the Header.
Electrode labels. Select this option to include a list of the electrode labels.
X Units / Y Units. Enabling the X Units or Y Units fields will save with the ASCII .dat
file any X or Y Unit labels that you have entered (from the Overall Parameters g
Channel Attributes screen). If you used the "Default" unit labels, the word Default
will appear in the .dat file for each channel. When you import the .dat file, the Unit
<%COPYRIGHT - 2008%>
Main Menu bar 21
labels you had entered will be preserved. If you used the default unit labels, the
program will use its default labels (typically mVs and ms's).
If you disable the X Units or Y Units fields, no unit labels will be stored with the .dat
file. When you import the .dat file, the program will use its default unit labels.
Standard Deviation (SD). If you are exporting an AVG file where you computed the
Standard Deviation when the file was averaged, you may export the SD values by
selecting this option. The SD values will be displayed in a data matrix following the
voltage values matrix in the ASCII file.
Bad Channels. If you have designated certain channels to be "Bad" channels, you
may elect not to export these channels by not enabling the Bad Channels option
(enable it if you want to export the Bad channels).
Epoch Headers. If you are exporting an EEG file (single sweeps file) to ASCII, you
may elect to include additional header information at the beginning of each sweep by
enabling the Epoch Headers option. The header information will appear in the ASCII
file as follows:
The next three options are new to the 4.3 version of EDIT (per user requests):
<%7317A Edit%>
22 Edit 4.5
Use Maximum Resolution. Enable this option to export the data points with
maximum resolution (up to eight places after the decimal point). Not enabling the
option will export values with four places after the decimal point.
Use comma delimiting. Enabling this option will place a comma between numbers:
, which is especially important when exporting to Excel. Note:
comma delimited files cannot be imported back into EDIT.
Append if file exists. This option allows you to export data points to an existing file.
If enabled, the exported data will be appended at the end of an existing .dat file
(when using the same output file name). If not enabled, the existing .dat file will be
overwritten.
Channels. The Channels option lets you select which channels you want to export.
Select the All option to export all channels. Click the Specified field, then the
button to export selected channels. You will see the montage display in
which you can select the channels you wish to export (selected will be green,
deselected channels will be red).
Importing an ASCII file. To Import an ASCII file, click the Open File icon , set the
Files of type to ASCII Files (.dat), and select the .dat you wish to import. Note that all
types of .dat files will be displayed - not just the data files. Click OK and the data file will
appear. If the header information in the .dat file is missing or incomplete, which may be
the case if you are importing a file from some source other than SCAN, you will see the
display below.
<%COPYRIGHT - 2008%>
Main Menu bar 23
The information in these fields contains everything that SCAN needs to import and display
the ASCII data file. If there are missing parts in the data header, you will see the ASCII
Import display. Fill in the missing information and click OK.
In some cases, you may see an error message such as the one displayed. This is an
indication that some values are missing from the header or are otherwise incorrect. See
the header information above and compare it to your .dat file to see what parameters are
missing or incorrect.
Type refers to the Type of file this is (AVG, EEG, CNT). The number of channels, AD rate,
X-minimum (sweep starting point, in ms), number of points, number of sweeps, and
Domain should all agree with the ASCII data file. The "Rows = " field refers to the format
of the ASCII data file. If the data are contained in a matrix where the channels go across
the display, and the data points go down the display, that is Rows = Points. If the matrix
is inverted from that, where the channels go down the display, and the data points go
across the display, that is Rows = Electrodes (see the ASCII File Exporting section above
<%7317A Edit%>
24 Edit 4.5
for examples). If you are importing a continuous type of .dat file, you have the option of
specifying a Neuroscan file format, or an NK format. NK files are ASCII format Nihon Koden
continuous files.
If you have an ACQUIRE setup file that matches the data file, click the Import Setup
button, and retrieve the .ast file. The information from the setup file is transferred to the
ASCII Import display (although you may need to change the File Type manually so it
agrees with the ASCII file). You can change the values on the screen, and these will
supercede the values that are contained in the setup file. For example, you can modify an
AVG file that you are importing by selecting a different Starting point. The number of
Points you enter will then determine the ending point, or epoch length. If you are
importing files routinely, you should create a setup file that contains the information
needed for the .dat file. When you import the .dat file after specifying the .ast file, the
header information will be added automatically.
Note
When you import FFT files from ASCII, the number of points is half of that with time
domain files (this must be entered manually even if you are using a setup file). Be sure the
Frequency Domain option has been selected.
If EXPORTAVG, EXPORTEEG, OR EXPORTCNT was used, and the Header was not
included, then Data Labels are not needed, nor are they needed for AVG files
regardless of the command used to export the file.
<%COPYRIGHT - 2008%>
Main Menu bar 25
Data Labels are needed in all cases except where there are AVG type .dat files
without Headers.
2. If a Header is detected during the import of any .dat file, EDIT will attempt to
open the file automatically, bypassing the ASCII Import dialog.
<%7317A Edit%>
26 Edit 4.5
The EDF Export dialog provides options for scaling the output data. As with all digital
representations of analog signals, there is a tradeoff between amplitude resolution and
dynamic range (the largest or smallest number that can be represented). The goal is
usually to choose parameters that represent the full dynamic range of the signal so that
no clipping occurs at the extremes.
A signal is expected to range from +50 to -50mV. Say we have 8 bits to represent this
data. Since 8 bits can store only values between 0 and 255, we have 256 discrete
amplitudes that we can store digitally. Our dynamic range in this case is 100mV full scale.
Therefore we would probably choose our resolution to be 100/256 .39mV.
<%COPYRIGHT - 2008%>
Main Menu bar 27
A problem arises when we also want to represent small signals. In this case we cannot
represent signals that oscillate in the .4mV range or smaller. If we opt to use 16 bits
instead of 8, our resolution improves dramatically. Since 16 bits can hold values between
0 and 65536 we get 100/65536 .0015mV.
The following example illustrates what happens to the data when the resolution that is
chosen is too low (i.e. a large dynamic range is used):
The data on the right has a stair step appearance. This is because digital data is by
definition, discrete. If the resolution is too coarse, the data will not look smooth. In
extreme cases, the data may appear completely flat.
The next example shows data for which too low of a range was chosen (resolution too
high):
<%7317A Edit%>
28 Edit 4.5
In this case, the higher amplitude peaks of the data are "clipped", while the lower
amplitude information is well represented.
Most amplifiers in existence use 16 bits of digital resolution and this is adequate for most
situations. Filters on the front-end of AC amplifiers help restrict the values that are seen
2
at the amplifier inputs. SynAmps, SynAmps , SynAmps RT, and NuAmps are capable of
both AC and DC recordings. DC recordings, however, present issues. Since the signal is
allowed to drift away from the zero baseline, the values can become very large. The
original SynAmps used a DC correction that would re-center when it came too close to
2
the limit of the dynamic range. SynAmps , SynAmps RT, and NuAmps, however, employ 24
bits of data, allowing the data to exist in a huge range of values, thus eliminating the
need for DC correction. The data files that are created use 32 bits of storage on the
disk.
Unfortunately, the EDF specification assumes that 16 bits of resolution is sufficient for all
recording of neurophysiologic potentials. There is no provision for larger bit counts, and so
a 32-to-16 bit conversion is required. We must be careful in how we use these bits in
order to maintain a careful balance between resolution and range when compressing 32 bit
data into 16 bits. The EDF Export in SCAN provides several scaling options to handle a
variety of data types. You also have the option to export Bad and Skipped channels, as
well as selected EEG channels.
The most accurate way to choose the dynamic range is to use the actual range of the
data. Since SCAN only allows export of already recorded data (offline), we can scan the
data and determine the minimum and maximum deflection of the data, and then use one of
the following methods.
Amplifier Resolution (16 bit data only). This is only for 16 bit data. The data are
<%COPYRIGHT - 2008%>
Main Menu bar 29
Per Channel Asymmetrical. This is the most accurate method. Each channel is
scanned independently and the actual minimum and maximum values are determined
and recorded.
All Channel Asymmetrical. This method scans all channels and determines the
maximum and minimum value achieved by any channel. All channels are assigned the
same maximum and minimum values. This should be considered if all channels are
similar. It is convenient for many readers to have data that is all scaled the same.
Per Channel Symmetrical. This method scans each channel as in the Per Channel
Asymmetrical method. The absolute value of the maximum and minimum are compared.
The higher value and its negative counterpart are used. For example if the data
ranges between -50 and +62mV, the minimum and maximum assigned would be -62 to
62mV. This is useful for readers that employ the min/max of the data when deciding
how to display it. In this case, the range would be symmetric about the Y axis. This
could be very wasteful for data that has a high DC offset. Say the actual range of the
data is -1000 to -800mV. Then the range would be -1000 to 1000mV. In this case,
90% of the range goes unused.
All Channel Symmetrical. This is the same as the Per Channel Symmetrical method
except that the values are chosen from all channels. This should only be used if there
are no high DC components and all channels are similar in their range.
All Channel User Defined. This allows the user to choose a range.
Which method should you use? The Per Channel Asymmetrical method is most
accurate, and it is selected by default. Ultimately, however, it depends on the EDF
reader you are using, and the extremes of the voltage range in your data files. Select
the method you think is best, and then verify that no distortion is seen in the EDF
reader.
<%7317A Edit%>
30 Edit 4.5
2.2 Edit
The Edit option accesses a pull-down menu with the displayed list of options.
Amplifiers. The Amplifiers screen will display acquisition parameters as they were
when the file was recorded (the information cannot be modified). If you used
different Gain or Filter settings across channels, you can double click on the
electrode labels in the montage display to see what the individual channel settings
were.
<%COPYRIGHT - 2008%>
Main Menu bar 31
red. Use the button to select all the channels, and the
button to deselect all channels. Double clicking an electrode label also applies
to that channel the modification that is displayed in the Multi Channel Set
field. The operations may be understood more easily with a couple of examples.
Selecting a single channel for a particular attribute. Click the pull-down arrow
at the end of the Multi Channel Set field to see the list of attributes that may
be assigned. Select the desired attribute (e.g., Bad). Unless previously
modified, all channels will be deselected (red). Double click a channel to select
it and assign the attribute (the corresponding field will be Enabled in the
Properties section).
Properties. The Properties area displays many of the attributes that may be
modified for each channel. Most of these options can be also accessed by
<%7317A Edit%>
32 Edit 4.5
positioning the mouse over a desired electrode label and clicking the right
mouse button (CNT files), or by positioning the mouse within an electrode
display, clicking the right mouse button, and selecting Channel Properties
(multiple window displays).
Physical Channel. The Physical Channel field displays the number of the
actual amplifier channel that is carrying the signal that is displayed in the
Selected Channel field.
Fsp Stop. You may designate which channel(s) you wish to have monitored
for termination criteria during the Fsp Averaging process. If, in ACQUIRE, you
selected All under the F sp section in the Overall Parameters, then you need
not specify the channels again here. If you selected Select instead, then
you will need to select the channels individually, if you have not already
done so.
Hide. This option allows you to Hide electrodes on the screen display.
Select the channels to be hidden as described above. The data for hidden
channels will be recorded even though the waveforms will not appear on
the screen.
<%COPYRIGHT - 2008%>
Main Menu bar 33
Options).
Note
As a general rule, Bad and Skipped channels will not be included in
operations that involve the combination of multiple channels. These
include, for example, Autoscaling, Spatial SVD, Common Average Reference
and Global Field Power, Mapping, Ocular Artifact Reduction, etc., and the
channels marked as Bad or Skip will be excluded from these operations. On
the other hand, channel-by-channel operations (such as filtering) are
performed on Bad and Skipped channels, as well. That is, if the operation
performed on the Bad channel does not affect the same operation
performed on other channels (i.e., the Bad is independent from the other
channels), then the operation will ignore the Bad or Skip settings.
X Units. This option allows you to enter a label for values along the x-axis.
You may set the label independently for each channel - the channel that is
displayed in the Selected Channel field is the one that you are setting. The
Default label is "ms". If you change this, and wish to return to the default
label later, you must enter the word "Default" (with a capital D).
Y Units. This option allows you to enter a label for values along the y-axis.
You may set the label independently for each channel - the channel that is
displayed in the Selected Channel field is the one that you are setting. The
Default label is "mV". If you change this, and wish to return to the default
label later, you must enter the word "Default" (with a capital D).
Colors. Use the pull-down bar to see the additional Colors options. These
fields allow you to set the waveform colors independently for each channel.
Further, you can set the new colors to appear only in a single window
display or only in a multiple window display (or both). The Default setting is
the color you specified under Options g Multiple Window Settings g
General g Waveform button. Change "Default" to "Custom", and then
click the color bars to access the standard Colors palette. Select a color
for the specified channels. Select the channels to be modified in the same
way as described above.
Epochs. The Epochs settings are entered in ACQUIRE prior to acquisition, and, for
the most part, cannot be modified in EDIT. The exceptions are the Display fields.
<%7317A Edit%>
34 Edit 4.5
You may enter different Start and Stop times, as long as they are within the
original Start and Stop times. The displayed waveforms will change accordingly.
You can also set the Y Min and Y Max scale settings, and thereby scale the
display manually.
Frequency. If you have retrieved a frequency domain AVG file, or a COH file, you
will also see the Frequency tab appear on the Overall Parameters display. This will
allow you to choose between a histogram or line display, as well as vary the Start
and Stop times and Y Min and Y Max settings for the data file being displayed.
The Stop value is especially useful when you do not wish to display the entire
frequency range that was computed.
Events. If you retrieved a CNT file, you will see that the Events tab is included in
the Overall Parameters display. This allows you to modify the contents of the
events that you may wish to add to the file. Please refer to the Place a Mark
section below (and the ACQUIRE manual) for more information.
<%COPYRIGHT - 2008%>
Main Menu bar 35
You may modify these same options in the saved data file, in the same way as you did
when the setup file was created (refer to the ACQUIRE manual). A couple of the more
frequently used options are described below. Save the changes using the Save As
command under Files, if desired.
Creating Display Pages. The Display Page feature allows you to assign electrode
<%7317A Edit%>
36 Edit 4.5
channels to additional screen display pages. To do this, click the up arrow button
at the end of the Page field. The field will display a 1 and the
button will become active. The screen behind the Channel Layout screen will be
empty. Click the Assign Channels button, and see the channels in the Page 1
display. Double click on the individual electrode labels (so they turn green), to add
them to the first additional display page, and/or use the and
buttons. You may also drag a rectangle around a group of electrodes
to select or deselect them.
Click OK when you are through, and you will see the selected electrode displays.
Size and position them as desired. Through this process you can assign electrodes
to any display page you wish. You may assign the same channel to more than one
display page (for example, you might want the artifact channel to appear on each
display page). Use the down arrow button to get back to the original display page.
Click OK when you are through, and be sure to resave your setup file if you wish
to retain the changes you have made.
Note
If you apply the Add Derivation option, the additional display pages will be
disabled.
Single Window Order. This option allows you to reorder the sequence of channels
on the CNT file display. (The same feature may be selected from the
<%COPYRIGHT - 2008%>
Main Menu bar 37
option that appears when you click the right mouse button on a CNT file). Clicking
it displays the following screen.
The current order of channels is in the left side column. To remove a channel from
the list, just highlight it and click the button. Note: this removes the
channel from the list, not from the display. There will always be the same number
of channels displayed; this option will only alter the order. To reorder the display
completely, click the button. Then click the channel labels in the
montage display in the order that you want them to appear. As you rebuild the list,
you might want to separate the channels with spaces. Click the
button to insert a space between the channels when they are displayed (for
grouping purposes). If you omit some channels, they will be added at the bottom
of the single window display. Click OK when you are through to see the new
ordering. To save the CNT file with the new order, click Save As under File. You
will then have the option of either overwriting the existing file, or creating a new
one.
Electrode. Notice first in the background screen, with all of the labeled electrode
boxes, that you can select one by clicking on the darker bar at the top of the box
(turns box a highlighted color). The label in the Label field will show the
highlighted electrode.
<%7317A Edit%>
38 Edit 4.5
You can Rename the electrode by overtyping the label. You can select an
electrode display either by clicking on the display itself (on the label bar at the top
of the display), or by using the up and down arrow buttons at the end of the label
field.
The Scalar feature allows you to alter the display scaling factor for individual
channels - the channel that is displayed in the Label field is the one that you are
setting. For example, you might want the display scale for the VEOG channel to be
different from the other EEG channels. In that instance, set the VEOG scalar to
0.5, while leaving the other channels with a scalar of 1. The scalar multiplies the
global scale factor you have set during acquisition.
Size and Position. The Size and Position buttons are used to position the
electrodes displays automatically, resize the displays, and import/export electrode
position files.
<%COPYRIGHT - 2008%>
Main Menu bar 39
The Spherical Polar Coordinate system uses Phi, Theta and Radius values to
express the 3D location of the electrodes. The Phi and Theta values can be
<%7317A Edit%>
40 Edit 4.5
From this screen you may edit the electrode label, and modify the Polar and
Cartesian coordinates manually, if desired. Click OK to apply the changes. (If
Electrodes can be repositioned manually on the display. You can place them at
any point, or you can have them "snap" to defined positions. The latter option
is enabled with the field. You can control the sensitivity of the
"snapping" by the values you enter in the Theta and Phi fields.
<%COPYRIGHT - 2008%>
Main Menu bar 41
Valid entries for these fields are from .01 to 10 degrees. When theta is set to
10, for example, the moving electrode will snap from one position to the next in
discrete 10 degree steps. Similarly, when phi is set for 10, the moving
electrode will snap from one position to the next in discrete 10 degree steps. If
the "Snap to grid" field is not checked, you can place the electrode at any
position.
Lastly, when you manually reposition an electrode, you may see the Polar
coordinates change, but not the Cartesian coordinates. Click the
Reset Positions / Make Same Size. When one of the electrode channel
boxes is highlighted, you may increase its size by clicking on the display area.
It will change from SMALL to LARGE (or vice versa). The Small size is the size
that the display will have by default. The Large size is the size it will be when
you click inside the display once to enlarge it to the intermediary size (double
click it to go to full size). Or, you can click and drag a corner of an electrode
display to a new size of your choice. If you want all of the boxes to be the size
of the one you have just set, click Make Same Size and all boxes will be set
to the size of the one that is highlighted. You may also reposition the displays
<%7317A Edit%>
42 Edit 4.5
by dragging them from the top label bar on each display. Clicking on the Reset
Positions button to return the boxes to their original orientation and size.
Note: if you selected 32-64 channels under Amplifiers above, and yet only the
first 32 are displayed, click Reset Positions to see all the channels. The
positions you set will be reflected in the multiple window displays during
acquisition. You can, for example, position the boxes to approximate the 10-20
system, as shown below.
Note
You must click OK to save the position information before you click the Make
Same Size button again. Otherwise, the new position information will be lost
when you click Make Same Size, and the electrode displays will return to their
original positions.
Importing and Exporting Electrode Positions. Note that there are two
buttons used for importing and exporting electrode position information.
This is the size and position information of the electrode displays for the
multiple window display. You can export the information from one data file, and
then import it with a different (but matching in terms of number of channels
<%COPYRIGHT - 2008%>
Main Menu bar 43
For example, retrieve the sepblk.avg file. Click the right mouse button between
the electrode display to access the Properties g Channel Layout option.
When the Channel Layout display appears, click the button, and
enter a file name and path (the .asc extension will be added automatically).
Then click the Cancel button to exit the display. This step created an ASCII file
that may be applied to a matching data file.
Now, retrieve the sepnoblk.avg file, and return to the Channel Layout display.
<%7317A Edit%>
44 Edit 4.5
2.2.4 Subject
Clicking this button opens the Subject Information display that was created in
ACQUIRE. You may edit the information, as desired.
<%COPYRIGHT - 2008%>
Main Menu bar 45
2.2.5 Sweep
The Sweep option opens a second menu list containing the following options.
Accept Sweep (EEG). As you step through an epoched file, this option will show
whether a sweep has been tagged as Accepted or not (check mark will appear).
Click the Accept Sweep menu item to reject the sweep, or for convenience, use
the Insert key from the keyboard. The same functions are also accessed from the
Toolbar icon .
Reject Sweep (EEG). As you step through an epoched file, this option will show
whether a sweep has been tagged as Rejected or not (check mark will appear).
<%7317A Edit%>
46 Edit 4.5
Click the Reject Sweep menu item to accept the sweep, or for convenience, use
the Delete key from the keyboard. The same functions are also accessed from the
Toolbar icon .
Mark Block (CNT). The Mark Block command is used to designate sections, or
blocks, of a CNT file. It is accessed more easily from the Toolbar icon , and its
operation is described more completely in the Toolbar section below.
Insert Marks (CNT). The Insert Marks option is used to insert Keyboard events
in the CNT file using the function keys. It is more easily accessed from the Toolbar
icon , and its operation is described more completely in the Toolbar section
below.
2.2.6 Markers
These options are used in conjunction with the Add Marker option. The Add Marker
option lets you add, for example, text comments to points on a waveform. The option
is accessed when you click the right mouse button within an electrode display in a
multiple window display (described in more detail below).
Clear Markers. This option clears any markers than have been placed.
Marker Report. If you have added several markers to an EEG, AVG or COH file,
this option will create a text file list of the markers.
With an EEG file, select the Marker Report option, and the sweeps in the EEG file
will be searched rapidly for markers. At the end of the search, an Output File utility
display will appear in which you may enter a file name and path (the .dat extension
will be added automatically). The resulting file will look something like the following
(from Notepad):
<%COPYRIGHT - 2008%>
Main Menu bar 47
Similarly, multiple markers made in an AVG file will produce a Marker Report similar
to the following:
Show Markers. This option toggles on and off the display of the markers you have
placed.
2.3 View
The following options are accessed under View. The type of file you have retrieved
(CNT, EEG, AVG, or COH) will determine which options will be available. These options
may be accessed directly from icons on the Toolbar (refer to that section below for
additional details). If you have multiple data files open, be sure to change the focus to
the display that you wish to affect.
<%7317A Edit%>
48 Edit 4.5
Accelerate Display Time (CNT). This option decreases the number of seconds
displayed on the screen for continuous files, and has the same effect as the
Accelerate icon on the Toolbar. The + key on the keyboard may be used instead. You
can also use the right mouse button option, , to select the number
of seconds to be displayed.
Decelerate Display Time (CNT). This option increases the number of seconds
displayed on the screen for continuous files, and has the same effect as the
Decelerate icon on the Toolbar. The - key on the keyboard may be used instead. You
can also use the right mouse button option, , to select the number
of seconds to be displayed.
Increase Scaling (all file types). This option increases the display scaling (and has no
effect on the stored data).
Decrease Scaling (all file types). This option decreases the display scaling (and has
no effect on the stored data).
Autoscale. The Autoscale option will automatically scale data in a multiple window
display according to the largest and smallest voltages encountered. Autoscaling may
be applied directly from the Toolbar icon, as well.
Next Display Page (all file types). Additional Display Pages can be created either
from ACQUIRE or from EDIT, using the options under Edit g Channel Layout. The
Next Display Page option will step to the next display page that you created.
<%COPYRIGHT - 2008%>
Main Menu bar 49
Previous Display Page (all file types). The Previous Display Page steps backward in
the series of display pages you created.
Baseline Correction (Display only; all file types). This option centers the waveform
within the display region allocated to it (does not affect the actual data file). Ctrl+B
has the same effect.
Invert Polarity (Display only; all file types). This option inverts the polarity of the
displayed file (does not affect the actual data file). Ctrl+I has the same effect.
Apply DC Drift Correction (CNT files recorded with SynAmps). The DC Correction is
only available for CNT data files recorded with a SynAmps, with a high pass filter
setting of DC, and after you perform the DC Offset Correction transform. The option
will let you toggle between the corrected and uncorrected waveforms.
Zoom Out (EEG, AVG). Select Zoom Out to return the Zoomed In section to its
original size.
Zoom In (EEG, AVG). The Zoom In option will become active when you enlarge an
electrode display to full size (multiple window data files). After selecting Zoom In, you
will see a magnifying glass image aside the usual mouse cursor. Drag a rectangle
around the section of the waveform that you wish to enlarge, then release the mouse
button.
Main Toolbars. Selecting this option (check mark appears) will display the Toolbar
icons. The functions of these are described in detail below.
Status Bar. Enabling this (check mark appears) will display the Status Bar at the
bottom of the screen. On the left-most edge of the screen you will see a brief
description of functions when you position the mouse over certain context
sensitive areas, such as, the Toolbar icons. Additionally, there are four fields that
display information when the mouse is positioned inside a multiple window display.
The first shows the current Display Page. The next field displays the electrode
label. The 3rd and 4th fields show the millisecond and microvolt values
corresponding to the exact mouse cursor location. These two fields provide a quick
means for measuring points on the waveforms.
With time domain multiple window displays, you can see the millisecond and
<%7317A Edit%>
50 Edit 4.5
voltage for each data point by positioning the mouse at the desired point. A Tool
Tip display will show the values.
With CNT files, you may read the time point from the Status Bar field, and the
voltage for each channel and data point in the column on the right.
Batch. This displays the Batch toolbar, used to retrieve, create, edit, and execute
batch files (refer to the Tcl Batch Manual for details).
History. The History field saves a list off most operations that are performed. It is
helpful for keeping a record of operations performed and for creating batch files
that use the same series of operations (refer to the Tcl Batch Manual for more
details).
<%COPYRIGHT - 2008%>
Main Menu bar 51
File Bar. Enabling this option displays an internal data file selection system. This
provides a very convenient way to retrieve the data files created by the SCAN
programs. After enabling the File Bar option, you will see the following display.
Click the button to select the folders that contain your data files. You
will see the following display.
Note the three icons at the far right . The first one is used to change the
<%7317A Edit%>
52 Edit 4.5
background color in the previous display. The second one is used to select your
data folders, and the third one is used to delete data folders you have already
selected. For now, click the second icon . You will see the following tree
structure.
Select a folder that has data files in it, and click the OK button. Repeat the
process for all of the data files you want to access. You may select folders from
other drives or across a network, as well. Click OK when you are done. The first
display will show the file structure.
The tree structure then operates very much like the Windows Explorer program.
Note that at the bottom of the display you may select the File types you wish
displayed.
Select a data file for retrieval by double clicking it. The Researcher, Subject Name,
DOB, etc. fields will display the information that was saved with the data file. Note
also that the button becomes active. Click this to see the complete
Subject Information screen.
The icon is used to update the tree structure. Clicking it will return the
structure to the following form.
Notice also on the "NS data directories" screen (after clicking the
icon), there are options at the bottom of the screen. If you enable the Show File
Info option, you will see a pop-up window showing some basic file information
<%COPYRIGHT - 2008%>
Main Menu bar 53
when you position the mouse cursor on a data file. Enable the Hide empty
directories option excludes directories with no data files. If you enable the Load
EEG in same window option, a subsequently selected file will replace the
previously opened one.
Mapping. Selecting the Mapping option opens a second list of options. These are
accessed more easily from the Toolbar icons .
2D Mapping (AVG, EEG, CNT). This option allows you to present single point or
averaged interval data on a flat two-dimensional display. With AVG and EEG files
you must first enlarge an electrode display to full size for the option to be
available. Please see the mapping 254 section below for more details.
2D Cartoon (AVG, EEG, CNT). This option allows you to display your data using a
series of 2D maps in "cartoon" form. With AVG and EEG files you must first enlarge
an electrode display to full size for the option to be available. Please see the
mapping section below for more details.
Spectrum Mapping (AVG, EEG, CNT). The Spectrum Mapping option computes an
FFT (Fast Fourier Transform) and displays the results in Delta, Theta, Alpha1,
Alpha2, Beta1 and Beta2 band maps (these can be modified). With EEG and CNT
files, the maps correspond to each sweep (EEG) or the segment of the file that is
displayed (CNT). Please see the mapping section below for more details.
Sweep (EEG, CNT). The Sweep section commands are used to move through CNT and
EEG files. The options are accessed more easily from the Toolbar icons
The first set of commands is used primarily for stepping through EEG files.
Move Backward (EEG, CNT). This option steps one sweep or one display screen
backward in the data file. The left arrow on the keyboard performs the same
<%7317A Edit%>
54 Edit 4.5
function.
Previous Rejected (EEG). This option steps backward to the nearest rejected
sweep in the file.
Previous Accepted (EEG). This option steps backward to the nearest accepted
sweep in the EEG file.
Move Forward (EEG, CNT). This option steps one sweep or one display screen
forward in the data file. The right arrow on the keyboard performs the same
function.
Next Rejected (EEG). This option steps forward to the next rejected sweep in the
file.
Next Accepted (EEG). This option steps forward to the next accepted sweep in
the file.
The Next two commands are used to go to a specific sweep or event marker.
Go To Sweep/Event (EEG, CNT). Depending on the type of file, this option will
allow you to jump directly to a specified sweep number or event in the EEG or CNT
files (described in more detail below in the Toolbar section).
Go To Time (CNT). This option will take you directly to a specified time point in
the CNT file, and is described in more detail below.
The last option is used to measure the change in amplitude and latency between
points on the waveforms.
Show Delta Cursor (AVG, EEG). This option let's you select one data point, and
then measure the latency and amplitude differences in relation to that point
(described in more detail in the Toolbar section below).
Speedscan (EEG, CNT). The SpeedScan feature will step automatically through the
EEG or CNT file, in either direction. The speed is controlled by the SpeedScan Interval.
SpeedScanning is controlled more easily from the icons on the Toolbar (and is
described in more detail in that section below).
<%COPYRIGHT - 2008%>
Main Menu bar 55
SpeedScan Forward (EEG, CNT). This option automatically scans through the file
in a forward direction. The combination keystrokes of Alt+right arrow (on the
keyboard) perform the same function.
SpeedScan Backward (EEG, CNT). This option automatically scans through the
file in a backward direction. The combination keystrokes of Alt+left arrow (on the
keyboard) perform the same function.
SpeedScan Stop (EEG, CNT). This option is used to stop the SpeedScan. The
Spacebar will also stop the scan.
SpeedScan Interval (EEG, CNT). This option is used to control the speed of the
automatic Scan Forward and Scan Backward features for reviewing CNT and EEG
files. Select the Speed Scan Interval, and the displayed screen will appear. The
value that you enter (in ms), controls the update interval that the automatic scan
uses. To change the update interval, simply enter a new value and click OK.
2.4 Transforms
Listed below, in alphabetical order, are all of the transforms that are available (with the
exception of Grouping and Scripting, which are at the end of the Transforms section).
Not every transform is available for every file type. The information in the parentheses
after the Transform name shows the file types that have the particular transform
available, where AVG are averaged files, CNT are continuous files, EEG are epoched files,
and COH are coherence files. Note that some of the transforms are available for Time
Domain files (evoked potential files), Frequency Domain files (power spectrum files), or
both.
It is also possible to display the list of Transform options by clicking the right mouse
button between the electrode displays in a data window, and then select Transforms.
Display Dialog During Script Execution. Most of the Transforms will have a field at the
bottom that says . This is used during Script operations to
display the screen while the Script sequence is being executed. This is described in more
detail in the SCAN Tutorials and in the Script 223 section below.
<%7317A Edit%>
56 Edit 4.5
2.4.1 Add
Add (AVG, time domain EEG). The Add option allows you to add data from two files
together. The data files must have the same number of channels, the same electrode
labels, the same epoch start and stop points, and the same number of data points per
sweep. Retrieve an AVG or EEG file, then click the Add option. The Add display will
appear. Click the button to access a standard Open File utility, through which
you may select the AVG file to be added. If you started with an EEG file, the selected
AVG file will be added to each sweep in the EEG file. Then click the button on the
Output File line, and enter an output file name. A new multiple window display will
appear with the added waveforms.
Append Channels (AVG, time and frequency domain). This command allows you
to append channels from one AVG file to a different AVG file. The files must be
equivalent in terms of number of points and Start and Stop times, and there can be no
channels in common to both files. Retrieve one AVG file, and click the Append
Channels option. You will see the following screen.
<%COPYRIGHT - 2008%>
Main Menu bar 57
Use the Browse button to select the second AVG file. From that file, you may select
the channels that you wish to append to the first file. Enter an output file name, then
click OK. You will then see the new file with the original and the appended channels.
Append Recording (CNT). Append Recording allows you to attach one CNT file
to another. Retrieve one of the CNT files, and then select Append Recording. The
Append Recording display will appear. Click the button to access an Open Files
utility window. From it, select the CNT file you want to append to the original CNT file.
Then click the lower button, and a Save As... utility will let you enter a new file
name and path.
<%7317A Edit%>
58 Edit 4.5
Note
When you append CNT files, a SS event (Stop/Start) is added at the file junctures,
and at the end of the final output CNT file. These will appear in event counts and in
the event file.
Append Sweeps (EEG, time and frequency domain). Append Sweeps allows you
to attach two EEG files together in a single file. The second file will be attached to the
end of the first one. Retrieve the first EEG file, then select Append Sweeps from the
Transforms menu. Use the first button to select the File to Merge. Use the
second button to enter an output file name and folder, then click OK to continue.
After the file is appended, you will see a multiple window display showing the first
sweep of the new EEG file.
Area Report (EEG, AVG; time domain). This option is used to create an ASCII file (
.dat extension) that will contain the Sum, Mean Amplitude, or Area information for the
interval you specify. The Sweep Interval displays the Start and Stop times for the
<%COPYRIGHT - 2008%>
Main Menu bar 59
data file. The Area Interval lets you select the Entire Sweep, or a User Defined
section by entering new Start and Stop times. The Options for the report include the
following.
Sum Amplitude - This option will total the microvolt values for the data points
within the specified range. Enable the Rectify option if you want the values to be
all positive numbers.
Mean Amplitude - This option will average the microvolt values for the data points
within the specified range. Enable the Rectify option if you want the values to be
positive numbers.
Area - This option will compute an estimate of area under the curve within the
specified range. Enable the Rectify option if you want the values to be all positive
numbers. Area computation uses the extended trapezoidal rule to estimate area
under the curve. This amounts to summing all points - except the two endpoints
are given 1/2 weight - and multiplying by the sampling interval (i.e.,
1000/(sampling rate)). The 1000 in the numerator is required for
microvolt-millisecond area units.
Rectify - Enable this option if you want the values used in the Sum, Mean and
Area computations to be all positive numbers.
Use the Browse button to enter the file name and path (the .dat extension
will be added automatically). Click OK to create the .dat file. The resulting file may
be read with any text editor, and will look similar to the following.
<%7317A Edit%>
60 Edit 4.5
Artifact Rejection (CNT, EEG, time and frequency domain). The Artifact
Rejection option will automatically reject (or accept) sweeps in which the voltage in a
designated channel(s) exceeds defined criteria. The Artifact channels are designated
in ACQUIRE when you create the setup file, but may be modified as described below.
<%COPYRIGHT - 2008%>
Main Menu bar 61
Beginning with SCAN 4.3, you may also reject (or accept) sweeps on the basis the
amplitude of activity in a specified frequency range. For example, you could reject all
sweeps that have amplitude in the delta range (0-4Hz) in excess of a selected voltage
(to reject sweeps that may contain artifact). Or, you could accept only those sweeps
that have alpha (8-12Hz) in excess of a specified voltage (to include only those
sweeps where the subject's eyes were closed, and the person was awake). When you
retrieve a time domain epoched file, and select the Frequency domain option
(described below), an FFT is performed (a spline fit is applied automatically, if
needed). The results of the FFT are used for the criterion.
Clicking the Artifact Rejection option opens the Artifact Display (the options vary
between EEG and CNT files). The display contains the following regions:
Epoch Interval - The Epoch Interval displays the length of the epoch, as
designated in the setup file created in ACQUIRE.
Operation - The Operation field allows you to reject or accept sweeps on the basis
of the Amplitude Criteria you specify below (Reject on Criteria), or you may elect
to Reject All sweeps or Accept All sweeps without regard for the Amplitude
Criteria.
Reject Interval - The Reject Interval is that part of the epoch that will be included
in the voltage scan. Typically, this will be the Entire Sweep, although there is a
User Defined option in which you may specify the Start and End points (in ms).
Amplitude Criteria - Time or Frequency domain files can be used. For basic artifact
rejection with Time domain files, click the Time Domain option and enter the
threshold values for the Amplitude Criteria. The program will scan the channels you
designate, using the rejection interval you specify, for voltages exceeding the
Max. or Min. values (in mVs). The sweep will be rejected (or accepted, depending
on which you selected in the Operation region) when the threshold is exceeded.
You can also select the Frequency Domain option with time domain files. An FFT is
computed (using an automatic spline fit if the number of points is not a power of
2), and then sweeps are either rejected or accepted using the amplitude criterion.
Specify the frequency window using the Start and Stop frequencies, and select a
voltage criterion.
<%7317A Edit%>
62 Edit 4.5
For Frequency domain files (as with Forward FFT files), the Time Domain option is
grayed out. Specify the frequency window using the Start and Stop frequencies,
and enter a voltage criterion. The rest of the process is the same as with time
domain files.
Sweeps that do not meet criteria - If you have already rejected epochs manually,
or if you are running the Artifact Rejection routine an additional time, you will have
some sweeps that did not meet the rejection criteria. You have the option of
retaining these sweeps regardless of whether they meet the new criteria (Retain
status), or subjecting them to the new criteria for possible modification (Modify
status). The latter will override any previous accept/reject tags. Those that do
not meet the thresholds will be accepted.
Channels - The Channels region allows you to run the Artifact Rejection scan on all
channels, the ones that were previously designated as artifact rejection channels
in the setup file, or on other channels you specify.
Select the All option to use All channels. Click the Specified field to use the
channels that have already been designated as rejection channels. To modify
these, click the Specified field, then click the Select button to access a montage
diagram.
<%COPYRIGHT - 2008%>
Main Menu bar 63
The initial channels that you selected in the setup file in ACQUIRE will be green,
and the electrodes that are excluded will be red. Move the mouse over an
electrode label, and the fields below the diagram will show the label and the
status. Double click on an electrode label to change its status. The Select All
button will select all channels for correction; the Deselect All will exclude all
channels for artifact rejection.
Don't Reject On - In ACQUIRE, you have the option to designate channels as Bad
channels, or to Skip operations on certain channels. It is likely that these channels
may have higher voltages, either because of noise or higher amplitude activity to
begin with. You can exclude these from the Artifact Rejection routine by enabling
the Don't Reject On Bad or Skipped channels.
When you have made all the settings you want, click OK, and a progress bar will
show the routine being applied. To view the results, click on the Toolbar control
buttons to go to single sweeps, or the buttons to
play through the file automatically (described in more detail in the Toolbar icon
section). The status of each sweep will be indicated by the buttons. The
"depressed" button indicates whether the sweep is accepted or rejected. You can,
of course, override the settings manually by pushing the alternate button.
Artifact Rejection with CNT files. A slightly different dialog screen appears when you
<%7317A Edit%>
64 Edit 4.5
As with EEG files, you can use Time Domain or Frequency Domain methods for
rejection, or you can reject on the basis of trigger events in the CNT file.
Time Domain. With CNT files, the routine scans all, or specified channels for
voltages exceeding the criteria you set in the Min and Max fields. When a voltage
exceeds either criterion, a block of data is rejected according to the limits you set
in the Block Interval fields. The interval of the rejected block is defined by the
Pre-Artifact and Post-Artifact time spans.
The Refractory period has a slightly different use here than in most other places
in the SCAN software. The artifact period starts at the first threshold crossing and
does not end until the data (in all selected channels) remain below threshold for
one entire refractory period. The interval is then back-computed as:
The reason this is done is so that you do not have several small disjointed rejected
segments during a noisy part of the recording. They are combined into one
rejected span. When the artifacts are closer together than the Refractory Period,
<%COPYRIGHT - 2008%>
Main Menu bar 65
the artifact period is considered ongoing until the voltages (in all selected
channels) remain below threshold for an interval after the last detected artifact.
For example, the Refractory Period in the figure below is 600ms. The Pre-artifact
span is -200ms, and the Post artifact span is 200.
The line through the peaks is the Maximum Threshold. For each blink, the first
threshold crossing is the end of the Pre-artifact span, and the second threshold
crossing is the beginning of the Post-artifact span. All of the points in between the
two crossings are above threshold, and within the Refractory Period. The second
blink occurs after the Refractory Period (600ms) is over.
If you increase the Refractory Period to encompass the second artifact (1400ms in
this case), the entire section between blinks is rejected.
A threshold crossing (from any monitored channel) that occurs during the
Refractory Period will result in the entire span being rejected.
Frequency Domain. Click the Frequency Domain radio field to activate that option.
This routine performs a series of FFTs, and then rejects epochs when the power in
any frequency bin within the specified range exceeds the specified voltage
threshold. The span of the epochs is determined by the Epoch Points field, and
that will interact with the AD rate used when the file was recorded. For example, if
you recorded with an AD rate of 250Hz, and you select 512 Epoch Points, then the
FFT will be computed over 2048ms sweeps. (The AD rate of 250 gives points every
<%7317A Edit%>
66 Edit 4.5
You then have the option to specify the Slide Interval. The FFT is computed on a
sliding interval that advances 100ms each time. Continuing the example from
above, the first FFT is computed from 1-2048ms, the next one is from
101-2148ms, and so on.
If the FFT results contain a voltage from the specified channels that exceeds the
threshold, in any bin in the specified frequency range, then the entire 2048ms
epoch is rejected.
The process can take a few minutes, depending on the number of FFTs computed
(and the number of channels, the length of the file, the speed of your computer,
etc.). If used for rejecting blinks (not recommended), you will find that a much
larger epoch may be rejected.
The frequency domain rejection is intended for instances in which you wish to
reject sections where there are, for example, periods of drowsiness or sleep
(increased theta or delta), or increased EMG that you wish to remove from
subsequent analyses.
Trigger. The Trigger option is used where artifacts are time-locked to a stimulus
event in the CNT file. Click the Trigger radio button to activate the options.
Enter the type code in the Trigger Code field. The Block Interval determines the
span of the rejected interval about the trigger code.
<%COPYRIGHT - 2008%>
Main Menu bar 67
2.4.7 Average
Average (EEG, time domain). The Average command is used to average a sequence
of single sweeps into an average file of all the sweeps. Clicking the Average line
displays the Averaging display. There are two types of files - Time Domain and
Frequency domain. You must first specify which type of averaging you want to do.
Time domain files measure amplitude changes over a course of time (the x-axis is
measured in time). Frequency domain files measure amplitude changes over a
frequency range (the x-axis is measured in Hz). Evoked potential files are examples of
time domain files, and FFT spectra are examples of frequency domain files.
Time Domain or Frequency Domain Averaging. Select whether you wish to perform
Time or Frequency Domain averaging.
For Frequency domain averaging, the number of points in the epochs being
averaged must be a power of 2 (e.g., 256, 512, etc.; required for the FFT). If
you select Frequency Domain averaging, there are some Scaling and Windowing
options to select.
<%7317A Edit%>
68 Edit 4.5
the square root of the power spectrum to express the units in microvolts.
(Amplitude is not precisely the square root of Power; different scaling and
compensations for windowing effects are used). Amplitude is an approximate
measurement of the baseline to peak amplitude (rather than peak-to-peak).
(The measurement would be precise if you were analyzing a pure sine wave,
with starting and ending points at zero, where no windowing was needed).
The Power option computes a standard power spectrum (adapted from the
Cooley-Tukey method) with values expressed in microvolts squared.
Window - You may select to Window the data to control spectral leakage.
Length [%] - Length determines the extent of taper at the beginning and at
the end of the epoch (percentage of epoch duration).
Note
On occasion, you may wish to change the frequency resolution, that is,
the width of the frequency bins. This can be accomplished by changing the
epoch duration; the longer the duration, the narrower the frequency bins
(or the greater the frequency resolution).
Options - In the Options section, you have the choices to Compute the
Standard Deviation and/or the Signal-to-Noise-Ratio (SNR is available for time
domain files only).
<%COPYRIGHT - 2008%>
Main Menu bar 69
SNR Settings - The SNR Settings field will compute an estimate of the
signal-to-noise ratio in the same manner as the SNR Transform. The option
is available for time domain averaging only. Clicking the button displays the
SNR dialog screen.
Note
You may find differences in the SNRs computed with 4.3+ in comparison to
prior versions. We have adopted a better method for computing SNRs - the
same as that used in CURRY. Please see the SNR section below for
complete details).
Briefly, for the Noise estimation you can select the pre-stimulus interval (generally
used), the value at the 20th percentile (especially if there is no prestimulus
interval), or a user defined interval. For the Signal estimation, you can use the
post-stimulus interval (generally used), the entire sweep, or a user defined
interval. Click OK when you have made the selections. (Right click between
electrode displays and select View SNR Values to see the SNRs).
<%7317A Edit%>
70 Edit 4.5
If you enable the option, you will see the electrode labels and
the SNR values. Note the particularly large SNR values from the
centro-parietal sites.
The same information is listed in the .dat file that can be created with the
button.
<%COPYRIGHT - 2008%>
Main Menu bar 71
enabled, then all of the sweeps will be included, regardless of the values for that
criterion. For example, if you do not enable and specify Type code values, then all
Type codes will be accepted.
Trial - This option allows you to specify the individual trials, or sweeps, that
you wish to be included in the average. Enter the individual sweep numbers,
separated by commas, with hyphens to indicate a continuous range (e.g.,
1-3,5,8,12-30).
Type - Type allows you to sort sweeps according to the trigger type codes
sent from STIM. Use the same convention as shown under Trial to indicate the
type codes that you wish to be included in the average.
Response - If you have a STIM system, you will see 1, 2, 4 and 8 type codes
corresponding to response pad buttons 1, 2, 3, and 4 in the continuous file
during acquisition. You may use the response type codes for sorting purposes
when averaging. The result will be response-locked averages, rather than
stimulus-locked averages. Note: Whether you use 1, 2, 3, and 4 or 1, 2, 4 and
8 in the response field depends upon whether you have merged the .dat file or
not (Merge Task Data). Please see the section entitled "Some notes about
response codes 100 " for more details.
Note
In the continuous file acquired in ACQUIRE, you will see the stimulus and
response triggers as blue and red numbers at the bottom of the single window
display. The continuous file does not have information pertaining to the
Latency or Correctness of the subject's responses. That information is stored
in the .dat file on the STIM PC. To use the Latency and Correct options below,
you must transfer the .dat file from the STIM PC to the SCAN PC, and then
perform a Merge Task Data transform, as described below.
Note
2
If you have Stim , and are using the Mouse or Keyboard for the Response
<%7317A Edit%>
72 Edit 4.5
Latency - You may specify a latency range in which the subject's responses
must have occurred. For example, you might want to exclude responses that
were too fast (impulse responding), or too late (lapse in concentration). Enter
the Minimum and Maximum points for acceptable latencies. (This option
assumes you have already performed the Merge Task Data option - see note
immediately above).
Correct - This option allows you to include sweeps where the subject's
responses were Correct, Incorrect, Correct or Incorrect, or where there was
No Response. Click the pull-down arrow for the options. (This option assumes
you have already performed the Merge Task Data option - see note
immediately above).
Sweep Count - The Sweep Count feature lets you include All Sweeps in the
average, or you may Stop after X number of sweeps. For example, if you want
all the sweeps after 100 to be excluded from the average, enter 100 in the
Stop after field.
Note that you can combine the sorting options. For example, you might
include only trials 1-100, where the type codes were between 1-5, the
responses were correct, on even numbered trials.
Lastly, use the button to select a folder and enter an output file name. Click
OK, and the averaging will begin (tracked by a progress bar). A new multiple
window display will appear with the averaged waveforms.
<%COPYRIGHT - 2008%>
Main Menu bar 73
Now let's look at the SNR values that were calculated. For this example, we used
the P300.eeg file, corrected for VEOG artifact, and sorted for the Rare responses.
Click the right mouse button between the electrode displays, and select View SNR
Values option. You will see a display with the SNR values at each electrode site.
<%7317A Edit%>
74 Edit 4.5
Average Bands (frequency domain AVG, COH) - This option formerly existed as
the AVGBAND.exe utility program for the DOS version of EDIT. It is used to redefine
the frequency bands that are exported to an ASCII file. The output is a text file with a
.dat extension. Clicking the option (after retrieving a frequency domain AVG file or a
COH file) displays the following display.
<%COPYRIGHT - 2008%>
Main Menu bar 75
The display will contain whatever band names and Start/Stop frequencies there are in
The Band File Name field lets you select the path and output file name - click the
Browse button to see the standard Save As utility display. The output file
(viewed in Wordpad), will look similar to the following (shown in part).
Baseline Correction (EEG, AVG; time domain) - The baseline correct dialog box
allows you to modify the DC offset of the current average waveform. The mode option
provides four methods for correcting offset: First Point, Pre Stim Interval, Entire
Sweep, and User Defined.
Note
<%7317A Edit%>
76 Edit 4.5
Select the option and you will then see the Baseline Correction display.
The top of the display shows the epoch interval. The next region gives the options for
determining which part of the epoch you want to use for the baseline correction.
First Point - The First Point option simply sets the first data point to zero voltage
(the voltage of the first point is subtracted from all data points).
Pre Stim Interval - Evoked potential studies typically use the pre-stimulus interval
to determine the baseline correction. The voltages from the pre-stimulus data
points are averaged, and that value is subtracted from all data points.
Entire Sweep - EEG sweeps are typically corrected for baseline drifting by using
data points from the entire sweep. All points are averaged, and the average offset
is then subtracted from each data point.
User Defined - On occasion you may wish to specify the range to use for baseline
correction. When enabled, the Start and End fields will also be active, and you may
enter the times (in ms) which will be used to determine the baseline correction. These
points are then averaged, and the average voltage offset is subtracted from all data
points.
<%COPYRIGHT - 2008%>
Main Menu bar 77
Channels - You may also specify which channels you wish to have corrected. Enable
the All button to correct all channels. Enable the Specified field, and the click the
Select button, to select specific channels. A montage diagram will appear. Electrodes
that are selected will be green, and electrodes that are excluded will be red. Move the
mouse over an electrode label, and the fields below will show the label and the status.
Double click on an electrode label to change its status. The Select All button will
select all channels for correction; the Deselect All will exclude all channels for
correction.
Don't Correct - You can also select to not correct Bad and Skipped channels by
clicking in their fields. If you do not wish to Baseline Correct Bad channels, for
example, enable that option .
For EEG files, you must enter an output file name and path. For AVG files, this line is
grayed out. The correction is applied "in place", that is, it is applied directly to the
data file. You must save the file to store the changes.
<%7317A Edit%>
78 Edit 4.5
Reduction transform, the Blink Noise Reduction routine lets you reject sweeps using
Artifact Rejection criteria.
The Blink Noise Reduction transform is part of the Toolbox add-in software, and
requires a Toolbox license (your dongle must be programmed for the Toolbox to access
the option). Contact [email protected] or [email protected] if you want to
purchase the Toolbox. The operation of the Blink Noise Reduction transform (online
and offline) is described in the Toolbox manual.
2.4.11 Coherence
where xi and yi is a pair of real numbers sampled on occasion i. The first step from this
definition towards that of coherence is to extend it in a natural way when the number
pairs are complex, as follows:
The next step is to consider xi and yi to be concurrently measured time series, such
as EEG sweeps concurrently recorded at two scalp locations. In this example, xi(t) is
the EEG value recorded at electrode x on sweep i at time t. Equation (1) may be
<%COPYRIGHT - 2008%>
Main Menu bar 79
applied at each time to yield a correlation time series. Alternatively, each time series
can be translated to the frequency domain as a frequency spectrum of complex
numbers Xi(f) and Y i(f), in which case equation (2) may be applied at each frequency.
The result is a complex correlation spectrum (also referred to as a coherency
spectrum, except that the subtraction of mean values in equation (2) is not always
implied by the latter term). Finally, the coherence spectrum consists of set of real
numbers ranging between 0 and 1, and is obtained by squaring the magnitude of the
complex correlation (i.e., coherency) spectrum numbers. For each frequency, this
number measures the proportion of variance in the data that can be accounted for by
a best-fit linear relationship between the two variables.
Coherence versus Coherency - You will see that both terms are used, and they
have different meanings from each other. Coherency includes phase information.
Coherence is a real number, whereas coherency is a complex number. The
transform actually computes the coherency spectrum, although only coherence is
currently displayed. Coherence is the magnitude squared coherency. The relative
phase between two channels is also derived from coherency (the arctangent of
the imaginary part divided by the real part).
Statistical analyses with COH values. The COH and ERCoh values, ranging from 0 to 1,
are NOT normally distributed. They behave like the square of Pearson's r values (the
square root of the COH and ERCoh values resemble the absolute value of Pearson's r).
Pearson's r can be Fisher z-transformed to become approximately normally distributed.
Therefore, except for the "absolute value" qualification, Fisher's z-transformation (or
others) should work well when applied to the square root of the COH and ERCoh
values. You should, however, consult with statistical resources to determine the
validity of any further statistical analyses you perform with COH and ERCoh values.
After retrieving the EEG file, select Transforms from the Main Menu. Note: The number
of points in the EEG file must be a power of 2 (such as, 512, 1024, etc.). If the
number of points in your data file is not a power of 2, use the Spline Fit transform to
modify the number of points. The file used in this demonstration was the closed.eeg
file (which was epoched with a 1-512ms duration. The AD rate was 500Hz, giving 256
points per sweep).
Select Coherence from the Transforms menu, and see the Coherence display.
<%7317A Edit%>
80 Edit 4.5
Maximum Frequency, Hz - The first field displays the Ultimate maximum frequency,
which is half the AD rate, and is the maximum frequency that is calculated in the
FFT spectrum. You may enter a lower number in the Computation maximum
frequency field (up to the Ultimate maximum frequency). For example, it would not
be unusual for the calculations to be conducted on frequencies well beyond those
that might be of interest. This field lets you place an upper frequency limit on the
calculations. Using a lower Computation maximum frequency will also speed up the
calculations.
Selection of Channel Pairs - The electrode pairings field determines the pairwise
electrode comparisons that will be computed. If you use the default All Pairs
option, all pairwise comparisons are made. A subset of comparisons can be
specified by a "bipolar" montage file. You must first have created the montage you
wish to use. Please refer to the Montage Editor section in the Appendix at the end
of this manual for more details. For demonstration purposes, select the All Pairs
option.
Retain the Mean - The usual formulas for coherence assume that we are
dealing with a zero mean process. Thus, they do not explicitly subtract a mean
value. In other words, it is usually assumed that there is not an event-related
average response. It is safest to remove the mean, whether or not there is an
<%COPYRIGHT - 2008%>
Main Menu bar 81
event-related response, and this is the default setting. Recalling the form of
covariance divided by the product of two standard deviations, removal of the
mean is equivalent to the subtraction of the mean inside the covariance and
standard deviation formulas. Retention of the mean is equivalent to the
non-subtraction of these means. This option is included for those who would
like to verify that the standard coherence formulas, in fact, do not subtract
the mean.
Note
If you want to export user-defined frequencies, please use the Average Bands
transform.
Sort... - The button accesses the Sorting Criteria display used in many
of the transforms to allow you to select the sweeps that use wish to include. If
you plan to sort by responses, please see the section entitled "Some notes
about response codes 100 " for some important details.
For demonstration purposes, leave these options disabled, and the sweeps not
sorted. When you have made the settings you wish, click the OK button.
Output File - Click the button to select a folder and enter an output file name,
then click OK.
A progress bar will track the computations, and you will then see a new multiple
window display containing the coherence results.
<%7317A Edit%>
82 Edit 4.5
This display shows the coherence values between FP1 and the other electrodes.
Zoom into the FZ electrode. You will see the coherence values ranging from 0 to
1.0 on the y-axis, and frequency on the x-axis.
The different colors differentiate Delta, Theta, Alpha and two Beta bands. The
colors and the band width delineations are set in the Multiple Windows Settings
under Options (described below).
Since we had selected All Pairs above, we can see the coherence values between
any given electrode and the remaining ones. To see CZ, for example, click the CZ
electrode display with the right mouse button, and select .
You will then see the coherence values between CZ and all other electrodes.
<%COPYRIGHT - 2008%>
Main Menu bar 83
Note
In prior versions of SCAN, it was possible to subtract one COH file from another
COH file. This is not a valid operation (it is analogous to subtracting correlations
from correlations) unless you first perform a transformation on the COH values. The
SCAN software does not provide these transformations, so you will need to export
the COH values to ASCII, and then perform the additional operations in a statistical
package or with a program you write.
Correlate Peaks (CNT) - The Correlation Peaks transform, unlike the EKG Noise
Reduction transform (part of the Toolbox), has no option to use a voltage threshold to
identify peaks; you must use either stimulus or response codes positioned at the
peaks. In most cases, you will not have those events. They can be added easily using
the Voltage Threshold or QRS Detection transforms (see example below). They can
also be added manually using the Insert Multiple Events option (described below).
<%7317A Edit%>
84 Edit 4.5
Correlation Interval. This functions the same way as in the EKG Noise Reduction
transform. A series of intra-class correlations is performed between the
Correlation Interval of the current sweep (using the Correlation Channel you
select) and the same interval in the average artifact (relative to the trigger that
has already been defined). The correlation interval is defined by the Correlation
Interval Start and End times. The current sweep is shifted by the number of data
points necessary to maximize the correlation, then the sweep is averaged in with
the previous artifact sweeps. This process can reduce the variability in the
average artifact, and thereby improve the subtraction result (using the Subtract
Average transform). The Shift Limit option (measured in data points, not
milliseconds) limits the range within which the interval can be shifted. (If you
enter, for example 10 points, the span will be 10 points in either direction). It
prevents the shifting from extending too far. Avoid excessive Shift Limits as they
will place an increasing demand on processing time. As a general rule-of-thumb,
the Shift Limit should encompass about half of the peak of interest. Say there is
an EKG R wave peak with a duration of about 40ms, with an AD Rate of 500Hz. Try
a Shift Limit of half the R wave span - 10 points (20ms).
<%COPYRIGHT - 2008%>
Main Menu bar 85
You do not necessarily have to include the artifact trigger within the Correlation
Interval. In some cases, you may want to use a different section for the
correlation. The section might delineate a more stable waveform in the artifact.
Averages is the number of artifact sweeps that will be averaged to create the
average artifact that is then correlated each successive artifact sweep. The
average is rolling, that is, only the N most recent artifact sweeps are averaged,
where N is the value you enter for Averages. You should average at least 10
sweeps - more if possible - for adequate EEG cancellation to occur in the average
artifact.
Poorly Correlated Peaks. Poorly correlated is defined as any value less than the
Threshold (%) you enter. The Threshold (%) is the correlation x 100. If the
obtained (maximum) correlation exceeds the Threshold you select, that sweep
will be included in the accumulating average artifact. If not, the sweep is
excluded. This provides a method for ensuring that only genuine artifact sweeps
will be included in the average artifact.
Remove. If you select Remove, then the type codes will be removed for any
sweep not having a correlation that reaches the Threshold you enter.
Change Code. When enabled, any sweep whose correlation does not reach
the criterion will be given a new type code (that you select). The idea is to run
the transform once, and identify the uncorrelated sweeps. Then run it again
specifying that event code, and change the codes of any of those sweeps that
do not correlate. Repeat as many times as is needed. In this way, classes of
responses that are correlated within themselves - but not correlated with other
classes - can be identified. The option was designed for use in files with
difficult BCG artifact (where there are classes of BCG artifact that appear
through the recording). The EKG Noise Reduction transform can then be used
with each stimulus event code. The result is a more effectively corrected file
(see the MagLink RT manual for more details).
When you apply the Correlate Peaks transform, it may appear as if nothing has
happened. In fact, the event marks have been shifted to maximize the correlation.
You can see this by creating epochs about the peaks just after using the Voltage
Threshold transform to place them, then averaging those sweeps. Then apply the
Correlate Peaks transform to the CNT file, and epoch and average the sweeps
again. The new average will be based on the aligned peaks, rather than the type
codes as they were originally positioned (even then, the difference may be very
subtle in some files). In the example below, the original average is the peaks.avg
file, and the correlated peaks is the peaks corr.avg file.
<%7317A Edit%>
86 Edit 4.5
If you have the Change Code option enabled, you will see which event codes have
been changed.
Note
The Correlate Peaks transform does not have to be used solely with EKG/BCG
Artifact Reduction. It aligns by waveform morphology rather than by event codes.
It therefore acts like a Woody filter, and can be used with any waveforms that
have event marks for the peaks. It may also be useful for other types of activity
where "binning" of correlated activity is apparent.
<%COPYRIGHT - 2008%>
Main Menu bar 87
You first need to select a Reference file to correlate with the working file. Click
the Browse button , and select the sepblk.avg file from the Open File utility
display. The Epoch Interval area shows the starting and ending time points of the
epoch.
The Correlation Interval fields allow you to select the segment of the epoch to
include in the analyses. For this demonstration, use the entire epoch. In the
Channels field, select All channels. If desired, you may Specify the channels you
wish to include (click the Select button, and select the channels from the montage
display that will appear).
Enter the name and path for the Output File. After a brief pause for the
computations, you will see a new multiple window display containing the cross
correlation coefficients. Zoom in on the C3 electrode.
<%7317A Edit%>
88 Edit 4.5
The y-axis displays Pearson's r correlation coefficients. The x-axis is time. The
cross correlation statistic computes the correlation between two waveforms at
various points in time, in a lagged fashion. That is, correlations are calculated first
at time zero, where the two waveforms overlay each other with the same 0ms
time point. Then, one waveform is lagged (to the next data point), and the
correlation is run again. This is repeated in both directions from 0ms (lagging in the
positive and negative directions along the x-axis). Note that the waveform in the
display above is essentially symmetric about the 0ms time point. This is to be
expected since the waveforms are shifted in both directions from zero.
Note that the x-axis extends to +/- half of the original total sample interval. As
the waveforms lag farther and farther apart, there are fewer and fewer data points
for the correlation. Therefore, we limit the lagging to half of the total interval
duration. At 0ms on the cross correlation output file, the r value is the same as if
you had calculated the Pearson's r statistic. The waveforms between the two files
are very similar.
Now, imagine shifting the sepblk.avg waveform (in red) to the right by 22ms, and
then recalculating the correlation for the entire epoch (or, rather, the remaining
sections that still overlap). You can imagine that the resulting waveforms will be
largely out of phase with each other, thus the negative correlation.
<%COPYRIGHT - 2008%>
Main Menu bar 89
Files with mismatched labels. If you try to correlate two files where a subset of
channels labels differ between files, the mismatch is detected automatically, and
the following screen is displayed.
You then have the option of correlating only those channels that have matching
electrode labels (the default option), or specifying the pairs of channels using a
montage (.mnt) file. In the first case, you will see flat line for the mismatched
channels. If you use a .mnt file, you will see results only for the designated pairs
(with labels such as F7-F8, F3-F4, etc.). If you do not already have an .mnt file,
you may click the Montage Editor button and create one. The resulting file will
appear similar to the one below.
<%7317A Edit%>
90 Edit 4.5
Cut Epoch (EEG, AVG; time domain) - The Cut Epoch option will create a new AVG
or EEG file with Start and Stop time points that are less than the original file. After
retrieving an AVG or EEG file, click Transforms, and the Cut Epoch. The Cut Epoch
display will appear.
The current Epoch Interval is displayed at the top. Enter the desired Start and Stop
latencies (in ms), then use the button to enter a file name and designate the
path. Click the OK button to apply the transform, then a new multiple window display
will appear with the new Start and Stop latencies.
One of the things that we have observed with some regularity since we began offering
DC amplifiers is that users who are accustomed to recording in AC mode are concerned
by the drifting waveforms they encounter when first recording using a DC high pass
filter. Generally we recommend that users who are not specifically interested in steady
state, slow DC potentials should record in AC mode or in DC mode with high pass filter
settings other than DC. Doing so will avoid or minimize the special concerns that are
present with DC recordings.
Many of these special considerations for DC recordings are detailed in the amplifier
manuals. If you are experiencing excessive DC drifting, or if you are recording in DC
mode for the first time, we urge you to read the "DC electrode considerations" section.
<%COPYRIGHT - 2008%>
Main Menu bar 91
When recording in DC mode, the focus of interest is the relatively slow drifting that is
seen, for example, when the subject is in a readiness state, such as when anticipating
a meaningful stimulus or preparing a response. DC offsets and drifting can also occur
artifactually, and it is important to have the ability to remove spurious DC artifact.
The distinction between DC offset versus DC drift is that DC offset is constant, steady
offset from zero voltage. When a DC correction is made, that area immediately around
the span of the correction is not included in the epoched data, as it would cause a
large artifact (see diagram). In other words, sections of the continuous file that have
DC corrections will be excluded from the epoching process. Continuous recordings
should have only a few DC offset corrections, if any. These should be considered as
permanent events that cannot be removed.
DC drifting is seen as a gradual shifting that may occur throughout the recording.
Several DC corrections may occur during the course of the recordings.
<%7317A Edit%>
92 Edit 4.5
case of variable inter-trial intervals. Moreover, note that use of an averaging window:
(a) collapses all time points in the window interval to a single time point (say, the
interval midpoint) and (b) only estimates the constant term of the polynomial in this
interval (neglecting the linear, quadratic, etc., coefficients). For these reasons, the
method described here treats each context point independently (without windowing).
Advantages are: (i) the user does not have to worry about an appropriate window
interval, (ii) all context points are included in the estimate, (iii) there is no loss of time
resolution due to collapsing of points in an interval, and (iv) each point (taken
together with all others) contributes to the estimation of all polynomial coefficients --
not just the constant term. Moreover, the same algorithm can be applied to
event-unrelated data (e.g., eyes-open EEG), in which case all artifact-free portions of
the data record are used to estimate the drift.
Retrieve your CNT file, and select DC offset correction from the Transforms list.
DC Offset Correction - These fields let you specify the start and stop points of the
intervals that will be used. These points are depicted graphically on the display.
Pre-interval stop (ms) - Sets the stop point of interval before a DC correction.
<%COPYRIGHT - 2008%>
Main Menu bar 93
DC Drift Correction - This option performs a polynomial fit of the DC level for the
entire correction interval. Correction coefficients are computed separately for each
start/stop interval. Enable the field if you wish to perform DC correction. The order
of the polynomial fit and the exclusion criteria are set in the fields described below.
The Save the Drift Waveforms option will save the DC drift function to an AVG
file for each start/stop interval.
Polynomial Order - Sets the order of the polynomial function used to estimate
DC drift. If you are not sure what order to use, 1 is a straight line, 2 is a
parabolic appearing function, 3 is more similar to a sine wave (an upward and
downward parabolic function), and so on. Try different polynomial orders, Save
the Drift Waveforms, and see what drift components are being removed with
each order. Then decide which order best removes the drift component in your
data files.
Exclude Events - The events listed below may be excluded from the correction.
Stimulus - Ignores DC values that fall within the current epoch (see below)
for stimulus events.
Response - Ignores DC values that fall within the current epoch (see below)
for response events.
Keyboard - Ignores DC values that fall within the current epoch (see below)
for function key events.
Save Drift Waveforms - When enabled, you will be able to create and save an
AVG file that contains the drift functions that were removed.
Entire recording / Between corrections - Prior to SCAN 4.3, the drift correction
routine used the entire recording in the analysis. In the correction process, one
of the early steps is to remove the DC offset corrections. In longer files with
gradual drifting, or shorter files with more severe drifting, this could result in
clipping of data toward the end of the file as the signals approach saturation.
Beginning with the 4.3 version, you have the option to use the Entire
recording (same as prior versions), or to use the Between corrections
option. This avoids (or minimizes) the potential clipping problem by analyzing
the sections between the DC corrections independently, rather than using the
entire file.
Note
DC corrections are applicable only to DC continuous files. Be sure to enable the
<%7317A Edit%>
94 Edit 4.5
drift option before performing any transform such as the Epoch operation. To
compare the effects of DRIFT correction on an averaged ERP, first, perform the
DC correction with the drift option turned on. Next, epoch the file into the desired
interval. Finally, average the EEG file created from the epoch procedure.
Step 1. Scan the event table for start/stop events. This determines the number of
discontinuous pieces in the CNT file, and starting point numbers for the
boundaries.
Step 2. Scan the event table for physical DC correction events. This determines
the number of DC corrections, the point numbers where they occur, and the
cumulative offset that should be added to points following the corrections.
Step 3. Scan the event table for points to include in the analyses. This counts the
number of contiguous intervals to include in the analysis, with starting point
number and stopping point number for each interval. These intervals exclude
artifact-rejected regions as well as regions that contain event-related responses
(as specified by the user).
Step 5. Solve for the polynomial coefficients, ak for each channel k. The equation
to solve is: Ba k = C k, where C k is the k-th column of C. We can use
LU-decomposition of B with back-substitution. This also is done separately for
each contiguous piece.
Step 6. Correct the data. Subtract the fitted polynomial function values (for each
channel and for each contiguous piece) from the original values for all the time
points (including previously excluded points).
Step 7. To save the corrected file, select File g Save As (or click the button),
and enable the option.
2.4.16 Deblock
Deblock (CNT; time domain EEG and AVG) - The Deblock option has a similar
2
function to Deblocking with the SynAmps and SynAmps amplifiers, and it can be
performed offline. It is used to replace, for example, SEP stimulus artifact with a flat
<%COPYRIGHT - 2008%>
Main Menu bar 95
line. Windowing is performed to minimize any abrupt transitions at the beginning and
end of the flat lines.
Selecting the transform displays the dialog box shown to the right. Select a Type of
Window and the Length for the taper. Then select All channels, or you may specify
only certain channels. In the Deblock duration region, Start and End define the limits
of deblocking. With CNT files, you will also see the Trigger field. Enter the event code
number about which you want Deblocking to be applied. An output file is required for
CNT and EEG files; Deblocking is performed "in place" with AVG files and no output file
name is required.
<%7317A Edit%>
96 Edit 4.5
Had we applied it to a CNT file, where the stimuli were presented with a type code of
2, we could have removed the artifact by entering 2 in the Trigger field. (The Duration
End time was increased to 100ms in the example below to make Deblocking more
evident). The arrows indicate where Deblocking occurred. You can bracket the events
by using, for example, -100 to 100ms.
2.4.17 Decimate
Decimate (CNT) - The Decimate transform was created primarily for use with data
files recorded in the MRI, and is used to reduce the AD rate (and file size). This is also
one method for reducing the noise in the recording. Retrieve the CNT file, select the
Decimate transform, and select a New Sampling rate from the list of pull-down
options. Current Sampling rate is the AD rate of the retrieved file. Valid AD rates are
only those rates that are lower submultiples of the AD rate in the data file. The
submultiples are computed automatically for each file based on the Current Sample.
Enter an output file name, and click OK. A new CNT file will be created with the lower
AD rate (and smaller file size). Prior to decimation, an IIR low pass filter should be
applied (passed four times) to correct for aliasing. Enter the Low Pass limit and desired
slope (from the pull-down list).
<%COPYRIGHT - 2008%>
Main Menu bar 97
In the example below, MR gradient artifact was greatly reduced following decimation
from 10000 to 1000Hz, with a 30Hz, 24dB/oct filter (note the Scale tool difference).
For MRI analyses, it is better to use the fMRI Artifact Reduction transform (described
in the MagLink RT manual), which includes decimation as an option.
Delete Bad Channels (CNT) - This option will create a new CNT file with the
"Bad" channels excluded. Bad channels are designated in ACQUIRE, or in EDIT, from
the Channel Attributes screen (or by right clicking on the channel label). To create
the new file, select the Delete Bad Channels option under Transforms, and Save As
display will appear. Enter a file name, designate the path, and click Save. A new single
window display will appear with the "Bad" channels deleted.
Delete Rejected Sweeps (EEG; time and freq domain) - This option will create
a new EEG file containing only the sweeps that have been accepted. After retrieving
an EEG file, click Delete Rejected Sweeps under Transforms. The standard Save As...
screen will appear. Enter a file name, designate the path, and click Save. A new
multiple window display will appear without the rejected sweeps.
<%7317A Edit%>
98 Edit 4.5
EKG Noise Reduction (CNT) - Offline EKG Noise Reduction is part of the
Toolbox add-in software. It is designed primarily for the reduction of ballistocardiogram
and heart beat artifact encountered with EEG recordings in the MR bore. For more
information about obtaining the Toolbox, please contact [email protected] or
[email protected]. If you have a Toolbox license, please refer to the Toolbox
manual for operational details.
Epoch File (CNT) - After retrieving a continuous file, the Epoch File option is used
to create an EEG file containing a series of sweeps. The epochs are created around
either stimulus, response, or function key events.
After retrieving the CNT file, click Epoch File under Transforms, and the Epoching
Properties window will appear. This is divided into three sections: Mode, Interval, and
Event Types.
Mode - The Mode region is used to specify the type of triggers, or absence of
triggers. For instances where the triggers were sent from STIM or a similar stimulus
presentation package, the Mode will be Port/Internal. If you are epoching a
continuous file with no triggers, and just want to do back-to-back epoching,
select the No Trigger option. If you are epoching the CNT using an event file,
<%COPYRIGHT - 2008%>
Main Menu bar 99
Interval - The X Minimum and X Maximum fields (in ms) set the start and stop
time points for the epochs. For example, if you want epochs to include the 100ms
prior to the trigger to the 1000ms after the trigger, enter -100 and 1000. Points is
the actual number of data points you have within the specified interval. If you
enter the X Min and X Max values and click in the Points field, it will calculate the
number automatically. If you enter the X Min time and then the number of desired
points, then click in the X Max field, it will automatically calculate the X Max time
point. The latter option is useful if you plan to perform FFT or coherence analyses.
These both require that the number of points be a power of 2. (See the Spline fit
transform if you have epoched or averaged data where the number of points is not
a power of 2, and you wish to do an FFT or coherence analysis).
Note
2
If you have Stim , and are using the Mouse or Keyboard for the Response Device,
please see the section entitled Stim2 Response Devices 7 .
Shift Interval by Response Latency - This option provides the preferred method
for performing response-locked averaging. To use it, you should 1) have
merged the behavioral data from the STIM .dat file with the CNT file, 2) enable
the option, and 3) enable the Stimulus field in the Event Types field. The
button will be active, allowing you to do sorting by any of the
appropriate fields, including the Correct field (which uses the Accuracy
information contained in the .dat file). The program basically takes a given
stimulus and shifts the zero time point forward by the response latency.
Consequently, there can only be one response per stimulus. If the subject
made more than one response, only the first one will be recognized.
In some paradigms, such as the "go - no go" instance, you may have responses
to some stimuli and not others. In that instance, if you look in the .dat file, you
will see some larger number for the Latency of the absent responses (such as
2.0). The number will vary depending on the timing of the presentation of the
stimuli, but it will be a uniformly larger number than the actual responses. In
this case, you should sort using a latency that is faster (smaller) than that
number, so that these trials are excluded from the epoching process.
Response-locked averaging without the .dat file - If you do not have a .dat file
from STIM, or elsewhere, you can still do response-locked averaging, but you
will not have access to all of the Set Sort Criteria options. The program will
create epochs around every Response Pad trigger that is in the file.
Reject Epochs that Overlap Rejected Blocks - If you reject a block of data in a
CNT file, you would normally exclude that section when you Epoch the file. If
you enable this option, those epochs that overlap the rejected blocks will be
<%7317A Edit%>
100 Edit 4.5
excluded. However, you can opt to include them by disabling the option.
Event Types - These options let you specify whether you want the epochs to be
created around Stimulus triggers, Response triggers (after the .dat file has been
merged - see Response-locked Averaging above), or trigger events placed from the
Keyboard (function key events). You may sort the sweeps at the same time as
you create the epoched file. Click the button, and the same
Sorting Criteria screen will appear as described above under Average. Enter the
criteria as desired, and click the OK button.
Click the button to select a folder and enter an output file name, then click
Save. A bar will show the epoching progress. When it is completed, you will see a
new multiple window display with the first sweep of the epoched file.
Note
The Epoching transform checks to see if any of the following occur:
You may encounter some confusion when dealing with the STIM Response Pad
codes. There are a few things to keep in mind that will help explain the way this
works. First, when the subject presses button 1, 2, 3, or 4 on the response pad,
you will see 1, 2, 4, or 8 appear in the CNT file. This merely reflects the bit value
at the port. In the STIM .dat file, however, you will see response values of 1, 2, 3
or 4.
When you merge the .dat file (Merge Task Data), the response information for
each specific stimulus (code, accuracy, and latency) from the .dat file is merged
with the stimulus trigger in the CNT file. Upon resaving the CNT file, this
information is stored, and these are the numbers that can be used for sorting.
Note that you do not need to have response codes in the CNT file to merge a .dat
file, only the proper stimulus codes.
However, if response triggers are present in the CNT file, this provides an
additional method via which response-code sorting may be achieved. Therefore,
there are two separate conditions which enable sorting by response information,
and these are outlined below.
Sorting based on the code of the response triggers. When you Epoch the CNT
file, you will notice that there is a Response field under Event Types, and
there is also a Response field if you select Stimulus, and then the
button. If you select only the Response field under Event
<%COPYRIGHT - 2008%>
Main Menu bar 101
Sorting based on the response information in the .dat file. Merging the .dat file
gives you access to the latency and accuracy data that is contained in the
.dat file, so merging the .dat file with the CNT file is necessary if that
information is desired. Now, lets say you are going to Epoch the CNT file, but
wish to create epochs around the stimulus triggers (NOT the response
triggers). However, you only want to epoch around the stimuli where the
subject responded with a certain code. To do this, select the
button, and you see the Response field there. This is used to select only
those stimuli that have the merged response types you enter in the Response
field. It is still the stimuli that are being averaged, not the responses. Since
the .dat file has been merged in this case, the responses are therefore 1, 2, 3
and 4, rather than 1, 2, 4 and 8. If you enter 4 in the response field, only
stimuli having responses from the 4th button will be averaged. Note: this type
of sorting is only possible AFTER a .dat file is merged.
Care
Be careful when you enter the response values because you can encounter
problems if you do not fully understand what you are doing. For example, if you
merge the .dat file, a 4 in the Response field is truly the 4th button; whereas, if
you have not merged the .dat file, a 4 in the Response field indicates the 3rd
button on the response pad, and so forth.
Note
2
If you have Stim , and are using the Mouse or Keyboard for the Response Device,
please see the section entitled Stim2 Response Devices 7 .
Event File (CNT) - You can epoch a continuous file without first creating an event
file (.EVT or EV2). However, using an event file provides more flexibility in epoching a
continuous file. Event files are text files that can be modified prior to epoching
either manually with the aid of an editor, or automatically with the aid of a computer
program of your own design. Event files also allow you to view all of the events that
have been recorded in the continuous file. The Event file dialog display will appear.
<%7317A Edit%>
102 Edit 4.5
There are two types of event files created and used by the EDIT program - EVT and
EV2. The original event files (SCAN 3 and SCAN 4.0) were the EVT type, and contain
the following information.
Each row corresponds to an event in the CNT file. For each event, the first column
<%COPYRIGHT - 2008%>
Main Menu bar 103
gives the event number; the second column gives event type; the third column gives
response type; the fourth column gives response accuracy (1 = correct, 0 = incorrect,
or -1 = no response); the fifth column gives response latency in seconds (no
responses in the above example); and the final column gives a file offset in bytes
which points to the events location in the CNT file. The behavioral variables
response type, accuracy, and latency will be set to determinate values only if a
.dat file is specified when the event file is created.
In the initial release of SCAN 4.1.0, the sixth column was changed to display the
POINT offset, rather than the BYTE offset. That is, the column contains the number of
data points into the file where the event occurred. These event files also had EVT
extensions. Beginning with SCAN 4.1.1, there are two event file types - EVT and EV2
(extensions). The EVT files are the same as and compatible with those used in SCAN 3
and SCAN 4.0. They all list the BYTE offsets. The EV2 files contain the POINT, or
SAMPLE offsets. The EV2 files in SCAN 4.1.1 are the same as the EVT files created in
SCAN 4.1.0.
The EV2 files are in some respects easier to work with than byte offsets: they are
independent of the number of channels, the header size, and the number of bytes per
sample.
In versions 4.1.1 and later, you will have the option to use either type of event file.
When you prepare to run the Event File transform (described in more detail below),
and click the browse button in the Event File field, you will see a standard Save File
utility.
Click the pull-down arrow in the Files of Type field, and you will see the options to
<%7317A Edit%>
104 Edit 4.5
select the type of event file you want to save. When you Epoch a CNT file using an
existing event file, you will see a similar option for selecting the type of event file that
you wish to use.
Follow these steps to create an event file: Retrieve the CNT file, and select Event File
from the list of Transforms options. Select whether you want to include Stimulus,
Response, Keyboard, DC Corrections (appear in the event file with 'DC' in the second
column), and Start/Stop events (appear in the event file with 'SS' in the second
column).
Then decide whether to include Rejected Events (events that occur within rejected
sections of the file).
Next, you have the options to Report the offsets in seconds (as opposed to points or
bytes), and to include the column header information in the event file.
If you select to Report the offset in seconds, you will see the last column as
follows:
If you Include the column header, you will see the labels at the tops of the columns:
<%COPYRIGHT - 2008%>
Main Menu bar 105
A Save As... screen will appear in which you may enter the file name and path for the
event file (the .evt or .ev2 extension will be added automatically). The .evt and .ev2
files are text files, and may be viewed in most text editors.
Note
When making an event file from appended CNT files, the SS events (the Stop/Start
events inserted at the juncture of the CNT files sections and at the end of the file)
will appear as events.
On the epoching display, select Event File under Mode, and click the browse
button to access an Open File utility. You have the option for using either the
EVT or EV2 versions of event files (described above). Select the event file for the
particular data file. Then epoch the file as usual. Epochs will be created based on
the event information in the event file (which may be modified in a text editor).
<%7317A Edit%>
106 Edit 4.5
Note
In Event Related Band Power (and Event Related Coherence), "power" is not
computed using an FFT, and there is not the constraint where the number of points
in the epoch must be a power of 2. Instead, complex demodulation is used. Filtering
and complex demodulation occur as part of the same operation, as follows: 1a), the
raw data for each channel are multiplied, point by point, by a pure cosine having the
user-selected center frequency; 1b), in parallel with 1a), the same raw data are
multiplied, point by point, by a pure sine having the same center frequency; 2a), the
time series from 1a) is lowpass filtered by the half-bandwidth; and 2b) the time
series from 1b) is likewise lowpass filtered by the half-bandwidth. This results in a
complex time series: the real part comes from 2a) and the imaginary part comes
from 2b). In step 3), the ERBP or ERCoh computations are performed using the
complex time series.
Steps (1) and (2) make a bandpass filter. Step (1) shifts the entire spectrum to the
left so that the center frequency is moved to 0Hz; and step (2) lowpass filters the
spectrum by the half-bandwidth on either side of 0Hz (including the negative
frequencies). This results in a symmetric bandpass around the center frequency,
having the given bandwidth.
Complex demodulation is performed on the raw epochs. Averages and variances are
computed across epochs on the complex time series, and the ERBP and ERCoh
computations are based on these. (In addition, ERCoh also computes the covariances
between channels).
Induced Band Amplitude equals the square root of Induced Band Power.
Evoked Band Power equals the magnitude squared of the average in a frequency band
of interest, i.e., the power of average evoked oscillatory activity within a specified
range.
Evoked Band Amplitude equals the absolute magnitude of the average in a frequency
band of interest, i.e., the rectified average evoked oscillatory activity.
<%COPYRIGHT - 2008%>
Main Menu bar 107
After making the basic choice between Band Power and Band Amplitude, there are six
main sections to the display.
Bandpass filter The parameters in this section are used to filter the data in a
centered symmetric frequency band as an integral part of the transform. The
bandpass filter is Zero Phase (i.e., for all frequencies, filtered output phase equals
input phase), or you can select an Analog filter. The method of complex
demodulation achieves symmetric roll-off and enables computation of the signal
envelope. If the data have already been filtered in the band of interestor if it is
desired to compute event-related power/ amplitude measures for a broad band
then you can bypass the filtering option. For example, if continuous data have
been filtered prior to epoching, then problems associated with filter warm-up time
at the ends of the epoch can be avoided.
Center frequency - The Center frequency is the frequency at the center of the
frequency band of interest. The filter is tuned to this frequency.
<%7317A Edit%>
108 Edit 4.5
Half bandwidth - The Half bandwidth is used to specify the frequency range
about the Center frequency. For example, if the Center frequency is 10Hz, and
the Half bandwidth is 2Hz, then the frequency band is 8-12Hz (6dB down at
the ends). In this example, maximum sensitivity is centered at 10Hz, and the
filtered output of a pure 8Hz (or 12Hz) sinusoid has half the amplitude of the
input.
Rolloff - Rolloff controls the steepness of attenuation outside the band and
(simultaneously) the flatness within the band. The options are 12, 24, 48, and
96 dB/octave for zero-phase filtering, and 6, 12, 24 and 48 for Analog filtering.
Flatness inside the band and steepness of attenuation outside the band both
increase with increasing rolloff. There is a price to be paid for increasing rolloff
in terms of more pronounced end artifacts (ringing), longer warm-up time,
and slower computation. 48 dB/octave is the suggested rolloff. Rolloff
characteristics are squared Butterworth.
Warmup filter from the right Because the bandpass filter takes time to
warm up, artifacts appear at both ends of the epoch. Zero phase
characteristics are achieved by filtering in both directionsforward in time, and
reverse in time. Warmup filter from the right determines the order of filtering.
When this option is disabled, forward filtering precedes reverse filtering, in
which case warmup artifacts are predominant on the left (beginning of the
epoch). When enabled, reverse filtering precedes forward filtering, in which
case warmup artifacts are predominant on the right (end of the epoch). Use
Trim left and Trim right to remove these artifacts.
Reference interval - The Reference interval is tied to the Percent decrease option
in the Scaling section. When you calculate the Percent decrease, it must be in
relation to some other section of the epoch. The Reference interval lets you
specify that section.
<%COPYRIGHT - 2008%>
Main Menu bar 109
Start / Stop - The Start and Stop times are used to specify the beginning and
ending of the Reference interval. These must be selected from values within
the Trimmed range. Typically, the Reference interval will be the pre-stimulus
interval. In that case, Trim left should not be so long that the pre-stimulus
interval is trimmed away completely. You can avoid this by Epoching the
original CNT file so it has longer pre-stimulus and poststimulus intervals than
desired, thereby allowing for the sections that will be trimmed.
Range & Trimming Filter warmup artifacts at the edges of the full time range can
be trimmed away. It is recommended that generous-sized epochs, longer than
otherwise required, be made from continuous data prior to this transform to
permit adequate trimming. The amount of trimming required can generally be
determined by inspection. More trimming will be required as the filter Rolloff
increases.
Phase locking - The Phase locking options allow you to select phase-locked,
non-phase-locked, or both types of activity.
<%7317A Edit%>
110 Edit 4.5
Scaling - The results in the final output AVG file can be computed with different
Scaling options.
Power For Band Power, the Power scaling option will display the raw power in
2
mV .
Amplitude For Band Amplitude, the Amplitude scaling option will display the
raw amplitude in mV.
Band power, reference interval are understood as the mean band power in the
interval, and likewise for band power, test interval. That is, the band power is
scaled per time sample. Desynchronization is expressed as a percentage of
activity decrease relative to the Reference interval. Thus, ERD is positive, and
ERS is negative.
Z-score - The z-score option converts the raw power or amplitude values to
z-scores on a per channel basis, where the mean and standard deviations are
computed across time.
Averaging window - The narrower the bandpass interval, the more you need to
smooth or collapse the results to eliminate the ripples that may occur. If you
selected the Envelope option above, the smoothing is automatically handled as a
function of bandwidth (increased smoothing with narrower bandwidth). When the
Averaging window is enabled, the window duration field becomes active. This is the
duration of the span that is averaged for collapsing or smoothing the results. Some
typical values found in the literature are, e.g., 125 or 250ms. If the bandwidth is
increased, the averaging window can be made smaller. The Averaging Window is
disabled by default.
<%COPYRIGHT - 2008%>
Main Menu bar 111
Collapse - The collapse method averages the points within the Averaging
window to a single point. The resulting file will contain fewer points than the
original. The convention used here places the output point at the latency of
the first point in the Averaging window.
Smooth - The Smooth option averages points by using a moving window. Unlike
the Collapse option, where there is a reduction in the number of points
(through averaging throughout the window), the Smooth option does not
reduce the number of data points.
Sort Criteria - Click the button to access the standard Sorting Criteria
dialog box to select various, trials, type code, etc. If you are using the Response
field, please see the section entitled "Some notes about response codes 100 "
for some important information.
Output file - Click the button to select a folder and enter an output file name.
Using Event-Related Band Power - From the above descriptions you can see that
there is a large range of possible options that may be employed. While analyses
with event-related band power are relatively novel in the literature, there are some
conventions that have emerged.
Traditional ERD - The more traditional method for computing event related
desynchronization may be replicated here by selecting the following options.
Select Band Power or Band Amplitude, as desired (we will use Band Power for
this example). Disable the Envelope option, use the Reference interval and the
Percent decrease scaling option, use ERD/ERS, and set the Averaging window
span to 100ms, with the Collapse option. The settings below might be used to
investigate the ERD (positive decrease) and/or ERS (negative decrease) at
10Hz. This example used the P300.eeg file, sorted for the RARE responses only
(type code of 2), where the VEOG activity had been removed using the Ocular
Artifact Reduction transform (you should always remove the EOG artifact
before you compute Event-related band power).
<%7317A Edit%>
112 Edit 4.5
The resulting AVG file would appear as the following. The largest differences in
Band Amplitude, in relation to the Reference interval, for 10Hz, occur around
500ms at the areas displayed in the 2D map.
<%COPYRIGHT - 2008%>
Main Menu bar 113
The Envelope option - We recommend also that you perform your analyses
using the Envelope option. As described above, this has a similar effect as the
smoothing function, and it performs it automatically. We suggest the following
as an additional way to investigate event-related band power. Select the
Envelope option under Bandpass filter, disable the Reference interval, use
Evoked activity (any of the options is OK), Power scaling, and disable the
Averaging window. We will also perform the same calculations a second time
without the Envelope option, in order to demonstrate its effect. In this
<%7317A Edit%>
114 Edit 4.5
example, we sorted for the RARE responses only (Type 2; using the VEOG
corrected P300.eeg file).
The figure below shows the results at O2 with and without the Envelope (the
red oscillating line is without the use of the Envelope).
The results show that the greatest increase in the Evoked activity in the
approximate 8-12Hz band occurs between 200-400ms at the right posterior
<%COPYRIGHT - 2008%>
Main Menu bar 115
sites.
Klimesch, W., Doppelmayr, M., Schimke, H., & Ripper B.; Theta synchronization and
alpha desynchronization in a memory task; Psychophysiology; 1997; 34, 169-176.
Klimesch, W., Russegger H., Doppelmayr, M., & Pachinger Th.; Induced and evoked
band power changes in an oddball task. Electroencephalography and Clinical
Neurophysiology; 1998; 108 (2) 123-150.
ERCoh is computed from epoched EEG data using the coherence formulas already given
in the manual under the Coherence section above. However, in this case, the
frequency of interest is preselected, and the results are a function of time with
respect to the event at time zero. The real and imaginary parts come from
sweep-by-sweep complex demodulation rather than from sweep-by-sweep FFT.
(Consequently, the data do not need to have a power of 2 number of points for
ERCoh; see the Note near the beginning of the Event Related Band Power section
above for more details).
Statistical analyses with ERCoh values. The COH and ERCoh values, ranging from 0
to 1, are NOT normally distributed. They behave like the square of Pearson's r
values (the square root of the COH and ERCoh values resemble the absolute value
of Pearson's r). Pearson's r can be Fisher z-transformed to become approximately
normally distributed. Therefore, except for the "absolute value" qualification,
Fisher's z-transformation (or others) should work well when applied to the square
root of the COH and ERCoh values. You should, however, consult with statistical
resources to determine the validity of any further statistical analyses you
perform with COH and ERCoh values.
ERCoh applies mainly to epoched EEG files, but there is one variation that can be
applied to an AVG file.
Type/Phase locking - The possible combinations of Type and Phase locking are
<%7317A Edit%>
116 Edit 4.5
Coherence / Induced (not phase locked) - This is the typical case as described
above. The mean activity (phase locked) is removed, and the results are
normalized in the usual way so that the final result is a number between 0 and
1. The usual coherence formulas apply.
Coherence / Both (mean activity retained) - Same as the previous except that
the phase-locked (mean) activity is not subtracted away. Therefore, this result
includes both induced and evoked activities.
Bandpass Filter - Everything in this section is exactly the same as the analog in
Event-related Band Power. The envelope checkbox is not included because the
envelope is always computed for ERCoh. Trim left / Trim right is also the same as
for ERBP. Portions of the same information are presented below. (Please refer to
that section above for more details).
Warmup filter from the right Because the bandpass filter takes time to
warm up, artifacts appear at both ends of the epoch. Zero phase
characteristics are achieved by filtering in both directionsforward in time, and
reverse in time. Warmup filter from the right determines the order of filtering.
When this option is disabled, forward filtering precedes reverse filtering, in
which case warmup artifacts are predominant on the left (beginning of the
epoch). When enabled, reverse filtering precedes forward filtering, in which
case warmup artifacts are predominant on the right (end of the epoch). Use
Trim left and Trim right to remove these artifacts.
Range & Trimming Filter warmup artifacts at the edges of the full time range
can be trimmed away. It is recommended that generous-sized epochs, longer
than otherwise required, be made from continuous data prior to this
transform to permit adequate trimming. The amount of trimming required can
generally be determined by inspection. More trimming will be required as the
filter Rolloff increases.
<%COPYRIGHT - 2008%>
Main Menu bar 117
Trim left Number of milliseconds to trim from the beginning of the epoch.
Trim right Number of milliseconds to trim from the end of the epoch.
Selection of Channel Pairs - This is the same as for the ordinary coherence
transform. (Please refer to that section above for more details).
Sort Criteria - The Sort Criteria button displays the regular Sorting Criteria display
through which you may select the desired sweeps to be analyzed. If you are using
the Response field, please see the section entitled " Some notes about
response codes 100 " for some important information.
Output file - Click the button to select a folder and enter an output file name.
Example. Retrieve the P300.eeg demo file. Note that even though the points are
not a power of 2, the ERCoh transform may still be applied. Set the fields as in the
figure. This will be a basic illustration of ERCoh where the mean activity (phase
locked) is removed, and the results are normalized so that the final results are
numbers between 0 and 1. The center frequency of interest is 5Hz, and we will
compute all pairs of channels. The sweeps have been trimmed by 100ms on each
side. Sweeps were sorted for stimulus type codes of 2 (the Rare responses).
In this example, we set CZ as the Coherence Reference ( right click inside CZ and
select Set Coherence Reference). The results from most channels show some
potentially interesting increases throughout the endogenous component span (T5
shown below).
<%7317A Edit%>
118 Edit 4.5
The figure below displays the identical results, where the only exception was that
we selected Both (mean activity retained) under Phase Locking, so the mean
phase-locked activity was not subtracted out.
Slightly different results emerge when Complex Cross Products, and Evoked
phase locking are selected (leaving all other settings the same). The results are
shown for PZ, where there is an increase closer to the span of the P300
component.
<%COPYRIGHT - 2008%>
Main Menu bar 119
Obviously, there are many ways to vary the ERCoh transform (different methods,
frequencies, references, recording conditions, etc.). The above are just a few
examples.
Extract Channels (EEG, AVG; time and frequency domain) - The Extract
Channels transform creates a new EEG or AVG containing only the channels you
select. Retrieve a data file, then select the option. You will see the Extract Channels
display. Select the channels to extract (the green channels will be extracted to the
new file), then use the button to select a folder and enter an output file name.
Then click OK.
<%7317A Edit%>
120 Edit 4.5
2.4.26 Filter
Filter (CNT, EEG, AVG; time domain) - The Filter transform allows you to perform a
variety of filtering options on your existing data. These include High Pass, Low Pass,
Band Pass, Band Stop, zero phase shift (digital) and analog simulation types of
filtering.
The basic details of the filtering operation are as follows. The zero phase shift filter
has a cutoff frequency at 6 dB down, i.e., if you input a pure sinusoid at the cutoff
frequency, the output amplitude will be half of the input amplitude. The rolloff
characteristics are squared Butterworth: a forward Butterworth filter is applied
followed by a reverse Butterworth. If you select the 12 dB/octave setting, for
example, the output of a sinusoid at twice the cutoff frequency (for a low pass filter)
is 0.2 the amplitude of the input. For a high pass filter, the same is true if the input
sinusoid is at 1/2 the cutoff frequency.
<%COPYRIGHT - 2008%>
Main Menu bar 121
Users with previous versions of SCAN (3.2 and 4.0) should be aware that the 4.1+
version rolloff, in dB/octave, is twice that of the 3.2/4.0 version rolloff. That is
because the 4.1 rolloff applies to the complete Butterworth squared filter (zero phase
shift), whereas the 4.0 rolloff applies to each of the 2 Butterworth filters that are
applied (first forward, then reverse). This change was made in 4.1+ in order to reflect
the net filter characteristic rather than the component characteristics. Thus, the
following table applies:
Differences between equivalent filter settings in the two versions are negligible. As a
general rule, however, if you are in the middle of a study, we recommend that you
either reanalyze your data using SCAN 4.2+, keep using your prior version until the
study is complete, or analyze at least a subset of your data files using both packages
to demonstrate that there are no differences.
To apply the Filter transform, retrieve your data file, then select Filter from the list of
Transforms. The following screen will appear.
The Filter window is divided into 7 main sections: Class, Type, Mode, Band Pass, Band
<%7317A Edit%>
122 Edit 4.5
Stop, Channels, and Output File. The diagram at the top of the window displays the
results of the settings you enter.
Class. There are two classes of filters: Finite Impulse Response (FIR) and Infinite
Impulse Response (IIR). SCAN 4.2 and earlier versions used FIR; IIR is being
introduced with version SCAN 4.3. FIR (Analog) is a non-recursive filter in which
only previous and current input values are included in the calculation of the new
output values from the filter. FIR is therefore fundamentally phase blind to output
since it does not consider the previous output in the generation of the next
output. The nature of the FIR (Analog) filter permits a linear, predictable phase
error that does not occur with FIR (Zero Phase). FIR (Zero Phase) does not
introduce phase errors.
IIR is a recursive filter (in essence, a filter that runs backward), which keeps track
not only of previous and current input values, but also the previously calculated
output values. It is therefore slightly less prone to phase mismatches than FIR
(Analog).
Care
Be careful when using the IIR filter with slopes steeper than 12dB, especially with
faster sampling rates. For example, the filter may become unstable with 20kHz
AD, when using a 24dB slope and a high pass up to 1.3Hz.
Low pass filtering only (passes frequencies below the inputted setting, and
attenuates faster frequencies). Clicking this option activates the Low (Hz) field
in the Band Pass section below.
High pass filtering only (passes frequencies above the inputted setting, and
attenuates slower frequencies). Clicking this option activates the High (Hz)
field in the Band Pass section below.
Band Pass filtering passes frequencies within the Low and High pass settings
(and attenuates frequencies outside of this range). Clicking this option
activates the High (Hz) and Low (Hz) fields in the Band Pass section below.
Band Stop filtering passes frequencies outside the Low and High pass settings
(and attenuates frequencies within this range). Clicking this option activates
the Start (Hz) and Stop (Hz) fields in the Band Stop section below.
Mode (FIR only) - The Mode field allows you to select Zero Phase Shift filtering
or Analog Simulation filtering. Zero Phase Shift filtering makes two passes
through the filter, once in each direction. While somewhat slower that the analog
filtering, it has no effect on EP component latencies. Analog Simulation filtering
makes one pass through the filter, and, while therefore faster, it can result in EP
latency increases. You may also select whether or not to Rectify the waveforms
prior to filtering. This option is implemented primarily for EMG recordings, and is
useful for identifying the onset of an EMG burst.
Band Pass - Part or all of this region will be active depending on which Type of
<%COPYRIGHT - 2008%>
Main Menu bar 123
filtering you selected above. When active, enter the desired High or Low pass filter
setting in the window(s), and use the pull-down arrow to access several different
roll-off settings (in dB per octave). The higher the dB/octave selection, the
steeper the filter roll-off. Note the changes on the top diagram as you select
different dB levels. The High and Low pass values you entered will be represented
by vertical lines in the diagram (to see the changes, click, for example, to the High
pass field and then back to the Band Pass field).
Band Stop - This region will be active if you selected the Band Stop type of
filtering above. Enter or select the desired options as described in the Band Pass
section above. Note: Band Stop filtering is basically the opposite of Band Pass
filtering. Band Pass filtering affects frequencies primarily outside the designated
range, and Band Stop affects frequencies primarily within the designated range.
Channels - This toggle allows you to select individual channels for offline filtering,
or to set all channels for the same filtering. Select the All button to apply the
settings to all channels. To set channels individually, click on the Specified button,
and a montage diagram screen will appear. Electrodes that are selected for filtering
will be green, and electrodes that are excluded will be red. Move the mouse over
an electrode label, and the fields below will show the label and the status. Double
click on an electrode label to change its status. The Select All button will select
all channels for correction; the Deselect All will exclude all channels for filtering.
Output File - If you are filtering a CNT or EEG file, this section will be active. AVG
files are filtered "in place", and must be saved as a secondary step. Click the
Browse button to enter a new name for the filtered CNT or EEG file, or to
overwrite an existing file.
<%7317A Edit%>
124 Edit 4.5
Click OK when you are ready to proceed, and you will see a new display with the
filtered data.
Note
If you create an averaged data file with Compute Standard Deviations enabled, and
then Filter the averaged data file, the SDs will be lost. The SDs are computed across
the [raw] sweeps. If you filter the average, the waveforms change, and the SDs are
no longer correct. In this case, you should filter the epoched file before averaging the
sweeps.
Forward FFT (EEG; time domain) - The Forward FFT option is used to convert
time domain data (real or complex) to complex frequency domain data. EEG files
converted to the frequency domain via this transform store the full complex
information in Cartesian coordinates, although the display shows the amplitude
(magnitude) spectra for all channels and for all sweeps. To use this option, the
number of Points must be a power of 2 (128, 256, 512, etc.). If the number of points
in your data file is not a power of 2, use the Spline Fit option below to adjust it.
After retrieving an EEG file, select the Forward FFT option from the Transform list.
Enter a file name and path, and click Save. When the computations are completed,
you will see a new multiple window display with the power spectra for each channel.
The program will compute the power spectra for the entire frequency range that is
possible. If you do not wish to display the entire range, go to the Frequency section
under Overall Parameters. In the Display area, change the Start [Hz] and Stop
[Hz] values to display the range of interest, and click OK. Use the arrows on the
Toolbar or the keyboard to step through the file.
<%COPYRIGHT - 2008%>
Main Menu bar 125
You may restore the original time domain data by selecting the Inverse FFT option
from the Transform list.
FSP Average (EEG; time domain) - If the brain potential you are interested in has
a particularly low signal-to-noise ratio (SNR), then you will need to collect a large
number of sweeps. For example, extraction of the auditory brainstem response (ABR)
usually requires thousands of sweeps. This situation presents two related problems:
(1) the SNR can vary considerably between recording sessions, so that the same
number of sweeps may yield averages of different quality; and (2) the SNR can vary
considerably within a recording session so that a bad block of sweeps can potentially
degrade the average which is building.
<%7317A Edit%>
126 Edit 4.5
problem was detailed by Elberling and Don (1984) who proposed use of the Fsp (single
point F) statistic. Please refer to the above mentioned article for complete details.
Briefly stated, the Fsp is essentially a ratio of two variances: the estimated variance of
the signal between two time points, divided by the estimated variance of the noise at
a single point. If certain assumptions and approximations are made, the sampling
distribution of the F sp statistic can be computed. For each target SNR that one wishes
to achieve in an average, there is a critical Fsp value such that one can state with
confidence p that the actual SNR equals or exceeds the target value. This critical Fsp
value can be used as a stopping criterion for averaging. All averages obtained in this
way though they be constructed from differing numbers of sweeps will have
about the same quality of SNR.
The Fsp statistic is computed for blocks of sweeps and saved in the file as well as to a
data (.dat) file.
Perhaps of greater significance for offline analysis is a solution to the second problem
of within-session variability of the background noise. If the total number of collected
sweeps is divided into several blocks, a single point estimate of the background noise
(i.e., variance about the mean) can be computed for each block. By single point it is
meant that a fixed point in time for each sweep is chosen for this computation. There
may be considerable variability in the background noise estimates for the different
blocks of sweeps. Ordinary averaging would give each block an equal weight.
Intuitively, however, one would prefer to assign a higher weight to blocks of sweeps
with lower background noise. This intuition is fulfilled by a Bayesian weighting scheme:
The total average is constructed by weighting each block average by its reciprocal
single point variance, divided by the sum of all block reciprocal sp-variances (Elberling
& Wahlgreen, 1985)
Thus, the Fsp average implemented so far is a Bayesian weighted average with
computation of the Fsp statistic for each block, and for each electrode.
After you have selected a subset of sweeps (see above), follow these steps to initiate
an Fsp average.
Retrieve your EEG file and then select Fsp Average from the Transforms list. The
following display will appear. Listed below is an explanation of each of the parameters.
<%COPYRIGHT - 2008%>
Main Menu bar 127
Terminate Method - Select one of the options below if you want to employ an Fsp
termination method.
None - The analysis will continue through the entire data file.
F value - The analysis will stop when the current Fsp value equals or exceeds a
specified F value. The F value field sets the terminate criteria. A typical value
for this field for the ABR is 3.1. The F criterion will terminate the analysis when
the terminate method is set to F Value or BOTH on the designated channels.
Noise Level - The analysis may be terminated if the background noise is lower
than a specified value. The noise value field sets the terminate criteria. A
typical value for this field is 0.02mV. The noise criterion will terminate the
analysis when the terminate method is set to Noise Level or Both on the
designated channels.
Both - Analysis will be terminated if either the Fsp or noise criteria are met.
Terminate Channel(s) - The terminate channels fields allow you to specify which
channels will be monitored for termination criteria:
<%7317A Edit%>
128 Edit 4.5
All - will terminate if any channel in the current montage reaches a criterion.
Selected - will terminate on user selected channels. Click the Selected radio
field, then the Select button, to see the standard channel selection display.
Single Point Positive [ms] - The point position value determines the location (in
milliseconds) within the sample interval (X min to X max) of the single-point
estimate of the background noise. Under normal circumstances this value would
be placed within the bounds of the window start and stop point (see below).
Window Start [ms] - The window Start point determines the starting location
(in milliseconds) of the response window. For the ABR a value of 2ms is typical.
Window Stop [ms] - The window stop point determines the ending location (in
milliseconds) of the response window. For the ABR a value of 12ms is typical
(this gives a window of 10ms, which is appropriate when using an AD Rate of
20k).
Sweeps per Block - The sweeps per block value determines the number of
sweeps that is collected for the ongoing within-block average. For the ABR a
value of 250 sweeps is typical.
F Value - Input the desired F value that, when reached, will terminate
acquisition. A typical value for the ABR is 3.1.
Noise Level [mV] - Input the desired noise level that, when reached, will
terminate acquisition. A typical value for the ABR is 0.02mV.
Display - These fields are used to set the scaling range in the Fsp data display. This
information is saved as part of the .avg file.
<%COPYRIGHT - 2008%>
Main Menu bar 129
F Max - The F Max sets the upper limit of the range on the F value display. A
typical value is 20, although you may go lower for a more sensitive display.
Noise Max - The Noise Max sets the upper limit of the Noise Level display. A
typical value is 0.2 mV.
Set Sort Criteria -You may sort the sweeps that you wish to have included in the
analyses. Clicking the Set Sort Criteria accesses the same Sorting Criteria display
that is described above under the Average transform. From it, you may specify
Trials, trigger Type codes, Response type, and so forth. If you are sorting by
Responses, please see the section entitled "Some notes about response
codes 100 " for some important information.
Output file - Use the button to select a folder and enter an output file name, then
click OK. A new multiple window display will appear with the Fsp results for each
channel.
The example used the viscpt.eeg file purely for demonstration purposes. More
typically, the Fsp procedure has been used with ABR recordings. Its applicability to
cortical EPs is not well known. The point here is to explain the information in the
output file.
You may find that you need to rescale the F and Noise threshold levels (if you see
flat lines instead of the rising F line and falling Noise line). To do this, go to the Fsp
section under Overall Parameters.
In the Display section, enter more appropriate values for F Max and Noise Max,
such as, 30 and 2, respectively. Your electrode display should look more similar to
the one above.
<%7317A Edit%>
130 Edit 4.5
The waveform in the middle of the screen is the block weighted average. The
averaging process takes into account the variability in each block of sweeps.
Those with a larger variance are given a smaller weight. In that way, the final
average will be "cleaner" than if you had just averaged all the sweeps.
There are two dashed lines. The yellow one is the threshold for the Fsp statistic,
and the light blue one is the threshold for Noise. The rising yellow line is the Fsp
value that is calculated across the blocks of sweeps. Note that it is superimposed
on top of the waveform, but does not correspond to time points on the waveform.
The descending light blue line is the residual Noise estimate that is likewise
calculated across blocks. In this example, the Fsp value easily reached the
criterion, but the Noise estimate did not reach its criterion.
2.4.29 GFP/Reference
GFP/Reference (CNT, EEG, AVG; time domain) - Global Field Power (GFP) is a
measure defined as the standard deviation across multiple channels as a function of
time within a sample interval (Lehmann and Skrandies, 1980). The intention of the GFP
measure is to quantify the instantaneous global activity across the spatial potential
field sampled over the scalp. The result of this analysis is a waveform that represents
the temporal changes in GFP. A peak of GFP at some point in time is thought to reflect
a maximum (and a trough is thought represent a minimum) of the total underlying brain
activity that contributes to the surface potential field. Peaks and troughs of GFP have
been used to segment multichannel EEG records and to select moments of time for
mapping of the potential field (Lehmann and Skrandies, 1986).
After retrieving your CNT, EEG or AVG data file, click on Transforms and select the
GFP/Reference option. You will see the following screen.
<%COPYRIGHT - 2008%>
Main Menu bar 131
Average Reference Channels - These fields let you specify which electrodes to
include in the analyses. The first one will include All channels (excluding those that
you have designated as Skip or Bad channels). The Specified button, when
enabled, will let you pick the channels manually that you want to include (click the
Select button).
Options - The first field allows you to Include the Reference Electrode (when
enabled), or exclude it (when disabled). The Reference Electrode is the electrode
to which the relative electric potentials at the EEG leads are compared. When
computing GFP, the program will use either the active EEG leads (N) alone
(excluding Bad or Skip channels), or the active EEG leads plus the presumed
inactive reference electrode (N+1). If you enable the field, the computations will
be performed with N+1, and the activity from the reference channel will be
included. Otherwise, the total N will be used.
The Add GFP Channel will display a new channel with the GFP results.
The Calculate As Field Z-scores option normalizes the GFP data by using the
standard deviation of the topography/field, at each time point. Think of these as
spatial Z scores. This is quite useful when making maps. Essentially, the data are
autoscaled at each time point, so the map color scale is set in terms of standard
deviations.
Output File - Use the Browse button to access the dialog box to enter a file
name and path, and click Save, then OK. The new file will have channels for the
REF and GFP results.
Note
GFP should not be used with the .avg file results obtained from Event Related Band
<%7317A Edit%>
132 Edit 4.5
Notice that the transform creates the GFP and REF displays and waveforms.
GFP REF
Two maxima are found in this waveform: one at 70ms the other at 100ms. The maxima
<%COPYRIGHT - 2008%>
Main Menu bar 133
correspond to the N70 and P100 responses located in the occipital leads.
Import Event File (CNT) - The Import Event File transform allows you to retrieve
and apply an event file to a CNT file. The new event file can replace an existing event
table, or be added to it. (The event table is that section at the end of a CNT file that
contains the event information for the file). Therefore, if you have an event file that
has, for example, stimulus type codes at every 1250ms, you could import the event
file to one or more CNT files and thereby place the events automatically. If you are
importing a CNT file from ASCII - which does not contain the event information - you
can add the events from an event file you have created.
The Import Event File transform has a use in EKG artifact reduction, when not using
the EKG Noise Reduction transform. In some cases (primarily involving BCG), it may be
necessary to filter the trigger channel extensively in order for the Voltage Threshold
transform be able to place events at the R wave peaks accurately. However, you
might then want to use the correction with the unfiltered data. Therefore, you can
create the event file from the filtered file, and the import the R wave peak events
back into the original unfiltered file.
After selecting the Transform, the Import Event File dialog screen appears.
Replace existing event table. Enable this option if you want to replace the
existing event table. This means that all previous event information will be deleted.
If you do not enable the option, then the new events will be added to the existing
event table, and the previous events will be retained.
Report offsets are in seconds. When you create the event file (using the Event
File transform), you have the option to report the point offsets in seconds. The
default is ms. If you selected seconds when you created the event file, then you
should enable the Report offsets are in seconds option when you import the
event file. Similarly, if you have created the event file through some other method,
then enable or disable this option, as needed.
<%7317A Edit%>
134 Edit 4.5
Event File. Use the browse button to locate and retrieve the event file (.evt or
.ev2 types; see Event File in the EDIT manual for a description of the two file
types).
For example, the displayed .ev2 file contains Type 10 events at every 1000ms, for
5000ms, with no response, accuracy or latency information included. The AD rate
was 500Hz, so a point offset of 500 equals 1000ms. The offsets are in ms, so
Report offsets are in seconds was left disabled.
Applying it to a CNT file with no events shows the new events that are added.
2.4.31 Integrate
Integrate (AVG, EEG; time domain only) - The Integrate transform computes an
accumulation sum of the voltages across each sweep, where each data point is
multiplied by the inter-point distance (or dwell time). The result is an approximation of
the integrated sum of the waveform (corrected for variations in AD rates among files).
You have the option to Rectify the waveform first. The transform is used with AVG
and EEG time domain files only.
Clicking the option displays the following screen. Select whether you want to Rectify
the waveforms or not, then use the button to select a folder and enter an
output file name.
<%COPYRIGHT - 2008%>
Main Menu bar 135
The transform is useful in mismatched negativity (MMN) and P300 types of paradigms.
In the following figure, you can see the clear differentiation between the P300 rare
("oddball") waveform and the frequent (or standard) waveform.
<%7317A Edit%>
136 Edit 4.5
Retrieve your AVG file, and select the Intra-class Correlation option. The Intra Class
Correlation display will appear. Click the browse button , and an Open Files utility
will appear through which you may select the comparison file. This file should have the
same number of electrodes, the same electrode labels, and the same number of
points.
The Epoch Interval displays the span of the epoch. Enter the Start and End times
for the Correlation Interval, that is, the interval that is used for the correlation
calculations. Select All if you wish to use all channels, or select the Specified
option and then the Select button to select individual electrodes. You can elect
to Show the Results or not. Enter a file name and path to save the Result file.
Click OK to proceed.
<%COPYRIGHT - 2008%>
Main Menu bar 137
Save - Clicking the Save button opens a Save As... utility screen through which
you may enter a path and file name for the output file. A text file will be written
(the .dat extension is added automatically) that contains the list of electrodes and
the correlation coefficients. The overall, or grand correlation is included.
To Clipboard - Clicking this button will send a list of the results to the Windows
Clipboard, where the results may be Pasted in other Windows applications.
Inverse FFT (EEG, frequency domain) - The Inverse FFT option is available only
after you have performed the Forward FFT transform. The Inverse FFT option will
restore the data file to its original time domain form. After clicking the option, you will
be asked for a file name and path for the new EEG file. Enter these and click Save.
When the computations are completed, you will see a new multiple window display
with the original waveform data.
Linear Derivation (CNT, EEG, AVG; time domain) - The linear derivation
transform enables the creation of new channels as arbitrary linear combinations of
existing channels. LDR files are used extensively with the Spatial Filter, Spatial SVD,
and to a lesser extent with the Ocular Artifact Reduction routine (and elsewhere).
The linear derivation is guided by an ASCII linear derivation file that has the extension
".LDR". The LDR file contains a matrix of linear coefficients that are used to derive new
channels from existing channels. The structure of the LDR file is as follows:
<%7317A Edit%>
138 Edit 4.5
where
N is the number of new (derived) channels;
M is the number of old (recording) channels;
<old chan j> is the label used for the jth recording channel;
<new chan i> is the label to be used with the ith derived channel;
Cij is the coefficient of the linear contribution made by recording channel j to the
derived channel i.
Thus, at each time point, the value of derived channel i is computed by adding C i1
times the value of recording channel 1, plus Ci2 times the value of recording channel
2, ..., plus CiM times the value of recording channel M. The resulting N derived
channels are saved to a new file.
Note
The order of the old channel labels in the LDR file need not correspond to the order of
the labels in the current working file. It is only necessary that there should be a
match for each old channel label. If the working file contains channels that are not
named in the LDR file, these channels will be ignored in the linear derivation
computation. However, an error message will be produced if the LDR file names
channels that are not found in the working file.
Note
When creating or renaming new output channels, do not use spaces in the labels, and
also avoid non-alphanumeric characters.
The LDR Montage Editor - Click the Edit button after selecting Linear Derivation
from the Transforms list. The NS Montage Editor is displayed. (You may access the
Montage Editor at any time from the icon on the Toolbar). This is discussed
more thoroughly in Appendix B at the end of the EDIT manual. It provides a
convenient means for creating and editing LDR files. At the beginning of that
manual are some simple examples of LDR files.
After retrieving a data file and selecting the Linear Derivation option under
Transforms, you will see the Linear Derivation display. This is basically an
Input/Output screen, in which you select the LDR file that you wish to apply to
your data file, and an Output File name for the transformed file.
<%COPYRIGHT - 2008%>
Main Menu bar 139
Note that there is a field in which you may specify a label for the Output units.
The default setting is for microvolts, but you may enter a different option by
Let's look at a few examples of the uses of LDR files. The first will illustrate a
simple example of an LDR file created in the Montage Editor that reduces an
existing file into one with fewer channels. The second will take an LDR file created
in the Ocular Artifact Reduction routine, and applies it to an existing AVG file. More
examples may be found in the Spatial Filter and Spatial SVD sections below.
Creating an Output File with Fewer Channels - You may occasionally wish to
create a new file with fewer channels to reduce the size of an exported file,
make the file compatible with other files, and so forth. You can do this easily
with the Montage Editor (see Appendix B for additional information). This will
work with CNT, EEG and AVG files.
As an illustration, let's retrieve the vep.avg file, and create a new file
containing only the basic 10-20 electrode positions. After retrieving the
vep.avg file, click the Montage Editor icon , and the Montage Editor will
appear. The current electrodes and positions will be shown on the right side of
the display, as well as LDR identity matrix on the left (1's down the diagonal).
Unclick the Head Contour icon to see the full size matrix.
<%7317A Edit%>
140 Edit 4.5
Click the FTC1 button on the left side of the screen with the right mouse
button, and select the Delete Channel option, and Yes to confirm. Click OK
to the message saying you cannot create an Identity Matrix with an unequal
number of channels. Repeat this procedure for all of the nonstandard 10-20
electrodes (FTC1/2, TCP1/2, CP1/2, and PO1/2).
When you are finished, click the Save Montage File option under File, and
enter a file name (the LDR extension will be added automatically).
Now close the Montage Editor and select the Linear Derivation transform.
Select the LDR file you just created using the Browse button , and then
enter a file name for the Output File. Click Save, and you will see a new
multiple window display with only the basic 10-20 system channels.
Re-referencing with LDR files. One of the more common uses of LDR files is in
re-referencing (see also the GFP/Reference 130 command). Let's say you
recorded a file with all channels referenced to A1 (left ear), and you also
recorded A2-A1 as a separate channel. You want to re-reference the data to
have a linked ears reference. For a given channel, such as CZ, you recorded
CZ-A1 and A2-A1, and what you want is CZ-(A1+A2)/2. The solution is simple
mathematics and an LDR file that combines the existing CZ-A1 and A2-A1
channels using a multiplier for the A2-A1 channel to give the desired linked ears
reference. In other words:
(CZ - A1) + x(A2 -A1) = CZ - (A2 + A1) / 2, where x is the value of the
multiplier representing the recomputation needed for the new reference.
The scalar for the (A2 - A1) channel is therefore -.5. The LDR file is the regular
identity matrix (1's down the diagonal), with a -.5 in the column under A2. You
might want to relabel the new channels to reflect the linked ears reference (CZ
- A1A2). A section of the final LDR file should be similar to:
<%COPYRIGHT - 2008%>
Main Menu bar 141
Applying the Ocular Artifact Reduction LDR file - If you have used the Ocular
Artifact Reduction transform (described below), you will have noticed that an
LDR file is created as part of the routine. Let's take a closer look at the LDR file
created when the reduction routine was applied to the viscpt.cnt file. To get
the file quickly, run the reduction routine with the Review options Off, and with
no output CNT file - just the LDR file.
If you look at that output LDR file in the Montage Editor, you will see that it is
a 32x32 matrix of numbers. Across the top are the 32 channels in the data file.
Think of these as the input channels. Going down the left side are the same 32
channels. Think of these as the output channels. If you look at the intersection
of, for example, FP1 input and FP1 output, you'll see there is a 1.0. At every
intersection of input and output channels, there is a 1.0 (with the exception of
the VEOG channel).
Now just look at the top line. FP1 has a 1.0, and the rest are all 0.0 until you
get to the VEOG channel, which has something like -0.37. The key to
understanding LDR files is to realize that each input channel is multiplied by the
cell number, or weight, and all the channels are then summed to create the
new output channel. In this example, FP1 is multiplied by 1.0 (unchanged), all
the other channels are multiplied by zero (ignored), and the VEOG channel is
multiplied by -.37. In other words, the output FP1 channel is equal to the
original FP1 channel after subtracting .37 times the value at the VEOG channel
- for every data point. That process is repeated for every channel.
Now that you see what the LDR file does, you can imagine cases where it may
be applied. You do not need, for example, to create a new, corrected CNT file
at the time you are performing the Ocular Artifact Reduction calculation. You
can instead create only the LDR file, and then apply it to the final average
files. Or, once you have the LDR file, you may apply it to other files acquired
from the same person (under the same circumstances). To complete this
demonstration, let's do the former. Take the original viscpt.cnt file (from which
you have already created the LDR file), then epoch it and create a sorted
average for, let's say, the first 100 sweeps (using the Sort Criteria button on
the Average display, enter 1-100 for Trials). The resulting AVG file should have
a noticeable blink artifact in the anterior channels.
Now, select Linear Derivation from the Transforms list. Enter the LDR file
created in the Ocular Artifact Reduction routine, and click OK. Then enter an
Output File name for the new, corrected AVG file, and click Save. The new
multiple window display will show the corrected channels (the blink artifact will
remain in the VEOG channel). Superimposing the files (using the Load
<%7317A Edit%>
142 Edit 4.5
Comparison File option), we see that the LDR file did a good job of removing
the blink artifact.
The waveforms in red are the uncorrected ones. For comparison's sake, you
might try comparing the LDR corrected file to the one that was corrected with
the Ocular Artifact Reduction algorithm (described below).
Linear Detrend (EEG, AVG; time domain) - Linear trends can be removed from
averaged waveforms. This operation can be used to remove a drift in the data that
extends beyond the sample epoch. This form of artifact can occur with AC coupled
amplifiers with long time constants. A sudden impulse waveform can cause the filter to
'ring', generating a slow and large recovery waveform. HEOG may also cause a drifting
from fronto-temporal sites. The detrend feature is performed by calculating a "line of
best fit" to the existing waveforms, and then subtracting that from the waveforms.
Retrieve your EEG or AVG file, and select Linear Detrend from the Transforms list. The
transform makes a permanent change in the data file (when you save the file). If you
want to maintain the data in its original form, you should create a new file. (Note: we
recommend that you always work with a copy of your original data files in any case,
preferably backed up on an independent medium).
<%COPYRIGHT - 2008%>
Main Menu bar 143
The Epoch Interval displays the epoch span of the data file. The Trend Estimation
Interval lets you specify the interval during which the linear component is estimated.
In SCAN 3 and 4, the only option was to use the Entire Sweep, and this may work
well for most applications. However, you may instead use the Pre-Stim Interval, or
set your own interval (User Defined with Start and End times you specify). The
interval is used to estimate the linear component of the waveform, and this is then
subtracted from the entire sweep.
You have the option of performing the correction on All Channels, or on Specified
channels. If you select the Specified channel option, the Select button will become
active, and you will see the Linear Detrend montage display from which you may
select the channels to be corrected.
Click the button to select a folder and enter an output file name. Click OK to
continue, and the correction will be applied to the original data.
Merge Task Data (CNT) - Continuous files can be merged with behavioral data
such as stimulus/response codes, latency, and accuracy. The advantage of merging
behavioral data into the file is that sorting decisions can be made based on different
performance criteria at subsequent processing stages. For example, we might want to
look at the difference between averaged responses to correct and incorrect trials.
Alternatively, we might want to accept only those trials on which the subject
responds within a certain response window. These types of operations can be
performed when the behavioral data are included in the CNT file.
The behavioral data file is created in the STIM software (.dat extension). You will
<%7317A Edit%>
144 Edit 4.5
need to physically transfer the appropriate .dat file(s) to the SCAN PC. Then, after
retrieving your CNT file, select the Merge Task Data option from the Transforms list.
Note
2
If you are using Stim with the Mouse or Keyboard as the response device, you will
notice that the responses appear in blue in the CNT files, i.e., as stimulus events. In
the HTML files, there are Stim and Resp lines, where the Resp lines contain the
response type codes that were sent to SCAN. Beginning with EDIT version 4.3.2, the
response codes on the Resp lines will be converted automatically to response type
codes when you Merge the Task Data (see Stim2 Response Devices 7 ).
You will see a Select Task file window from which you may select the .dat file that
corresponds to the CNT file. Select Open and the merge will then occur. The merged
information will not be visible, but will be there when you sort by accuracy, latency,
etc.
If you do not have a STIM system, you can do the same thing with a text file you
create. The .dat file should be formatted as follows. This is from the viscpt.dat demo
file that you should have in your \Scan Data\ Demo Files\Visual Attention folder.
Include the header lines, the column titles, and line of dashes in your .dat file. "Trial" is
just a consecutive numbering of trials. "Resp" is the mouse or STIM Response Pad
<%COPYRIGHT - 2008%>
Main Menu bar 145
button that is pressed. "Type" is the trigger type code that is sent from the stimulus
presentation system and seen in ACQUIRE. The numbers must agree with those seen
in the continuous file. "Correct" designates whether the response was correct or not
(1 = correct, 0 = incorrect). "Latency" is the time between the stimulus and the
subject's response (in seconds).
Note
The Response pad buttons are numbered 1, 2, 3, and 4 in the .dat file. In the CNT file
in SCAN, you will see 1, 2, 4, and 8 instead. When sorting by responses, it therefore
makes a difference whether you have merged the .dat file or not. Please see the
section entitled "Some notes about response codes 100 " for more details.
Ocular Artifact Reduction (CNT, time domain EEG) - Of all the potential
sources of artifact in EEG recordings, perhaps the most prominent and frequent are
those contributed by eye movements. Ocular artifacts are particularly troublesome for
the multi-electrode arrays employed in topographic mapping. Electrodes placed in the
frontal and temporal regions of the scalp are susceptible to many types of ocular
artifact. Indeed, it is safe to say that most topographical maps are seriously
contaminated if no artifact removal method is employed.
One method for dealing with this problem is simply to exclude trials that contain
significant eye movements. However, this method often leads to unacceptable data
loss. In some instances, with difficult subject populations, it may be impossible to
obtain artifact-free data by this method.
A more acceptable method is to "correct" the EEG for eye movements. A variety of
computational and analog methods have been employed to remove eye movements
from the EEG. In general, these methods subtract a fraction of an electro-oculogram
(EOG) from the EEG. We have evaluated these procedures and have adopted a
computational method that does an excellent job of removing the EOG. The method
employs a regression analysis in combination with artifact averaging to produce a
reliable and valid method for artifact removal (Semlitsch, Anderer, Schuster, and
Presslich, 1986). A similar method is available with the Blink Noise Reduction
program. A different method, using the Spatial Filter and Spatial SVD, is described in
the Spatial Filter section.
The eye movement reduction algorithm - Listed below are the three steps used
by the algorithm to reduce ocular artifact:
1. A scan is made for maximum eye movement potentials. The first step is to
search the data for the maximum absolute voltage from the VEOG or other
selected channel. A percentage of the maximum is used to define the beginning of
the VEOG artifact in the next step.
Note
When using the VEOG (or HEOG) channel in artifact reduction, it should have the
same filter characteristics as the EEG channels, or distortion of the data may
occur.
<%7317A Edit%>
146 Edit 4.5
b = cov(EOG,EEG)/var(EOG)
Where b is the transmission coefficient, cov and var are the covariance and
variance statistics, respectively. The coefficients are computed separately for all
EEG channels.
At the end of stage two, you can review the artifact waveforms and artifact
statistics before initiating stage three. This review is recommended to ensure that
the algorithm has performed as expected. Under normal circumstances, with good
eye movement recordings and a significant number of sweeps (30 or more
sweeps), the algorithm will do a good job of estimating the coefficients. However,
with fewer sweeps or noisy recordings, it is advisable to review the transmission
coefficients before removing the artifact. It is possible, with erroneous
transmission coefficients, to introduce more artifact than was originally in the
data.
Using ocular artifact reduction - Follow these steps to perform the ocular artifact
reduction (after retrieving the EEG or CNT data file):
1. Click on Transforms.
2. Click on Artifact Reduction and the Ocular Artifact Reduction Parameters display
will appear.
<%COPYRIGHT - 2008%>
Main Menu bar 147
Set the Trigger Threshold % value. If set to 10%, for example, the routine will
select points that are 10% of the maximum voltage detected to be the
beginning points of a blink. 10% is a good starting point. If you are getting too
many false positives, that is, too many sweeps that are not at the onsets of
genuine VEOG artifacts, then try increasing the threshold.
Blink values - These fields let you set the Minimum Number of Sweeps that
are required to construct an average artifact, the Duration (in ms) of the
average artifact, and the Channel to use in the routine. There are no
absolute, correct values to use in these fields. The recommendations we offer
may work well for typical EEG or EP recordings, but you may find other settings
work better for your particular data files. Typically you will need at least 20
good sweeps containing representative artifacts. The more there are, the more
accurate the transmission coefficients. The Duration is not necessarily the
complete duration of the blink artifact. It is more accurate to use the duration
of the most stable, representative part of the blink artifact. We recommend
about 400ms for the duration if you are using a CNT file to reduce the chances
of selecting two segments from the same blink. With EEG files, where the
epochs durations may be short, you may need to use a shorter Duration.
Realize that the object of the first and especially the second step of the
reduction routine is to calculate the linear transmission coefficients. The more
stable, or representative the averaged VEOG artifact, the larger the
transmission coefficients will be (and the smaller the variance). That results in
a more complete subtraction of the artifact in step 3. It is therefore not
necessary, nor even advisable, to use long intervals for the averaged artifact.
<%7317A Edit%>
148 Edit 4.5
Typically the longer intervals increase the variability, and thereby decrease the
coefficients and accuracy of the subtraction. We recommend that you
experiment with differing Durations to find the range that works best with your
particular data files.
Note
The Review options are available ONLY with CNT files. With EEG files, the
maxima determination and blink selection is performed automatically.
When you review the maxima or sweeps, you will see displays with intervals
equal to the Duration you set. Rescale the data as needed.
Output - The output options include an LDR file (linear derivation), or a new
LDR plus a new data file. The program will always generate an LDR file that can
be used to subtract artifact in other data files from the same subject. Click on
the button, and a standard Save As... file will appear. Enter a name,
designate the path, and click save to continue.
The LDR file (described in the LDR section above) is a numerical matrix, in
which new channels are created as a weighted, linear combination of existing
channels. In this case, a new EEG channel will be created where the
corresponding data point in the VEOG channel is multiplied by the transmission
coefficient, and that value is subtracted from the EEG channel. This is the
same mathematical operation that occurs when you complete the artifact
reduction routine. With the LDR file, you can retrieve a file from the same
subject, apply the LDR transform, and subtract the artifact in the same way as
if you had applied the artifact reduction routine.
For example, you might create the LDR file with the continuous data file and
save it, without actually applying it to the data. You might then epoch the file,
and create several sorted averages. You could then apply the LDR transform to
the averages to reduce the VEOG artifact. You might also apply the LDR file to
different data files recorded from the same subject, assuming that the
recording conditions were identical. Doing this presupposes that the distribution
<%COPYRIGHT - 2008%>
Main Menu bar 149
and intensity of the artifact is equal across files. It would not be a valid
application to take an LDR file from one subject and apply it to a different
subject, nor to the same where the recording was obtained under significantly
different circumstances.
With CNT output files, click LDR or LDR+CNT, and enter a file name, using the
browse buttons, if desired. If you have retrieved an EEG file, rather than a CNT
file, you will have an opportunity to enter a file name and select a folder for
the output file at a later point in the routine.
Click OK when you are ready to proceed. Let's assume you have elected to
Review the Maxima and the Blinks. The algorithm will display the first
sweep, and will ask if this looks like a genuine maximum, that is, does it contain
the greatest voltage peak for a genuine eye blink (in the VEOG channel)? Note
that you can use the Up and Down arrows to change the display scale .
Chances are that this will not be contained in the first sweep. If you say Yes,
the program will go to the next sweep that has a higher voltage value in it. If
you say No, it will go to the next sweep. In either case you will see the same
screen asking if this is a maximum. Typically, there will be some No's at the
beginning until you see a legitimate looking blink. Then click Yes. From then on,
the program will only select sweeps where there is a larger voltage. Ultimately,
it will accept the blink with the highest voltage. Be sure not to accept a sweep
with a higher voltage that is not from a blink. If you are sure that there are no
artifacts in the file with voltages greater than that of the largest blink, you can
save time by not enabling the Review Maxima option.
Once the Maxima has been determined, the program will then go through the
file looking for blinks to use to create an average blink artifact. If you enabled
the review Blinks option, you may manually select the blinks to use, as follows.
The beginning of the blink artifact is defined as X% of the Maximum voltage,
where X is the value you entered for Threshold (under Trigger; typically 10%).
With a CNT file, the routine will search for the first point that exceeds the
threshold value. If you look at your designated channel (e.g., VEOG), the very
first point is the one that exceeds the threshold. The next X ms (where X is
the Duration) should be part of a well defined blink.
<%7317A Edit%>
150 Edit 4.5
If it is, Press "Y", and the next X ms will be used to create the average blink
artifact. If you press any other key, the routine will skip the next X ms, and
then find the next point that exceeds the threshold.
Note
With CNT files, the routine will find the first point in the designated channels
that meets the 10% threshold. When you are reviewing the Blinks, you will
have the options to include or exclude the next 50, 200, 400ms, or whatever
your Duration is, in the averaged artifact. The routine will then skip the
Duration time, and find the next point that meets the threshold. If your
Duration is short, the next point could easily be IN THE SAME BLINK. You do
NOT want to accept the second one. You want to take the same section from
each blink, such as, the ascending limb and peak section of the blink. If you
accept separately the ascending limb and also the descending limb of the
same blink, imagine what will happen when these are averaged together, and
what that will do to the variability of the averaged blink (which you want to be
as small as possible). We recommend using a Duration of about 400ms with
CNT files (to avoid getting two sections from the same blink). With EEG files
that have short epoch lengths, you may need to use shorter Durations. The
typical blink that you should accept will look similar to the one below.
Continue reviewing the Blinks until you reach the end of the file. At that point,
the routine will take over and calculate the averaged artifact and transmission
coefficients.
If you make a mistake in the process, and accidentally accept a sweep that is
not a blink, you can use the left arrow key on the keyboard, or the left arrow
icon , to go backwards in the file.
When you reach the mistaken sweep, change the Accept status to Reject by
<%COPYRIGHT - 2008%>
Main Menu bar 151
clicking the Reject icon on the Toolbar . Then click the right arrow icon,
or the right arrow key from the keyboard, to get back to the previous point in
the file where you left off the review. When you reach it, the right arrow
control will no longer function, and you can continue saying yes and no to the
sweeps.
If you did not elect to review Blinks, the routine will do it automatically.
Realize, however, that the threshold may be reached for any number of
reasons besides blinks, and those sections will then be included in the average
blink artifact. This may result in a less than optimal subtraction of the blink.
Generally, if you have a recording with blink artifact that is otherwise clean,
the automatic routine will often do as good a job as your manual review.
When averaging is completed, you will see a multiple window display displaying
the averaged artifact. Vertical eye movements and blinks have a pronounced
effect on the frontal electrodes that diminishes as it moves to posterior
electrodes.
<%7317A Edit%>
152 Edit 4.5
The transmission coefficients are typically much higher in the frontal leads than
they are in the posterior leads. This is because the vertical eye movements
and blinks spread in an anterior-to-posterior manner. Consequently, much more
of the VEOG channel is subtracted from the FP1 and FP2 electrodes than from
posterior electrodes such as O1 and O2. Horizontal eye movements, on the
other hand, have a pronounced effect on lateral electrodes such as F7, F8, T3,
and T4. The largest effects are in the anterior electrodes (F7 and F8), with the
polarity being reversed across the left and right hemispheres depending on the
direction of the movement.
Note
If you have recorded the VEOG channel such that its blinks are inverted with
<%COPYRIGHT - 2008%>
Main Menu bar 153
respect to the EEG channels, you can still use the Ocular Artifact Reduction
transform - the results will be identical. Remember to set the Trigger direction
appropriately (Positive or Negative). This should reflect the direction of the
main part of the blink, at its beginning, in the VEOG channel, not the EEG
channels. (The Spatial Filter approach will also produce identical results
regardless of whether the blink channel is inverted or not).
Care
Ocular Artifact Reduction is a skill that develops with practice. We recommend
that you spend some time experimenting with different Durations, Thresholds,
and manual versus automatic reviews, etc. Calculate and compare the final
averages each time. You may find that there is very little difference between
obsessing over which blinks to include versus using the automatic processing.
If used correctly, it does an exceptionally good job of removing blink artifact. If
applied inappropriately, it may alter the data in unexpected and undesired
ways. Until you develop an acceptable level of expertise, we recommend that
you carefully review the data - with and without Ocular Artifact Reduction - to
decide if the results are accurate. This Transform does alter your data, and
should be used judiciously.
Paired t-score (AVG, time and frequency domain) - When comparing two related
or matched groups, or when comparing test-retest measures on the same group, you
can often use a Paired t-test to increase the likelihood for obtaining a significant
difference. A related data set, for example, might consist of a group of subjects that
received two treatment conditions. The hypothesis to be tested is that there is a
difference between two treatment conditions. A two-stimulus P300 experiment
provides another example of a related data set: A rare and a frequent average
waveform is obtained for each individual within a group. Other designs might involve
matched pairs of individuals, etc.
Suppose that a set of average waveform pairs from a two-condition experiment has
been obtained across a group of individuals, and it is desired to test the hypothesis
that there is a difference between the two conditions. The formula for calculating
paired-t values is:
(difference scores)
-----------------------------------------------------
(difference score variance/sq root of (n-1))
1. For each individual in both groups, make and save a waveform subtraction
between the two conditions of the experiment. For example, in a RARE and FREQ
comparison, retrieve the first subject's RARE waveform, select Subtract from the
Transforms list, and then select the same subject's FREQ data file. Repeat for all
pairs of files.
<%7317A Edit%>
154 Edit 4.5
3. If the group average difference waveform has already been created, retrieve it
as the working file.
5. Enter a file name and path for the t-score results file, and click OK.
A new multiple window display will appear containing the t-value waveforms.
Note
The paired t-test can also be used to test if a waveform is significantly different from
zero. For example, you may wish to check if an averaged waveform is significantly
different from what would be expected from an average of noise-only sweeps. In this
case, you must choose the Compute Standard Deviation option when computing the
average waveform. The n value for the above paired t-value formula is in this case
the number of sweeps included in the average (as opposed to number of individuals in
a group). Then, simply retrieve the average file and proceed with the Paired t-test.
Peak Detection (AVG, EEG; time and frequency domain) - The Peak Detection
routine may be used to detect automatically the peak voltage within a user specified
range in EEG or AVG files. (When using frequency domain AVG and EEG files, the "line"
style is selected automatically, rather than the histogram display). An ASCII file is
produced that contains the latencies and voltages for the peaks at each channel.
<%COPYRIGHT - 2008%>
Main Menu bar 155
For a quick demonstration, let's set up the peak detection routine to locate the
P100 component in the vep.avg demonstration file. Retrieve the vep.avg file, then
select Peak Detection from the list of Transforms. The Peak Detection Parameters
display will appear.
The first step is to define the markers that you want to add. Click the Add Marker
button and see the Marker display.
<%7317A Edit%>
156 Edit 4.5
You have the options to use the specified label (the label you enter in the Label
field), the latency, the amplitude, or the latency and amplitude. The peak will be
marked using the information you select. For example, if you select Use Amplitude,
the peak marker will display only the amplitude value at the point of the peak.
Select Use Specified label, and enter P100 for the Label.
In the Auto Search section, you have the option to Search the Entire Epoch, or to
Search In a specified Interval. Since the P100 component should fall within the
80-120ms range, select the Search In Interval option, and enter Start and Stop
times of 80 and 120, respectively.
In the Type field pull-down menu, there are options for Max, Min and None. Select
the Max option to search for the largest positive voltage in the interval. If the
peak of interest were of negative voltage, the Min option should be selected. If
you select the None option, the Stop time will be grayed out, leaving only the
Start time. When you run the Peak Detection this way, the program will place the
peak markers at the Start time point on each channel.
In the Locking area, you have the option to Lock or not lock the search. If you
select the Locked option, the Master Channel field will become active. This allows
you to select a specific channel for the search. The program will find the peak at
that channel, and "lock" the latency for all other channels. In other words, if a
peak is found at 100ms from the Master Channel, the peak measurement will be
<%COPYRIGHT - 2008%>
Main Menu bar 157
made at 100ms at all channels. If you do not select the Locked option
(unchecked), the routine will search for the peak amplitude, within the interval, for
each channel independent from any other channel. Leave the Locked field
unchecked for this demonstration.
The Color button near the bottom of the screen determines the color of the peak
marker that is placed on the waveforms. Select the red color, and click OK. You
should now see the "P100" label in the Marker Template List. You can enter
multiple peaks by repeating the steps above.
You have the option to apply the Peak detection to All channels, or to Specified
channels. Clicking the Specified field activates the Select button. This displays
your montage, with all channels initially accepted (green). Double click a channel
to exclude it from the search (it will turn red, and show "Off" below). Note the
buttons at the bottom to Select All or Deselect All channels. For this
demonstration, leave all of them Selected (click OK).
Lastly, you have the option to Exclude Bad and Skip channels. Leave these
unchecked. Then click OK to run the peak detection routine. When the routine is
completed you will see the Peak Detection markers added to each channel. The OZ
channel is displayed below.
Click the right mouse button in the label (crosshairs) to see the Delete and Edit
Properties screens.
Use the Edit Properties option to change the label, latency or color. Note that you
can grab the marker with the left mouse button and drag it to a new location, if
desired.
<%7317A Edit%>
158 Edit 4.5
Saving the results to a .dat file. The peak detection results can be saved to an
ASCII file (.dat extension). To do this manually, perform the Peak Detection, and
the click the right mouse button between the electrode displays. Select the
Marker Report option. You will see the Save As utility for setting the path and
entering the file name. The .dat file that is created contains the latency and
amplitude for the peak at each electrode and for each sweep (portion of the .dat
file shown below):
In SCAN 3.0, the .dat file had a different format, where all of the results were on a
single row (section shown below).
This format can be selected with SCAN 4.3 and newer versions by doing the
following (disregard the following information if you want to use the regular SCAN
4.3 .dat file shown above). Run regedit from the Start g Run line, and go to
HKEY_LOCAL_MACHINE\Software\Neuroscan\Acquire\State, and add the following
New g String Value:
When that line appears and is set to 1, the old 3.0 style will be used. If the line is
omitted or is set to 0, then the new style will be used.
Note
The old style applies ONLY to AVG files. Even if the flag is set, Epoch files will be
written in the new format.
Another setting in the Registry (again in the [State] section) controls the type of
delimiter used. The SCAN 3.0 software gave a choice of space versus tab delimited
.dat files. Only if the SpaceDelimiter is set to a nonzero value will spaces be used.
The default is tabs. This only has an effect if the old style file is being used. The
command is:
Again, that command can be ignored if you are using the new format for the .dat
files.
<%COPYRIGHT - 2008%>
Main Menu bar 159
2.4.40 Pearson's r
Retrieve your time or frequency domain AVG file, and select the Pearson's r option
from the Transforms list. You will see the Pearson's r display. Use the Browse button
to select the comparison file. It must have the same number of electrodes, the
same labels, the same starting and stopping time points, and the same number of
points. In the example below, we used the sepblk.avg and sepnoblk.avg demo data
files.
The Epoch Interval displays the span of the epoch. Set the Start and End time points
for the Correlation Interval, that is, the interval over which the correlation coefficients
will be calculated. Indicate whether you wish to analyze All channels, or Specified
channels. Click the Select button to access the montage display that will allow you to
select the channels to include. Click OK to continue. You will see the resulting Display
Calculated Coefficients display, in which the coefficients are mapped and listed with
the electrodes.
<%7317A Edit%>
160 Edit 4.5
The correlation coefficients will be displayed in map form, as well as in a list. Position
the mouse over an electrode site on the map, and the correlation coefficient for that
electrode will be displayed.
Save - Clicking the Save button opens a Save As... utility screen through which
you may enter a path and file name for the output file. A text file will be written
(the .dat extension is added automatically) that contains the list of electrodes and
the correlation coefficients. The overall, or grand correlation is included.
To Clipboard - Clicking this button will send a list of the results to the Windows
Clipboard, from which you may Paste the information into other Windows
applications.
Files with mismatched labels. If you try to correlate two files where a subset of
channels labels differ between files, the mismatch is detected automatically, and the
Warning screen is displayed.
<%COPYRIGHT - 2008%>
Main Menu bar 161
You then have the option of correlating only those channels that have matching
electrode labels (the default option), or specifying the pairs of channels using a
montage (.mnt) file. In the first case, you will see zeros for the mismatched channels.
If you use a .mnt file, you will see results only for the designated pairs (with labels
such as F7-F8, F3-F4, etc.). If you do not already have an .mnt file, you may click
the Montage Editor button and create one. The resulting file will be a list of the
correlation values for the designated pairs.
<%7317A Edit%>
162 Edit 4.5
The transform will place events based on the detection of the QRS complex. Selecting
the transform displays the QRS Detection dialog screen. Select the Channel that is to
be used, which is typically the EKG channel. Enter the event code that you want to
use in the Stim Code field. Be sure to use a code that does not overlap with genuine
stimulus codes sent from Stim2 (or other system).
The QRS Detection method uses a common domain algorithm for QRS detection (
Open Source ECG Analysis Software Documentation; Copyright 2002 Patrick S.
Hamilton). It is used here as one method for placing events in the CNT file for
each QRS waveform.
<%COPYRIGHT - 2008%>
Main Menu bar 163
Briefly, beats are detected in two phases: Filters and Detection Rules.
Filters. The signals are filtered to generate a windowed (time limited) estimate
of the energy in the QRS frequency band. This is accomplished by:
The final filter output produces what might be called a "lump" every time a QRS
complex occurs. T-waves generally produce smaller lumps than QRS
complexes.
Detection Rules. After the signal has been filtered, peaks are detected in the
signal. Each time a peak is detected, it is classified as either a QRS complex or
noise, or it is saved for later classification. The algorithm uses the peak height,
peak location (relative to the last QRS peak), and maximum derivative to
classify peaks. The following is an outline of the basic detection rules for the
algorithm.
1. Ignore all peaks that precede or follow larger peaks by less than 200 ms.
2. If a peak occurs, check to see whether the raw signal contained both
positive and negative slopes. If not, the peak represents a baseline
shift.
3. If the peak is larger than the detection threshold it is called a QRS
complex, otherwise it is called noise.
4. If no QRS has been detected within 1.5 R-to-R intervals, there was a
peak that was larger than half the detection threshold, and the peak
followed the preceding detection by at least 360 ms, that peak is
classified as a QRS complex.
The beat detector must begin with some initial threshold estimate. In order to
make an initial estimate, the maximum peaks are detected in eight consecutive
1-second intervals. These eight peaks are used as the initial eight values in the
<%7317A Edit%>
164 Edit 4.5
QRS peak buffer, the initial eight noise peaks are set to 0, and the initial
threshold is set accordingly. The eight most recent R-to-R intervals are initially
set to 1 second.
In practice, you will find that it tends to place the events not at the R wave peak,
but rather between the R and S waves.
There is a "warm up" period at the beginning of the CNT file where no events are
placed (8 beats), then you should see events inserted for each detected QRS
complex.
Our experience thus far with the common domain QRS Detection method is that it
is very effective in detecting the QRS complex in routine EKG recordings; however,
it tends to become less accurate with BCG (which it was not designed to detect).
2.4.42 Rectify
Rectify (EEG, AVG; time domain) - The Rectify transform is a simple absolute value
operation: all positive waveform values are left unchanged, and all negative waveform
values are inverted to their corresponding positive values. This transform can prove
useful for electromyographic (EMG) recordings.
After retrieving your EEG or AVG file, click the Rectify option from the Transforms list.
<%COPYRIGHT - 2008%>
Main Menu bar 165
Select the channels that you want to be rectified, and, for EEG files, enter an output
file name. With AVG files, the transform is performed in place.
Original
Rectified
2.4.43 RespWin
RespWin (CNT) - RespWin was originally a DOS based utility program that was used
to associate responses with specific stimuli, such as in the case where there are
<%7317A Edit%>
166 Edit 4.5
intervening stimuli between the target stimulus and the response. It has now been
implemented in SCAN 4.3 and subsequent versions.
To run RespWin, data typically will have been collected using ACQUIRE in conjunction
with the STIM system. The hardware enables the STIM PAD responses to be
transmitted to a SCAN system running continuous acquisition, regardless of the state
of the STIM computer. As a consequence, the response stream of events is entirely
separate from the stimulus stream of events. The RespWin program operates on an
event file (containing the stimulus and response event stream) that must be created
in the EDIT module of SCAN.
Response events from the STIM PAD are coded as follows: button #1 is coded as 1,
button #2 is coded as 2, button #3 is coded as 4, and button #4 is coded as 8.
Note
2
If you have Stim , and are using the Mouse or Keyboard for the Response Device,
please see the section entitled Stim2 Response Devices 7 .
The digitization rate is required in order to compute reaction times. This is obtained
automatically from the CNT file. Note that the precision of the reaction time measure
computed in this way is dependent on the digitization rate used. For example, with a
digitization rate of 250Hz, reaction times will be measured in units of 4ms.
Retrieve a CNT file, and select the RespWin transform to see the following dialog box.
<%COPYRIGHT - 2008%>
Main Menu bar 167
The Response Window Minimum is the minimum time after a stimulus event that a
response event can be associated with it, and the Response Window Maximum is
the maximum time after a stimulus event that a response event can be associated
with it.
The Target/Distractor pairs correspond to the subtasks that the subject will be
concurrently performing. Thus, a selective attention task would have just one
target/distractor type, but a divided attention task would have two or more
target/distractor types. Each target/distractor type has associated with it: a
description string for identification purposes, a definition of the target, a definition of
the correct response to the target, a definition of the distractor, and a definition of
the correct response to the distractor. Click the button to create the
target/distractor pairs using the following dialog box.
<%7317A Edit%>
168 Edit 4.5
Enter a Descriptor to identify the pair. A target event is a subset of stimulus codes
that require the same response. A distractor event is a subset of stimulus codes that
require a different (possibly null) response compared with the associated target event.
Subsets of stimulus codes are specified in a manner using commas and dashes, where
necessary, as in 1-5, 10. You may have multiple target/distractor event pairs. A
divided attention task, for example, would require the specification of at least two
target/distractor event pairs. In a two-choice task that does not use the
target/distractor framework, you may just arbitrarily assign one choice to the
target and the other to the distractor.
Correct target and distractor responses must be single integers that fall within the
specified response code range. A response code of 0 indicates a null response (i.e.,
the correct response is no response).
Note
The logic of the analysis procedure detailed below is predicated on the assumption
that all target and distractor events are defined as disjoint subsets; also, it is
assumed that each target/distractor pair will be assigned distinct responses.
However, neither of these conditions are explicitly checked by the program. All
stimulus codes that are not assigned to some target or distractor event are classed
together as extra stimulus events; it is assumed that only the null response is
appropriate for these extra events.
General Rules:
Rule 1. If the response r is not defined as a correct response to any possible target
or distractor event, then it is tallied as an undefined response, and no further rules
apply (i.e., no attempt will be made to associate it with any stimulus).
<%COPYRIGHT - 2008%>
Main Menu bar 169
Rule 2. If S[r] is an empty set, then the response r is tallied as an extra response,
and no further rules apply.
Rule 3. If S[r] is not an empty set, then the response r will be associated with
exactly one target or distractor stimulus in S[r] (unless rule 8 applies). The following
rules determine which s will be associated with r, in the order of priority listed. That is,
the first association rule that is satisfied will be the rule that actually gets applied,
and no further rules will apply.
Rule 6. False Alarm: If r is defined as the correct response to some target event
that is not represented in S[r], but an associated distractor event is in S[r], then r is
associated with the earliest such distractor event, and is tallied as a false alarm to
that target/distractor pair.
Rule 7. Miss: If r is defined as the correct response to some distractor event that is
not represented in S[r], but an associated target event is in S[r], then r is associated
with the earliest such target event, and is tallied as a miss to that target/distractor
pair. (As is also the case for rule 5, note that this rule will not apply unless some
distractor event requires a non-null response.)
Rule 8. Confused response: If none of the above rules apply for an individual
response r, then it must be the case that: (i) multiple target/distractor event pairs
have been defined, as in a divided attention task, and (ii) r is an appropriate response
to a target/distractor event pair that is not represented in S[r]. For example, in a
visual-auditory divided attention task, r may be the appropriate response to a visual
stimulus, but S[r] may contain only auditory stimuli. In this case, r is tallied as a
confused response, and is not associated with any stimulus.
Rule 9. Rules 1 through 8 exhaust all possibilities for each individual response. After
each individual response has been considered in sequential order, computations 10
through 13 are made, where applicable.
Rule 10. Hits: In the unusual (but possible) case where the correct response to a
target event is defined to be the null response, then hits to that target will be
computed as follows: hits = total target events - misses (where misses are tallied
according to rule 7; note in this case that rule 3 would not apply).
Rule 11. Correct Rejections: In the (not unusual) case where the correct response
<%7317A Edit%>
170 Edit 4.5
to a distractor event is defined to be the null response, then correct rejections with
respect to that distractor are computed as follows: correct rejections = total
distractor events - false alarms (where false alarms are tallied according to rule 6;
note in this case that rule 4 would not apply).
Rule 12. False Alarms: In the unusual (but possible) case considered in rule 10
where the correct response to a target event is defined to be the null response, then
false alarms are computed as follows: false alarms = total distractor events - correct
rejections (where correct rejections are tallied according to rule 5; note in this case
that rule 6 would not apply).
Rule 13. Misses: In the (not unusual) case considered in rule 11 where the correct
response to a distractor event is defined to be the null response, then misses with
respect to the associated target event are computed as follows: misses = total target
events - hits (where hits are tallied according to rule 4; note in this case that rule 7
would not apply).
Rule 14. Undefined Stimuli: All stimuli that are not defined as either target or
distractor events are tallied as undefined stimuli. Note that no responses are ever
associated with undefined stimuli.
Note
Occasionally, the response device may produce response doublets to what was
intended by the subject as a single button press. These doublets can be identified as
having response codes of the same type that occur within the response window
minimum. In this case, the RespWin program ignores the second response code and
tallies it as a doublet response.
Format Options. Enable the Include column header formatting option if you want
the column header information exported to the output files. (If you are exporting the
results into another application, you may wish to exclude the header information).
Event File and .dat File. The output of the RespWin program consists of two files: a
new .evt file that contains reactions times for stimulus events that were associated
with non-null responses, together with correct/incorrect information. Hits and correct
rejections are coded with a 1 in the accuracy field, whereas misses and false alarms
are coded with a 0 in the accuracy field. The associated response code is placed in
the response field (with null responses coded as 0). No response events are included
in the output event file, and only stimulus events that have been classified as targets
or distractors are included. A second output file which has a .dat extension provides
the summary statistics. The above-mentioned tallies are listed, together with average
and standard deviation RTs for all target and distractor events having non-null
responses. For each target, the hit percentage is defined as the number of hits
divided by the total number of target events. For each distractor, the false alarm
percentage is defined as the number of false alarms divided by the total number of
distractor events. If hit and false alarm percentages are not identically 0% or 100%,
Griers A (sensitivity) and B (bias) will be computed (Grier, JB, 1971: Nonparametric
indexes for sensitivity and bias. Psychol. Bull. 75:424-429).
Using RespWin. We will demonstrate the use of RespWin with a simple example. In
the following data file, the subject's task was to click the #1 response pad button
whenever he saw the stimulus with a type code of 2 (in this case, the "rare" stimulus
<%COPYRIGHT - 2008%>
Main Menu bar 171
in a P300 paradigm). In the section shown, the subject responded after a subsequent
stimulus was presented.
The "1" response, albeit delayed, was to the previous "2" stimulus, and the "1" stimulus
is now intervening. We want to associate the responses only with the "2" stimuli. As it
appears now, the delayed response will be associated automatically with the first
stimulus before it. We can use RespWin to associate the response with the correct
stimulus.
The Minimum Response Window was set at 50ms to exclude anticipated responses
(i.e., where the subject is trying to time a rapid response to the stimulus without
evaluating the stimulus). The 1500ms Maximum allows legitimate responses to be
recognized up to 1500ms, even though that is in the next trial. Intervening Stimuli
are expected (so leave unchecked).
<%7317A Edit%>
172 Edit 4.5
In this example, the Target events are type "2", with a correct response of "1". The
Distractor type code is "1", and no response is expected ("0"). With more complex
paradigms, just add additional target/distractor pairs.
The event file that is created shows the corrected association. The response that
was shown as event #15 (before RespWin), is associated with the correct stimulus
event, and the latency is computed. (The output .ev2 file contains only the
stimulus-response pairs).
Note
<%COPYRIGHT - 2008%>
Main Menu bar 173
Response locked averaging can be accomplished more easily with the Epoch transform.
In the original version of RespWin, the output event file from was used for making
stimulus-locked epochs (and subsequent stimulus-locked averages).
Smooth Data (AVG, EEG; time domain) - Averaged data files may be smoothed,
that is, a given data point may be averaged with adjacent points to create a
smoother waveform. After retrieving the data file, click Smooth Data from the
Transforms list. You will see the Smoothing display.
The Number of points sets how many adjacent data points are averaged (must be an
odd number, at least 3). The Number of passes is the number of times the smoothing
operation is performed.
Channels - Select the All radio field to apply the smoothing to all channels. To
apply the transform to selected channels, click the Specified field, and then click
the Select button. You will then see the standard screen through which you may
select or deselect electrodes.
Click the button to select a folder and enter an output file name (EEG files only),
then click OK to proceed. The transform will be applied. Save the file if you wish to
keep the changes. Below is the vep.avg demo file where the Number of points was 3
and the Number of passes was 5.
<%7317A Edit%>
174 Edit 4.5
Original
Smoothed
2.4.45 SNR
SNR (AVG; time domain) - The Signal to Noise Ratio (SNR) computations require
some preliminary explanation. The SNR is always computed, whether you apply the
SNR transform or not. It will attempt to compute the best SNR possible, given the
data. SNR is computed in different ways depending on whether there is a prestimulus
interval.
Retrieve an AVG file, right click between windows, and select the View SNR Values
option. You will see SNR values - even if you did not apply the SNR transform or
average the file with the Compute SNR option enabled. These are the "default" SNR
values, and they are computed in one of two ways. If there is a prestimulus interval in
the data file, then the variance of that interval is used to compute noise and the
variance of the poststimulus interval is used to compute signal. If there is no
prestimulus interval, then the Mean Global Field Power (MGFP) is computed, arranged
by voltage, and the 20th percentile is taken for the SNR estimate (this is the same as
with CURRY).
When you apply the SNR transform to the AVG file, you can use the options in the
dialog box to select the interval for the signal and noise, and the SNR is computed
from the MGFP.
The SNR transform computes "noise" over a specified interval, "signal" over a specified
interval, and then the ratio of signal over noise. "Signal" and "noise" are defined as the
variance among data points in the selected interval. The SNR then is the ratio of the
variance (signal) over the variance (noise).
<%COPYRIGHT - 2008%>
Main Menu bar 175
You can specify the interval to use for the noise and signal. Typically, you would use
the pre-stimulus interval to estimate the noise, and some or all of the post-stimulus
interval to estimate the signal. You also have the options to use the 20th percentile
for the Noise estimate (the median of the GFP is determined and the 20th percentile of
that is calculated), the Entire Sweep for the Signal estimate, or a User Defined
interval for either or both. You would not want to use the same interval for both, as
that will result in SNR values of 1 for all channels.
For time domain AVG files, enter the desired values and click OK. Then click the right
mouse button between electrode displays, and select the option. You
will see the SNR values for each channel.
<%7317A Edit%>
176 Edit 4.5
Click the button to save the values to an ASCII file (.dat extension). The
electrodes labels can be displayed or not.
Sort Sweeps (EEG, time and frequency domain) - The Sort Sweeps option will
create a new EEG file that contains only the sweeps you designate. After retrieving
your EEG file, select the Sort Sweeps option from the Transforms list. The Sorting
Criteria display will appear. This is the same display that appears during, for example,
Averaging (see above for details). Set the criteria that you wish according to the
sweep numbers, trigger type codes, response codes, and so forth. Click OK and you
will see an output file display. Click the button, and enter a file name and set the
path (the .eeg extension will be added automatically). Click Save, and a new multiple
window display will appear with the first sweep of the new epoched file.
Spatial Filter (CNT, EEG, AVG; time domain) - The Spatial Filter transform removes
and/or retains signals in spatial subspaces of the full measurement space in the
context of a control signal. The spatial dimension of the full measurement space
equals the number of channels. The dimension of a subspace to be removed (e.g.,
artifacts) or retained (e.g., ERP components) is usually much smaller than the full
measurement space dimension. The control signal refers to a reference sample of
EEG, and it is represented by a covariance matrix estimated from the reference
sample. The purpose of the control signal is to take into account natural spatial
correlations in the data. If a control signal is not specified, the control signal is
assumed to be spatially identical (equal variance across channels) and independent
(zero covariance between channels).
The Spatial Filter transform can be put to several uses. For example, it can remove
volume conducted artifacts, such as eye blinks and eye movements, while minimizing
distortions to the brain generated activity. This provides an alternative to the more
traditional ocular artifact reduction transform, which may attenuate brain responses in
the frontal leads. Secondly, it can implement the method of signal space projection,
which has been used to extract neuronal sources [Tesche CD, Uusitalo MA, Ilmoniemi
RJ, Huotilainen M, Kajola M, Salonen O (1995): Signal-space projections of MEG data
characterize both distributed and well-localized neuronal sources. Electroencephalogr
Clin Neurophysiol 95: 189-200]. As a final example, it can perform the spatial SNR
transform that sharpens or focuses ERP maps by reversing natural correlations
found in a reference EEG sample [Pflieger ME and Nakada T (1999+): The spatial
resolving power of high-density EEG: An assessment of limits. In: T. Nakada (ed.),
Human Higher Function I: Advanced Methodologies, to appear].
Input and Output. Input to the Spatial Filter transform consists of a representative file
<%COPYRIGHT - 2008%>
Main Menu bar 177
to be spatially filtered, which can be any time domain data format (AVG, EEG, or CNT).
In addition, the user must supply at least one of the following: (1) a compatible LDR
(linear derivation) file that specifies signals of no interest to be removed, such as
ocular artifacts; (2) a compatible LDR file that specifies brain signals of interest to be
retained; and (3) a compatible LDR file that specifies the covariance matrix for a
suitable control EEG signal. The Spatial Filter transform generates an output LDR file
that subsequently can be applied (via the linear derivation transform) to any
compatible time domain data format (AVG, EEG, or CNT) that was acquired in the same
recording session for an individual subject. In addition, if an output data file is
specified (AVG, EEG, or CNT), the computed linear derivation is automatically
performed as part of the Spatial Filter transform itself. The spatially filtered output
consists of (a) the original data channels after removal of signals of no interest (e.g.,
artifact) and/or (b) derived channels added for signals of interest (e.g., P300
channel) or for signals of no interest (e.g., blink channel). The spatial SNR
transform may optionally be applied.
The working data file (input) from which the output LDR file is produced may be either
a time domain average AVG file, an epoched EEG file, or a continuous CNT file. The
only requirement is that the working file should represent the acquisition parameters
of any subsequent files to be spatially filtered. The Spatial Filter transform does not
directly modify the working data file. In a typical application, the working data might
be an ocular artifact calibration file containing subject blinks and eye movements. The
LDR file resulting from the Spatial Filter transform could then be applied to remove
ocular artifacts from an experimental data file for the same subject and the same
recording session. Of course, it is also possible to estimate the artifacts from the same
data file that will subsequently be corrected.
Similarly, the user may specify a linear derivation LDR file that lists spatial components
that should be retained (e.g., brain generated components obtained via the Spatial
SVD transform). These components may be specified out of concern for throwing out
the baby with the bath water during artifact reduction; or they may be specified as
signals of interest to be specially derived, e.g., as a preparation for single trial
analysis. In other words, the Spatial Filter can filter out something unwantedor it
can focus on something of particular interestor both.
A typical method for obtaining a linear derivation LDR file for a control signal is to start
with a continuous CNT file that contains only clean EEG while the subject is in an alert
eyes fixated state (for example). The Spatial SVD transform is applied to the clean
EEG sample to derive a data covariance matrix, which is saved as an LDR file for the
control signal.
Each of the removal, retention, and control LDRs is optional; however, at least one
must be specified. Any pair or all three may be specified.
<%7317A Edit%>
178 Edit 4.5
In the interactive mode of operation, retrieve a CNT, EEG or AVG file, and select the
Spatial Filter option from the Transform list. The following display will appear.
The display is divided into several sections, and these are described below. The
Spatial Filter transform uses up to 3 different LDR files in its computations, and will
output a single LDR file, as well as a transformed data file. The LDR files you select -
Removal, Retention, and Control - have very different effects on your data file.
Removal LDR: Unwanted signals - Use the Browse button to select the LDR
file that is used to approximate the topographies for each component to be
removed. This file is typically created from the Spatial SVD transform, or from some
other source analysis program that outputs a matrix file that could be reformatted
into an LDR file. In Ocular Artifact Reduction, this would be the LDR file derived
from the file with prominent blink artifacts (see example below). The Edit
button, in this as well as the icon from the Toolbar, is used to access the
Montage Editor, where the LDR file may be modified, as desired (refer to the
Montage Editor appendix for more details). The Removal LDR, when used alone
(i.e., without the Retention or Control LDRs), is appropriate for instances in which
you wish to remove a component(s) without regard for retaining any other signals.
For example, you could use it alone if you wanted to remove blinks without regard
for the EEG that might be subtracted in the process.
Retention LDR: Signals of interest - Use the Browse button to select the LDR
file that lists the components to be retained, typically the phase-locked brain
signal (EEG). Again, this will typically be the output LDR file from the Spatial SVD
program, or other source analysis program that outputs a matrix file that could be
<%COPYRIGHT - 2008%>
Main Menu bar 179
reformatted into an LDR file. The Retention LDR file might be selected as the only
LDR file to be used in single trial applications.
Control LDR: Background activity data matrix - In comparison to the Retention LDR
immediately above, the Control LDR should be a preferred method for retaining the
ongoing EEG activity that may otherwise be lost in the Ocular Artifact Reduction
transform. The LDR file that should be selected is one created in the Spatial SVD
program, where the Include Skipped channels option is enabled (in the event that
the VEOG channel was designated as a Skip channel), and where you selected
Data Matrix instead of Components for the Output LDR file. The output LDR file is
really a covariance matrix (where the diagonals are the variance measures). The
uses are described in more detail below.
Output Spatial Filter LDR - Enter the name of the output LDR file that will be
created by the Spatial Filter.
Reconstitute the original channels - When enabled (the default and most
common choice) the Spatial Filter will be applied to the original channels. No
new channels will be derived unless these are selected in the Derivation of
Signal Channels section below. If this is deselected, the filter will not be applied
to the original channels, but it is still possible to derive the unwanted channels
and/or signals of interest depending on the selections in the Derivation of
Signal Channels section.
Remove unwanted signals - When enabled, the Spatial Filter will remove the
unwanted signals (default setting). This option is active only when you have
selected a Removal LDR.
Project signals of interest only - When enabled, this option will estimate the
activity to the signals of interest (such as source dipoles), and project them
back to the scalp. It retains the wanted signals only. This option is active only
when a Retention LDR has been selected. If a Removal LDR has also been
selected, the unwanted signals will have been taken into account when
estimating the signals to be retained, i.e., the unwanted signals will have been
implicitly removed.
Include skipped channels - Enable this field if you want channels that have been
designated as Skip channels to be included in the analyses.
Derivation of Signal Channels - These options allow you to designate whether new
channels will be derived for unwanted signals or signals of interest. The options are
active when you have retrieved a Removal or Retention LDR.
<%7317A Edit%>
180 Edit 4.5
Derive channels for unwanted signals - Enable this option if you want new
derived channels for the unwanted signals to be displayed.
Derive channels for signals of interest - Enable this option if you want new
derived channels for the signals of interest to be displayed.
Output File - Click the button and select a folder, then enter an output file
name. When you have made all your selections, click OK to apply the transform.
Removing Ocular Artifact - One of the more common applications of the Spatial
Filter is in the removal of ocular artifact. Below are three methods for removing
ocular artifact based on the Spatial Filter and Spatial SVD.
Note
If the file had been acquired with a High Pass filter setting of DC, you would need
to perform the DC drift correction (under Transforms) before continuing.
Note
If you have recorded the VEOG channel such that its blinks are inverted with
respect to the EEG channels, you can still use the Spatial Filter transform - the
results will be identical. (The Ocular Artifact Removal transform will also produce
identical results regardless of whether the blink channel is inverted or not; make
sure the Trigger direction, Positive or Negative, is set correctly).
Note
The band pass filter settings must be the same for the VEOG channel as for all
other EEG channels when you are performing the LDR VEOG correction (use Filter
under Transforms, if needed).
<%COPYRIGHT - 2008%>
Main Menu bar 181
Note
The viscpt.cnt file has one bad channel (P3) - set it as a BAD channel. You might
also wish to designate the VEOG channel as an artifact rejection channel, and
deselect the other channels that had been set as artifact rejection channels. Do
this from the Channel Attributes section under Overall Parameters.
View the viscpt.cnt file using the control icons. Using the Mark Block option, go
through the file and Reject bad sections of the file. There are about 5 or 6
obviously bad sections.
The next step is to create an AVG file that "captures" the blink artifact. One way
to do this is to insert Function Key events at the approximate same beginning
point for about 10-20 good blinks (an easier way using Voltage Threshold is
described in the Script section). Step into the file until you see a good blink. Then
click the Add Mark icon on the Toolbar. Position the cursor at the beginning of
the blink, and press a function key from the keyboard. The text is not relevant.
Repeat this procedure for 10-20 good blinks.
If there are any other function key events in your file, these should be removed.
The blue triggers from STIM are OK (don't remove them).
Next, we want to epoch the file around the function key events only. Select the
Epoch File option under Transforms, and designate the Port/Internal Mode, an
Interval of 0-200ms (to capture the main part of the blink), and Keyboard Event
Types (only).
<%7317A Edit%>
182 Edit 4.5
Click OK to continue. Enter a file name of "Artifact", and the .eeg extension will be
added automatically. When completed, you will see a new multiple window display
containing the artifact-laden file. Step through the file to make sure all the sweeps
contain good blink artifacts, then average the file (making sure it has the "focus").
Call the new file "Artifact" again - the .avg extension will be added automatically.
<%COPYRIGHT - 2008%>
Main Menu bar 183
Enter "Artifact" for the output LDR file name (the .LDR extension will be added
automatically), and select Components for the type of output. Then click OK to
continue.
Take a moment to look at the artifact.ldr file using, for example, Windows Notepad
(or the Montage Editor). Note that the channels having the largest multipliers are
from the VEOG and frontal sites (excluding P3, which is a BAD channel).
Apply the Spatial Filter Transform. The next step is to apply the Spatial Filter.
The Spatial Filter may be applied to CNT, EEG or AVG files. For this example, it may
be easier to work with an AVG file. Take the original viscpt.cnt file, epoch it, and
average the epochs (in this example we are not interested in the Rare or Frequent
responses - average them all together). When you are finished, make sure the
"focus" is on the AVG file, then select the Spatial Filter transform. In this example
we will illustrate the simplest method for removing the blink artifact. That is, simply
removing the artifact without retaining any of the EEG that may be subtracted in
the process. On the Spatial Filter display, click the Browse button on the Removal
LDR line, and select the artifact.ldr file created above from the Spatial SVD. Under
Reconstruction of original channels, enable both options. The original channels
will be reconstructed without the unwanted artifacts. Leave disabled the Derive
channels for unwanted signals option under Derivation of Signal Channels. If
enabled, this will create new, derived channels that will display the unwanted
activity that was removed. Enter "artfilt.ldr" for the Output Spatial Filter LDR file.
Then enter a file name for the output AVG file - call it vis-spatfilt (the .avg
extension is added automatically). Click OK to proceed.
<%7317A Edit%>
184 Edit 4.5
When the process is completed, you will see a new multiple window display with
the corrected data. The blinks have been effectively removed in all the channels.
original
corrected
For comparisons sake, you might want to process the original viscpt.cnt file using
the Ocular Artifact Reduction techniques under Transforms, and see the
differences between methods (they are typically very subtle).
In our experience thus far, we have seen that this approach is very effective in
<%COPYRIGHT - 2008%>
Main Menu bar 185
removing VEOG artifact. However, legitimate EEG signal may be removed from the
anterior-most channels as well as the artifact. Actually, this is to be expected.
This simplest variation removes artifact without attempting to preserve legitimate
EEG. Retaining the EEG is accomplished in the second method (below), which,
based on our experience, is recommended over the first method. The first method
is provided by itself as an illustration of the technique, as well as for possible
instances in which its application may be sufficient, and perhaps even preferable.
<%7317A Edit%>
186 Edit 4.5
Apply the Spatial Filter Transform. Return the "focus" to the viscpt.avg file that
you used in the "Apply the Spatial Filter Transform" section above, and select the
Spatial Filter transform. For the Removal LDR, select the artifact.ldr file that we
created in the first variation above. Skip the Retention LDR, and for the Control
LDR, select the cleaneeg.ldr that you created in the step above.
Under Reconstitution of Original Channels, select the first two options. These will
reconstruct the original signals with the artifact removed. The SNR option should
be disabled. If enabled, this will tend to enhance the prominent features and
flatten the less prominent ones. Under Derivation of Signal Channels, you may
enable or disable the option as you prefer. If enabled, you will see derived
channels for the unwanted signals (leave disabled for this example). Enter a file
name for the output LDR file - call it keepeeg (the .avg extension will be added
<%COPYRIGHT - 2008%>
Main Menu bar 187
automatically). Click OK when the Linear Derivation screen appears. Then enter a
file name for the AVG file - call it keepavg (the AVG extension will be added
automatically). Click OK to proceed. A new multiple window display will appear with
the corrected file.
If we look at FPZ for the three AVG files - the original viscpt, the result of the first
method, and the result of the second method - we can see that both methods are
effective in removing artifact. The second method appears to retain more of the
original waveform while still removing the artifact.
Online VEOG correction. In the above example the VEOG correction was performed
offline on an existing data file. In SCAN 4.3 and newer versions, however, you can
perform the correction online. To do so, you should first record a continuous data
file containing intentional blink activity, horizontal eye movements, or other
artifacts to be removed. Go through the steps described above in Variation 2 to
obtain the final output LDR file. Rather than apply it to the existing data file, apply
it to the online continuous file during acquisition, as explained in the ACQUIRE
manual.
In the larger perspective, there are four conceptual steps in this procedure (not
<%7317A Edit%>
188 Edit 4.5
(A) Spatially normalize and decorrelate the data via the SNR transform (using
the clean/outside EEG for the Control LDR).
(B) Apply the Spatial SVD transform on the SNR-transformed data containing
artifacts to identify the artifact components.
(C) Remove artifact components (e.g., those with SNR greater than a user
determined value, using the Spatial Filter without a Control LDR).
There are at least 2 practical issues to deal with: 1) in all steps until the final
result, you should avoid writing linear derived data back to CNT or EEG formats, as
these integer formats can lose precision and/or clip (this is accomplished by using
Script files for some operations); 2) in step B above, there are currently
unresolved concerns regarding whether or not to use time-locked artifact
averaging to obtain the artifact-laden data file (for now, use either a CNT or EEG
file with concentrated artifact, or else AVG files that have been appended).
To use the Spatial Filter and SNR procedure, you will need a sample of clean EEG
(such as one without eye blinks, or one recorded outside the MR bore), and
another sample that contains the artifact (with blinks, or inside the bore).
Continuous (CNT) files are recommended.
In the example below, we will use the viscpt.cnt demo file, which contains good
examples of VEOG blink artifact. To a copy of that file we added some high voltage
spikes to represent an additional source of artifact. We created a frontal
topographical distribution for the spikes (as opposed to a constant amplitude at all
sites). The blinks, therefore, are examples of artifact you might have to deal with
in any recording, while the spikes represent, in an analogous way, an additional
artifact source (such as one encountered in the bore). The goal is to remove both
types of artifact, while preserving the original signals.
1. Retrieve the original CNT recording (with blinks, but no spikes). If your file was
recorded with a high pass filter setting of DC, you should perform a DC Drift
correction first. Apply any other offline filtering at this point, if desired. If you have
any Skipped channels that you want to include in the analyses, it would be good
to designate them as regular channels now. Reject any blocks that may be bad.
<%COPYRIGHT - 2008%>
Main Menu bar 189
For later comparisons, go ahead and Epoch the file, and then Average the file in
the Time Domain. (We disregarded the different stimulus type codes for this
demonstration; all the sweeps were averaged together). Below is the resulting
average for FPZ, with the prominent blink artifact around 500ms.
Now we need to create a new file that has only clean sections of EEG. Use the
Mark Block / Save Block option to create a new clean EEG file, and then
retrieve that file. Below is a sample of the clean file.
Now select the Spatial SVD transform, select Covariance, and the Data Matrix
option. Enter a file name for the output LDR file (e.g., Step 1 LDR). The LDR file will
be used as the Control LDR, that is, the background activity data matrix that we
wish to preserve.
2. For this step it does not matter which data file you use (we used the same CNT
file as in the previous step). Select the Spatial Filter, and enter the LDR file from
step 1 as the Control LDR. Enable the SNR transform option (the inverse SNR
transform LDR, which will have the same name with _inverse appended, will be
created automatically). Enter the output LDR (such as, Step 2 LDR) and CNT file
<%7317A Edit%>
190 Edit 4.5
names (if you are using CNT files). The output LDR file is the one we will use in the
next step. This spatially normalizes and decorrelates the data via the SNR
transform.
3. We now need a CNT or EEG file that has concentrated artifact in it. There are
different ways to create this. For example, you could take the CNT that has the
artifacts and Save Blocks of the artifacts into a new CNT file. (You should first
perform the DC Drift correction, any additional filtering, and rejection of bad
blocks, as you did in Step 1 with the clean EEG file). Depending on the nature of
the artifact, you might be able to use the Voltage Threshold option to place
events automatically at the beginning of the artifact, and then create an epoched
file using those events.
In this example, since there are two distinct artifacts (blinks and spikes), we did
the following. We used the Voltage Threshold option to set triggers for the blinks,
we then Epoched around the blinks (-200 to 600ms), and averaged the blinks
together. Below is the average of blinks at FPZ.
The spikes had a lower peak voltage than the blinks, so we used Save Block to
create a new CNT file with spikes, but no blinks. We then used the Voltage
Threshold option to set triggers for the spikes, and then Epoched and Averaged
the file as with the blinks. That average for FPZ is shown below.
<%COPYRIGHT - 2008%>
Main Menu bar 191
We then made a simple Script file where we Inputted one AVG file (blinks), then
used the Append Sweeps option to add the second AVG file (spikes) to create a
new EEG file containing two sweeps (one blinks and the other spikes). In instances
where there are multiple artifacts to be removed, it is necessary to have the
artifacts contained in the same CNT or EEG file. The above steps are a simple way
to create such a file (note that the sweep durations for the AVG files must be the
same).
After creating the concentrated artifact file, make a Script file (this must be done
in Script mode to avoid integer formats that may lose precision or clip the data),
using it as the Input File. The next transform in the Script tree will be Linear
Derivation, where you select the SNR transform LDR (created in step 2 - not the
inverse LDR file). Enter an output CNT file name (if you are using CNT files; this file
will not be used). The last step in the Script should be the Spatial SVD transform.
Select the Covariance option. Specification of Percent Retained Variance is an
option that you may wish to vary (we used 95 in order to see most of the
components). Enter, for example, Step 3 LDR for the output LDR file. Then execute
the Script file.
The Spatial SVD option performs a Principle Component Analysis to determine the
major components that comprise the signals. The Transform Report will show the
number of components, the fraction of variance accounted for, and the SNR value
(or mag, for magnitude). At this point, you need to decide which components to
include in the subsequent analyses. The magnitude (SNR values) should be greater
than 1, but by how much? In this example, only two components emerged.
You could easily have more than two. There is no absolute rule for which
components to use. In our example, we ran the analyses with just COMP1 and
again with both COMP1 and COMP2. With COMP2 omitted, the spikes were still
<%7317A Edit%>
192 Edit 4.5
there. In this case, COMP1 reflected the blinks and COMP2 reflected the spikes.
With different files and different artifacts, you may need to experiment a little to
determine which ones to omit. From the files we have analyzed, it appears now
that a good cutoff is a mag value between 1.5 and 2, especially where the
variance percentage is very low (less than 1%, perhaps) for the remaining
components.
To remove the unwanted components from the LDR file, retrieve the file in Notepad
or other text editor. Delete the components as desired and modify the top line
accordingly. The two numbers on the top line are the number of new channels and
the number of existing channels. The number of new channels should be changed
so it is the same as the number of components. An example from a different file is
shown below, where four components were kept, and the top line has been
modified accordingly.
4. Now retrieve either CNT file (it does not matter which one). The next step is to
design a Spatial Filter LDR using the result of step 3 as the Removal LDR (do not
include a Control LDR). Enter output file names for the LDR (such as, Step 4 LDR)
and CNT files (if you are using CNT files; all we need is the output LDR file). The
output LDR file is the one that will be used to remove the unwanted artifact.
5. Finally, we need to make another Script file. The Input File is the data file to
be corrected (not the concentrated artifact file). The next step in the Script tree
is to select the Linear Derivation transform, and select the SNR transform LDR
file generated in step 2 (not the inverse one). Then, select the Linear Derivation
transform again, and enter the result of step 4 to remove the artifact
components. Select the Linear Derivation transform for a third time, and select
the inverse SNR LDR that was generated in step 2 to restore the data to
potential (microvolt) units. Lastly in the Script file, create an Output File to save
the results to a new file. (Note: In all linear derivations, it is OK to leave the units
as <default>; the final result will be microvolts, even though intermediate values
are SNR.) Execute the Script file.
Now retrieve the original artifact-laden CNT file and the final output CNT file from
step 5 to compare the effects visually (displays scales are slightly different
between files).
<%COPYRIGHT - 2008%>
Main Menu bar 193
Original with blink and spike artifact Same section after SNR correction
Epoch the final output CNT in the same way as you did the original clean EEG file in
step 1, and compute the average file (again, we combined all the trigger types). In
the figure below, the green waveform is from the original viscpt file (FPZ), with
averaged blink artifact around 500ms. The red waveform is the identical file with
spikes added (the rest of the red line is hidden behind the green line). The blue
waveform is the same file after the blinks and spikes were removed using the SNR
method.
<%7317A Edit%>
194 Edit 4.5
Lastly, well take a close up look at some of the channels (VEOG and O1). You can
see in the VEOG channel (blue) that not quite all of the spike artifact was
removed, while the spikes were slightly over-corrected in the O1 channel (next
figure).
VEOG Channel
<%COPYRIGHT - 2008%>
Main Menu bar 195
O1 Channel
In most of the channels, the spike removal looked perfect, but there were a few
channels that showed minor under-corrections or over-corrections. The spikes
were artificially created, with relatively high voltages. They may or may not
provide an accurate estimate of what you will find with genuine data.
While we have been focusing on blink and spike artifact, the same method can be
used for other undesired artifact, such as, ballistocardiogram (BCG). This is the
artifact occasionally seen in recordings made in the MR bore, due to
micro-movements associated with the heart beat. In test files we have analyzed in
our facility, the SNR procedure has worked very well in recordings where there is
simple BCG. That is, where the BCG artifact appears as repeated heart beat
artifact that does not vary appreciably during the recording. In other files, where
the BCG artifact appears as a more complex waveform that varies in its morphology
or spatial distribution during the course of the recording (suggesting that there
may be more than one source accounting for it), the procedure has been less
successful. We also suggest using the EKG Noise Reduction routine that is included
with the Maglink RT system.
Additional SNR Information - SNR values of 1 are equal to the noise level in the
raw, unaveraged EEG. Values greater than 1 indicate a signal strength greater
than the noise level. Thus, the SNR values displayed in average (AVG) files are
scaled for single trials. This convention allows comparison of SNR values across
files that have differing numbers of sweeps. The single-trial SNRs are the common
denominator across files. However, as the number of trials increases, the actual
SNR values for the final average also increase, according to the following equation:
<%7317A Edit%>
196 Edit 4.5
For example, a peak single trial SNR of about 1.3 converts to approximately 8.3
{1.3 x SQRT(41 sweeps)} for the final average. In other words, its a very strong
signal. However, in a single sweep of EEG, the signal would be only marginally
greater than noise.
You may have noticed that there are final output LDR files created each time you
do the Spatial Filter. These are used in the computation of the Output AVG file.
Once created, however, you may find it is faster, especially with files having large
numbers of channels, to apply these LDR files to other data files using the Linear
Derivation transform. Doing so assumes that the other data files were recorded
from the same subject under like recording conditions. You can also automate
much of the procedures with Batch files.
We wish to emphasize that the examples above do not represent the only
methods, nor necessarily the best ones, although they gave good results in our
testing. We are presenting these approaches, with as much guidance as we can
offer, but there is much to be investigated further. For example, one might ideally
record eye movements in a separate recording, go through the above steps, and
generate a final LDR file that could be used in subsequent experimental recordings
with that same subject. What may be critically important in doing this, however, is
the similarity between the VEOG artifact generated intentionally and the artifact
that occurs spontaneously. Intentional blinking could be more pronounced and
pervasive, affecting more posterior sites, for example, and there could then be an
overcorrection at these sites. This is something we have not investigated. Also,
one might wish to record vertical and horizontal eye movements and place these in
the artifact file to be removed. We expect that the horizontal movements would
appear as a separate component, and that both may be removed while still
retaining the EEG.
Since the Spatial Filter and its SNR option are relatively new features, having many
options in the ways they can be implemented, we request any helpful information
you wish to provide based on your experiences. We would greatly appreciate
hearing from you, and receiving a copy of the files you are using.
Lastly, we would like to point out that while the above examples have dealt with
the removal of unwanted VEOG artifact, this is just one possible use of the LDR
<%COPYRIGHT - 2008%>
Main Menu bar 197
Spatial SVD (CNT, EEG, AVG; time domain) - The Spatial Singular Value
Decomposition (SVD) transform can be applied to any time domain file type (AVG, EEG,
or CNT). This transform generates spatial component topographies, fraction of total
variance explained by each component, and a linear derivation file for deriving
component time series. (See also the PCA/ICA capability, described in the Toolbox
manual).
The Spatial SVD transform is equivalent to spatial PCA (principal component analysis)
without rotation of components. A series of spatial components i.e. unit magnitude
channel vectors or topographies are derived such that the first component
accounts for a maximum of the temporal variability in the data; the second spatial
component is orthogonal to the first and accounts for a maximum of the residual
temporal variability; etc. Spatial SVD is a linear decomposition which produces
statistical sources for the data. The rationale for making a linear decomposition is
based on the rationale for performing a full-fledged biophysical source analysis, i.e.,
the quasi-static approximation for volume conduction in biological media (Plonsey,
1969) implies that transmission from brain sources to measured scalp potentials is
instantaneous and linear. All of the statistical sources considered together span a
signal space that corresponds to the biophysical projection of the brain source
signals to the scalp. However, there is not in general a 1-1 correspondence between
individual spatial SVD components and brain sources. In particular, note that the
spatial SVD components are mathematically required to be mutually orthogonal,
whereas the biophysical projections of actual brain sources to the scalp are not
orthogonally constrained.
Using Spatial SVD - The easiest way to explain the uses of Spatial SVD is with an
example. We will take the P300.eeg file, perform the SVD, create and retrieve the
output LDR file, and apply it to the files made from the P300.eeg file. (If you
followed the example with the P300 file in the SCAN Tutorials, you will have
created the .AVG files already).
Start by retrieving the P300.eeg file. Perform the Baseline Correction, if desired.
The main thing is to perform the Ocular Artifact Reduction transform to remove the
VEOG blink artifacts. Otherwise, the largest component in the PCA will be the
blinks. Refer to the Tutorial or the Ocular Artifact Reduction section above for a
discussion of the VEOG reduction routine. Call the corrected EEG file P300VEOG.eeg
. Be sure to change the "focus" to the P300VEOG.eeg file for the next operations
(or close the other .eeg files).
Next, create averages from the P300VEOG.eeg file based on Type codes of 1 (the
frequent responses; call it P300freq.avg) and on Type codes of 2 (the rare
responses; call it P300rare.avg), as described in the Tutorial. (Note that there is
a button on the Spatial SVD display. This accesses the Sorting Criteria
display used in other transforms to select the sweeps that you wish to use).
<%7317A Edit%>
198 Edit 4.5
With the "focus" on the P300VEOG.eeg file, select Spatial SVD from the list under
Transforms. Since there could easily be an offset relative to the baseline for the
P300 component, select the Cross-Products option (Covariance disregards any
offset). Leave the Include Skipped field unchecked. When enabled, this option
will include in the analyses any channels that you have designated as Skip
channels. Leave the Interval set for the entire range, and set the Percent of
Retained Variance to 95. Use the file name of P300SVD.ldr for the Output LDR
file, with the default Components button enabled. This means that the output
LDR file will have the weights for constructing the principle components
topographies. If Data Matrix is checked, the LDR file will contain the data matrix
itself (either a covariance matrix or a cross-products matrix, depending upon which
was selected above). The standard Sorting options are accessed from the Sort
button. If you are sorting by responses, please see the section entitled "Some
notes about response codes 100 " for some important information. Then click
OK. A progress bar will track the SVD calculations, as the LDR file is being
computed.
Now, retrieve the P300rare.avg file that was created above. Select Linear
Derivation from the Transforms list of options. In the Linear Derivation screen, use
the Browse button to select the P300SVD.ldr file. Enter a file name for the output
AVG file - call it P300rare-SVD.avg, then click OK. The first 3 components are
shown below.
<%COPYRIGHT - 2008%>
Main Menu bar 199
These are the components that account for nearly all of the "energy". (Since we
used Cross-Products in the SVD calculations, the program does not compute
variance, per se, but rather variance without subtracting the means). The P300
portion of COMP1 could be used to determine a "global" P300 latency. For interest,
repeat the same steps with the P300freq.avg file, and compare the two. The P300
related differences are fairly obvious.
You can obtain similar results by calculating the SVD using the P300rare.AVG file,
rather than the P300VEOG.eeg file. Retrieve the P300rare.avg file, and select
Spatial SVD from the Transform list. Select Cross-Products and 95%, as above,
and enter a new file name for the Output LDR File - P300rare.ldr. After the
calculations are completed, switch the "focus" to the P300rare.avg file again, and
select Linear Derivation from the Transforms list. Select the P300rare.ldr file. Enter
a file name for the Output AVG file - P300SVD-rare.avg, and click OK.
<%7317A Edit%>
200 Edit 4.5
Notice that the first component is very similar to that created in the
P300rare-SVD.avg file above.
Another use for the Spatial SVD is in the identification of features in single sweeps.
In the above example, start with the P300VEOG.eeg file and perform the Spatial
SVD. Then return the focus to the P300VEOG.eeg file, and select Linear Derivation.
Select the same P300SVD.ldr file used before, and click OK. Enter an output .eeg
file name. When the calculations are completed you will see a new multiple window
display with the single sweep results (step through the file as with any .eeg file).
If you average this file, sorting for Type 2, you will obtain the same results as we
did in the P300rare-SVD.avg file above.
See also the Spatial Filter section for further examples of the Spatial SVD,
especially regarding the use of the Data Matrix option.
2.4.49 Spectrum
Forward FFT is the Transform used for computing FFTs with single-sweep EEG files
(see above). Keep in mind that computing the spectrum of an averaged waveform will
not be the same as computing the average spectrum from the single sweeps.
Waveform averaging in the time domain reduces the power of all non-time-locked
activity such as ongoing EEG. Thus, the spectrum of an average waveform consists
primarily of power from the time-locked signal (event-related potential), plus a
contribution from the power of the residual noise. On the other hand, the average of
single sweep spectra will not differentiate between time-locked and non-time-locked
contributions. Thus, an average spectrum will typically be dominated by the ongoing
EEG activity (since the non-time-locked activity usually dominates the time-locked
activity on single sweeps).
After retrieving your AVG data file, click on Transforms. Click on Spectrum and the
spectral options dialog box will appear. The display consists of two main sections, and
an information section.
<%COPYRIGHT - 2008%>
Main Menu bar 201
Window - You may select to Window the data to control spectral leakage.
Window type - The window type field determines whether a Cosine, Hamming,
Hanning, Parzen, Welch, or Blackman is employed. The differences between
these various windows are subtle.
Taper [ms] - This field displays the length of the taper in ms (X% of the
Duration, where X is the Taper [%] entered below).
<%7317A Edit%>
202 Edit 4.5
Taper [%] - The window length determines the extent of taper at the
beginning and at the end of the epoch.
General Information - The remaining informational fields display the Duration of the
current sweep(s), the Resolution (width of the frequency bins), and the highest
frequency in the Range of frequencies (half the AD rate).
Output File. Use the button to access the dialog box to enter an output file
name and to select a folder.
For illustration purposes, retrieve the vep.avg file, and use the Spline Fit transform
to allocate 512 points (to achieve the required power of 2). Compute the
Magnitude, with Scaling set to Amplitude, and a Cosine Window with a 10%
taper. Enter a file name and folder. When you have entered the desired settings,
click OK. After the computation is complete, you will see a new multiple window
display with the results of the FFT. To reduce the frequency range of the display,
go to the Frequency section under Overall Parameters. Set the Display Stop time
to, for example, 50Hz, and click OK. The result will appear similar to the following.
This is the power spectrum at OZ. Note that the standard EEG frequency bands (delta,
theta, alpha, beta) are displayed as a series of colors. You can change these colors by
selecting the colors item located in the Options g Multiple Window Settings g
General g Frequency Bands).
Note
On occasion, you may wish to change the frequency resolution, that is, the width
of the frequency bins. This can be accomplished by changing the epoch duration
at the time the CNT file is epoched; the longer the duration, the narrower the
frequency bins (or the greater the frequency resolution).
Calculation of Phase is very similar. Still using the spline fitted vep.avg file, again
select the Spectrum option under Transforms, and enable the option.
Enter a file name in the Output File display (the AVG extension will be added
automatically), and click OK.
<%COPYRIGHT - 2008%>
Main Menu bar 203
The Y-axis displays degrees from 180 (top) to -180 (bottom). The X-axis is in Hz.
For this example, we reduced the X-axis display Stop frequency to 40Hz.
Note
Only selected frequencies are displayed. As the FFT power approaches zero, the
Phase angle becomes essentially meaningless. Therefore, Phase is displayed only
for those frequency bins where their power exceeds 5% of the total FFT power.
(The total power includes all channels that are not designated as Bad or Skipped
channels, and all frequencies).
What does it mean when there is, for example, a phase value of 50 degrees at a
given frequency bin? A pure cosine wave, for each given frequency, is used as the
reference waveform. If you imagine a cosine wave with an amplitude of 1, then the
amplitude at 0 degrees will be 1. At 90 degrees, the amplitude is zero. At 180
degrees, the amplitude is -1. At 270 degrees, it is back to 0, and then 1 at 360
degrees. The Phase value is the number of degrees that your data waveform is
shifted in relation to the cosine reference. Let's say that your observed EEG
waveform has the characteristics of a sine wave. At 0 degrees, the amplitude is 0,
at 90 degrees the amplitude is 1, at 180 degrees it is 0, at 270 degrees it is -1,
and at 360 degrees the amplitude is back to 0. In relation to the cosine, the Phase
of the sine wave would be shifted 90 degrees in the positive direction.
(Technically, it could also be -270 degrees, but Phase is limited to + 180 degrees).
Phase is calculated for each frequency bin. Phase calculations are used, for
example, where you are interested in interhemispheric relationships among steady
state evoked potentials.
Spline Fit (EEG, AVG; time domain) - Spline Fitting fits an existing waveform to a
new, specified number of points. This is essential if you, for example, recorded data
with a number of points other than a power of 2, and then wish to do an FFT or
coherence analysis (both require the number of points to be power of 2). Or, you may
<%7317A Edit%>
204 Edit 4.5
wish to combine two or more data files that differ only their number of points (same
number of channels, same labels, same start and stop times for the epoch interval).
Spline Fitting can then be used to force a different number of points on to the same
waveform. As a general rule, you should only spline down to the nearest power of 2.
For example, if you 300 data points, you should spline down to 256, not up to 512.
After retrieving your EEG or AVG file, select Spline Fit from the Transforms list. The
Spline Fit window will appear, displaying the current number of points. Enter the
desired number of points, use the button to access the dialog box to enter an
output file name and to select a folder, and click OK. A new multiple window display
will appear with the new number of points.
2.4.51 Subtract
Subtract (AVG, time and frequency domain; EEG, time domain) - The Subtract
option computes the difference between two like files, and displays the results as a
difference waveform. The files must have the same number of electrodes, the same
labels, the same start and stop points for the epoch, and the same number of points.
With EEG files, the reference AVG file is subtracted from each sweep in the EEG file.
With prior versions of SCAN, it was possible to subtract COH files. Since that is not a
valid operation without first transforming the COH values (using, for example, Fisher's
z), we recommend instead that you export the COH files to ASCII, import them into a
statistical package, and perform the transformation and subtraction there.
<%COPYRIGHT - 2008%>
Main Menu bar 205
After retrieving a .dat file, select the Subtract option from the Transforms list. You will
see the Subtract display. Use the button to select the comparison file and the
output file. Then click the OK button. A new multiple window display will appear
containing the difference waveforms.
Subtract Average (CNT) - The Subtract Average transform lets you subtract an
AVG file from sections in a CNT file. For example, if you have an averaged EKG or BCG
artifact, you can subtract that average from detected artifacts in the CNT file. To use
the transform, you must first have stimulus or response events placed for the artifact
sweeps. The events can be placed using the Voltage Threshold transform, the QRS
Detection transform, or manually using Insert Multiple Events.
Subtract Average was split out from the EKG Noise Reduction transform to allow you
more control in its use. Part of the EKG Noise Reduction transform involves creating a
rolling average, and then subtracting that from subsequent artifact sweeps. The
Subtract Average transform is similar in that an averaged artifact is subtracted from
detected artifact sweeps. The average file, in this case, is not rolling - it is based on
whatever sweeps you use to create the average.
Note
The Correlate Peaks, QRS Detection, and Subtract Average transforms perform many
of the same operations contained in the EKG Noise Reduction transform. They were
create as separate transforms to allow more flexibility in their use (and to make them
available in the regular SCAN software; whereas, you need a Toolbox license to have
access to the EKG Noise Reduction transform). An example using the transforms is
presented just below.
<%7317A Edit%>
206 Edit 4.5
Average File. Select the AVG file that will be subtracted from each designated
event in the CNT file. Generally, the AVG file is one created by Epoching and
Averaging sweeps from the CNT file. The events should be place first using the
Voltage Threshold transform, the QRS Detection transform, or manually using
Insert Multiple Events.
Note
When you epoch the CNT file, you should use Start and End times just as if you
were using the EKG Noise Reduction transform. That is, select an End time that
overlaps slightly with the next R wave peak. In most cases, Start and End times
-200 and 1200ms should work well for EKG reduction.
Dilate. A given artifact sweep may vary from the average artifact by overall
amplitude - it may be somewhat larger or smaller than the average artifact.
Enabling this option will direct the transform to fit the average to the current
sweep by using a multiplier to dilate or constrict the average waveform until a
best fit is obtained. On a per channel and per trigger basis, data points in the
average waveform are scaled according to a minimized RMS value. The final
subtraction will avoid over- or under-correction that may otherwise occur.
Output file. Enter a name for the new CNT file that will be created.
Channels. You can have the correction applied to All channels, or only Specified
ones. In the latter case, select Specified and select the channels to be included
<%COPYRIGHT - 2008%>
Main Menu bar 207
1. The first thing we need to do is add event marks for the peaks of each artifact.
There are at least three ways to do this: the Voltage Threshold transform, the
QRS Detection transform, and manually.
<%7317A Edit%>
208 Edit 4.5
Looking through the file, it appears that a threshold of about -620mV may work.
We enter the parameters as displayed to have the Voltage Threshold transform
insert the events (type 10). The Refractory Period will block out other peaks
that reach the threshold.
Looking again through the file, the events were placed correctly in all
instances, with no false positives or false negatives.
b. QRS Detection. Had the Voltage Detection not worked, we might then try
QRS Detection to insert the trigger events. You need only select the artifact
channel and enter the Type code to insert.
In this file, QRS Detection inaccurately placed events at all peaks. Averaging
those sweeps and then subtracting the average would lead to very
unacceptable results.
<%COPYRIGHT - 2008%>
Main Menu bar 209
It is also possible - with any of the above methods - to filter the trigger
channel first to make the peaks easier to detect. Assume you filter the trigger
channel and have placed the events accurately using one of the above
methods. Now, if you want to perform the correction using the original data,
you will need to transfer the events from the filtered file to the original file. You
can do this by selecting the Event File transform to create a text file that
contains the event types and positions. You can then import that event file
using the Import Event File transform (see Import Event File 133 above). You
will then have the same events in the original file, and you can proceed to the
next step.
c. Manually insert the events. If no other way will work well enough, you can
use the icon to Insert Multiple Events. Display a few seconds at a time
to facilitate placements at the peaks (better temporal resolution). The
Correlate Peaks transform will correct small errors by alignment by waveform
correlation rather than event placement.
2. Once you have placed the events, the next step is to correct the placements
based on waveform correlations, rather than by simply aligning the events, using
the Correlate Peaks transform. Enter the stimulus (or response) code marking the
peaks. The Correlation Interval has been described above. It is the actual interval
in the most recent artifact sweep that will be correlated with the same interval in
the average artifact. It typically encompasses the R wave, although it can be a
different interval (-100 to 100ms about the events was used in this example).
<%7317A Edit%>
210 Edit 4.5
The Shift Limit is imposed to minimize the possible correlations that will be
computed (+25 points was used). Ten sweeps will be averaged to create the
average artifact. Sweeps that do not reach a correlation of .90 will be excluded
from the average.
You probably will not notice any difference after applying the correction. The
events were repositioned as needed to maximize the correlations.
3. The next step is to create the averaged artifact that will be used in the
correction. In the EKG Noise Reduction transform, this will be a rolling average. In
the current steps, we will use a single average based on the entire recording.
Epoch the CNT file only for the artifact events that were entered (type 10 in this
example). For X Minimum and X Maximum, we recommend -200 to 1200ms in most
cases for EKG. It does not matter that the maximum extends into the next artifact
(in fact it is recommended). For BCG, it may take more experimentation to find the
best times, and it may work better if there is no overlap with the next artifact.
Now that you have the epoched file, you can reject any remaining sweeps that are
aberrant, perform baseline correction, detrending, etc. as needed. Filtering is not
recommended at this point.
Note
The EKG Noise Reduction transform uses a rolling average. That is to allow for
variations in the heart beat that can occur over time. The assumption is that a
given EKG pulse will be more similar to the N beats that precede it than to the
average of all heart beats in the file. In the preceding step, we averaged all the
heart beats in the file, knowing that the subtraction may be less than perfect.
<%COPYRIGHT - 2008%>
Main Menu bar 211
4. Now that we have an average artifact AVG file, the final step is to subtract that
waveform from each section about the events in the original CNT file. This is the
purpose of the Subtract Average transform. Select the file to be subtracted,
select whether the CNT file events are stimulus or response types, and enter the
type code. The Dilate option was selected to correct for beat to beat amplitude
variability. Enter an output file name, and apply the corrections to all or selected
channels.
The steps have significantly reduced the BCG artifact. In general use, we
recommend that you try the EKG Noise Reduction transform first, and then try the
individual steps if that is not successful enough. The individual steps allow you to
observe better what is happening with a difficult file, and thereby suggest
parameters or other steps that may be more effective.
<%7317A Edit%>
212 Edit 4.5
2.4.53 t-score
t-score (AVG, time and frequency domain) - This option calculates t-tests for each
electrode over time for waveform data and over frequency for spectral data. Student's
t for two distributions that are thought to have the same variance but different means
is computed as the difference between the means normalized by the standard error of
the difference of the means (Sd):
t = (mean1 - mean2) / Sd
Follow these steps to compute t-scores between two comparable group data files.
The two group data files must have the same number of electrodes, the same
electrode names, the same epoch start and stop time points, and the same number of
points.
1. Select the first of the two groups that you wish to compare. Since you will be
subtracting group 2 from group 1, give some thought to which file you retrieve
first. For example, if you are comparing P300 RARE and FREQ group averaged
recordings, you should recall the RARE group first. Otherwise, the t-scores will
have negative values during the P300 component, and the maps will show a
significant decrease during the P300 component.
2. Next, select t-score from the Transforms list, and see the t-score display.
3. Select the comparison file using the browse button , and the Open File
utility display that is accessed. Then click OK.
4. Use the button to select a folder and enter an output file name, then click
Save, and you will see a new multiple window display containing the t-score
waveforms.
Shown below is the result of the t-score operation between auditory P300 RARE
and FREQ group data waveforms. T-scores have been computed for each point at
all electrode sites. The results for the PZ electrode are displayed.
<%COPYRIGHT - 2008%>
Main Menu bar 213
Large positive t-values are found over the 250 to 400ms interval as well as
negative values from about 530 to 700ms.
5. Note that you may map the t-score data just as you map other data files.
Please refer to the Mapping sections below for details (the .map file must agree
with the data file in terms of channel labels). A 2D Cartoon displaying the t-scores
throughout the P300 and N400 components will appear similar to the following:
Note
The t-score option will not be active on the Transforms list if variances have not
been saved for the comparison file. Variances across individuals are automatically
saved when group averages are created. Thus, for a comparison of two group
averages, the Compute Standard Deviation option under Average need not
have been toggled on when the individual averages were made. However, the
t-test comparison of two individual average waveforms does require that the
<%7317A Edit%>
214 Edit 4.5
Voltage Threshold (CNT) - The Voltage Threshold option allows you to insert
event markers into a CNT file on the basis of a detected voltage in a specified
channel, and to reject sections of a CNT where detected voltages exceed a specified
threshold.
Retrieve a CNT file and click Voltage Threshold on the Transforms list. The Voltage
Threshold display will appear. (The viscpt.cnt file was used below to illustrate this
feature).
Operation - The operation field allows you to select Add Events or Reject
Segments. Add Events will add triggers to the CNT file where the voltage
threshold is met. Reject Segments will reject segments of the CNT throughout
the span where a designated channel exceeds the threshold.
Direction - The options are: Greater than, Less than, and Absolute value. In
the first two options, a trigger will be placed when the voltage at the designated
Channel is Greater than the Threshold, or Less than the Threshold. In the first
case, think of that as a positive voltage that exceeds the positive Voltage
Threshold. In the latter case, think of that as a negative voltage that is less than
a negative Voltage Threshold. The Absolute value option will result in a trigger
when the threshold is exceeded in either the + or - direction. In this instance, the
threshold MUST be a positive number.
<%COPYRIGHT - 2008%>
Main Menu bar 215
Channel - The pull-down menu will display a list of all your channels. Select the
one that is to be monitored for the voltage threshold.
Stim Code - This field lets you specify the trigger type code that will be inserted
at each detected event.
We will illustrate the Add Event option by having Type codes of 100 entered into
the viscpt.cnt file at every point where the voltage on the VEOG channel exceeds
250mVs (with a refractory period of 500ms just to make sure that multiple events
are not entered for the same blink). In other words, we will add triggers near the
peaks of the more prominent blinks. Enter the values and click OK.
The events will be added to the CNT file. Step through it until you see a prominent
blink - it will have a type code of 100 beneath it.
Note that these types codes may now be treated just like any other stimulus
trigger type codes from STIM. You may create epoch around them, include them in
an event file, and so forth.
The other option with Voltage Threshold is to use it to reject segments in the CNT
file. Using the same original viscpt.cnt file, select Voltage Threshold, and enter the
settings as shown.
This will result in the automatic rejection of those segments of the CNT file where
the positive voltage from the VEOG channel exceeds 150 mVs, with a 200ms
refractory period. Click OK, and locate a blink. The span of the peak part of the
blink will be rejected in all channels (changed to red).
<%7317A Edit%>
216 Edit 4.5
2.4.55 Window
Window (EEG, AVG; time domain) - The Window transform applies a window taper
to single-sweep epochs. Application of a window can be useful to minimize edge
effects.
After retrieving your EEG or AVG file, select Window from the Transforms list. Select
the type of windowing function from the pull-down list (Cosine, Blackman, Hanning,
Hamming, Parzen or Welch), and the enter the extent of the taper. The effects of the
various filters and taper length are displayed in the Function preview region. You may
window All channels, or just Specified channels (click the Select button and select the
channels from the montage diagram).
Enter a file name and path, and click OK when you are ready to proceed. A new
multiple window display will appear containing the windowed data.
<%COPYRIGHT - 2008%>
Main Menu bar 217
2.4.56 z-score
z-score (AVG, time and frequency domain) - The z statistic is used to determine
how many standard deviations from the mean a given value happens to fall. For
example, you can use z-scores to compare an individual's EP measures to a group
distribution of the same measures. In EDIT, z-scores are computed for each electrode
over time for waveform data and over frequencies for spectral data. The formula used
for calculating z-scores is:
Retrieve either the group average file or the individual's data file (the order does
not matter). Note: when you average the individual's sweeps, you must have the
Compute Standard Deviation option disabled.
After retrieving either file, select z-score from the Transform list of options. You
will see the Z-score display. Click the Browse button to access a Select Data
File utility. Select the other file for the comparison, and click Open.
Enter a filename and path, and click the OK button. You will then see a new
multiple window display containing the z-scores for each time point and from each
channel.
<%7317A Edit%>
218 Edit 4.5
Note
When you close a data file (or close EDIT) following a Transform or other operation
that may cause a modification to the data file, you will see a message asking if you
want to save the change. Click Yes to save the file with the modification, No to close
the file without the modification, or Cancel to cancel the closing of the file.
<%COPYRIGHT - 2008%>
Main Menu bar 219
<%7317A Edit%>
220 Edit 4.5
Grouping Methods - There are two Grouping Methods: Group and Individual. The
Group method computes an average based on a grouping variable, where each
subject in the average is represented by one file. Therefore, it also calculates and
stores the number of individuals within the average. When using the Grouping
method, it is NOT necessary for the individual averages to have been formed with
the Compute Standard Deviation option enabled (in the Averaging transform).
The variance is created across individual AVG files to get the grand variance.
The Individual method computes weighted data averages based upon the number
of trials or sweeps in each data file. For example, if two files are averaged
together, and one file comprised three times as many trials as the other file, then
values in the first data file would be multiplied by a factor of three. Then the files
would be summed and divided by two (the number of files in the average). This
utility primarily should be used to average several data files associated with the
same individual. Since this average takes into account the total number of trials
per waveform, the resulting average is the same as if the data were collected and
averaged in one contiguous session.
<%COPYRIGHT - 2008%>
Main Menu bar 221
When using the Individual method, it IS necessary for the individual averages to
have been formed with the Compute Standard Deviation option enabled (in the
Averaging transform). The variance is created for each AVG file, and then
combined to get the pooled variance across epochs.
Min Sweeps - The minimum # sweeps field determines the minimum number of
sweeps that a given file must contain to be included in a group average.
Make List - Click the button to access the Select Data Files
display. If the data files are all in the same folder, you can use the standard
Windows keyboard options to select multiples (Ctrl+left mouse; Shift+left
mouse). The selected files will be displayed in the File List.
Use the button to remove an unwanted file from the list (highlight
the file, then click the button).
button.
Import List from ASCII - The Import from ASCII option lets you retrieve a .dat
file that you saved using the Export to ASCII option (see below).
Exclude Bad Electrodes - When enabled, activity in any of the channels marked
Bad, in any of the data files, will be excluded from the group average. If you leave
it disabled, the activity in the Bad channels will be included in the group average.
If there are any Bad channels in common across data files, the group average will
<%7317A Edit%>
222 Edit 4.5
indicate this by displaying the electrode labels for those channels in red. After
retrieving the group averaged AVG file, click between the electrode displays with
the right mouse button and select the option. You will then see a
display showing how many sweeps were averaged for each channel. With Group
Averaging, this will be the total number of files minus the number of files with Bad
channels. With Individual Averaging, this will be the total number of sweeps across
files, minus the number of sweeps in files where the channels were Bad. For
example, if you had File1 with 100 sweeps and no Bad channels, File2 with 200
sweeps and no Bad channels, and File3 with 300 sweeps with one Bad channel at
FZ, then the "View N Values" count for FZ, in the final average, would be 300 (600
Total sweeps minus 300 with no accepted sweeps from FZ).
Exclude Skipped Electrodes - When enabled, activity in any of the channels marked
Skip, in the Primary data file only, will be excluded from the group average, and
those channels will not appear in the group average. The same Skipped channels in
subsequent data files will also be Skipped - there will be no group averaged data
displayed (or calculated) for the channels that are Skipped in the first data file.
Different Skipped channels in subsequent data files will be ignored. The rationale
for this is that you typically decide which channels are to be Skipped before
acquisition begins. For example, you may want to Skip an EKG channel. Skipped
channels in a group average, therefore, should be the same channels across data
files, so the first data file is used as a template for the remaining data files. Bad
channels, on the other hand, are channels that go bad during acquisition, or may
be determined to be bad in the offline analyses. These may easily vary from file to
file, and are therefore treated in a different way, as described above.
If you leave Exclude Skipped Channels disabled, the activity in the Skipped
channels will be included in the group average, and the channel will be displayed.
Use the button to enter a file name for the averaged data file, and click
Save. A new multiple window display will appear with the averaged waveforms.
User Defined - The User Defined option allows you to select a data file first, then
select a Script file to apply to that file (see the Script section below for scripting
details). Retrieve a data file, then click the User Defined option. An Open File display
will appear, allowing you to select a .tfs (script file) you have already created. After
selecting the file, it will then be applied to the data file. Notice in Scripting, described
below, that one of the options under Input File, "Files of type", is for a Neuroscan
Setup File (.ast). Selecting the setup file allows you to create the script without
specifying a data file. Then, when you subsequently retrieve the data file, you can
apply the script to that file by using the User Defined option. This allows you to apply
one script to multiple files without inputting the file name for each (assuming they all
were acquired with the same setup file). Note also that you can create an .ast file
from a data file (under Edit), if you don't have the .ast file.
<%COPYRIGHT - 2008%>
Main Menu bar 223
2.4.59 Script
Script (CNT, EEG, AVG, COH) - Script files are useful when you have a repeated
sequence of operations that are performed on your data file(s). Rather than
performing each operation manually, you can create script files to automate many of
the operations. Aside from saving time and reducing the monotony, script files also
insure that the same operations are performed in the same way, and in the same order
for all data files used. Beginning with SCAN 4.2, BATCH files based on Tool Command
Language (Tcl) are possible, and in many cases preferred over Scripting. BATCH files
let you do much more and are more flexible. For an introduction to Tcl BATCH files,
please see the Tcl BATCH Tutorial (distributed as a PDF file in the \Scan4.5\Pdf
folder), and the Tcl BATCH manual for complete details.
Scripting is accessible at any time in EDIT. However, a script file cannot retrieve a
data file if you have the data file already open. Be sure to close any data files that will
be included in the script program (see the User Defined option above for a way around
this).
Click the Script option at the bottom of the Transforms list, and the following
screen will appear.
The field on the left hand side displays the script "tree" as it grows, and the field
on the right shows the operations that are available for a given step in the script
sequence. When you first start the script routine, there is only one option
available - Input file. Select Input file by clicking it. Note that the
button becomes active. Click it, and you will see the standard Open File utility.
<%7317A Edit%>
224 Edit 4.5
You may also double click on a transform to add it and display its properties
automatically. Select the type of file from the pull-down "Files of type" menu, and
then select a file. For example, select the viscpt.cnt demonstration file (in the
\Scan Data\Demo Files\VisualAttention folder), but do not open it just yet. We will
use it to demonstrate some of the operations shortly.
Notice that one of the options under "Files of type" is for a Neuroscan Setup File
(.ast). Selecting the setup file allows you to create the script without specifying a
data file. Then, when you subsequently retrieve the data file, you can apply the
script to that file by using the User Defined option, described above. This allows
you to apply one script to multiple files without inputting the file name for each.
Display Dialog During Script Execution - You have likely noticed by now that most
of the Transform screens described above have an enable/disable field at the
bottom called . When enabled, the screen will
appear while you are executing the script file. This provides an opportunity for you
to make modifications to the operations while the script routine is running.
Generally, it is preferable to leave it disabled, so the that Script file will run without
the need for user intervention. Leave the field disabled, and open the viscpt.cnt
file.
The Transform Tree displays the first branch , and the Available
Transforms for that type of file are listed on the right side of the display.
If you select any of the transforms, you will see the same dialog screens that are
described above. Select the options that you want to use in the script file in the
same way you would for manual execution. A typical next step might be to Filter
the viscpt.cnt file. Select the Filter transform, and then click the
button. You will then see the same Filter screen described in that section above.
Set the parameters as desired, and click OK. (The final script file we are creating
<%COPYRIGHT - 2008%>
Main Menu bar 225
A note about Scripting with CNT files. Most of the operations performed on a CNT
file contain an option for the Output CNT file. The Output file is always created,
but it may not be one you wish to save. If you do not want the interim files saved
as separate files, the easiest thing to do is to use the default file name for the
Output CNT file (such as FILTER.cnt). The next step will use that file, and any
transformations will be made to the file. If you want an interim file to be saved,
use the Output File option listed on the right-side list of options above.
Exception with Ocular Artifact Reduction. The Ocular Artifact Reduction transform
is a terminal operation. That is, no further operations may be performed on a file
after the reduction has been performed. It is necessary to retrieve the
transformed file in a second script file, and continue subsequent transforms with it.
Continuing with the example, let's say that after Filtering the viscpt.cnt file (and
using the default Output File name), we then wish to Epoch the file. Click the
Epoch option, then Add Transform, and select the settings as desired. For this
step, we will want to create and save the epoched file (.eeg file). Select the
Output File option, click Add Transform, and enter a file name.
After epoching, the next step might be to Average the sweeps using the two type
codes in the file. In other words, we want to perform more than one operation on
the same file in the same script (two sorted averages using the same .eeg file).
The Splitter option allows you to do this. It serves as the junction point for the
branches in the tree. It should be placed just after the "parent" file, or, in this
example, just after the Epoch option (see final tree below). With the Splitter in
position, we can now create the sorted averages.
Select the Average option, and use the Sort Criteria button to select the Type
Codes of 1. Let's then perform a Baseline Correction on the final AVG file, and
give it an Output File name. Then highlight the Splitter option in the tree, and click
the Average option again. Sort this time for Type Codes of 2. Select Baseline
Correction again, and then the Output File option for the second AVG file.
The final Script file should look like the one below.
Remember to save your Script files using the Save Script button. Click Run Script
to execute the Script file, but still remain within the Script editor. If you click OK,
you will exit Scripting. If you made any changes, you will be asked if you want to
<%7317A Edit%>
226 Edit 4.5
save them. Click Cancel to exit the editor without running the Script file.
Using Multiple Files in a Single Script. It is possible to specify more than one file in
a single Script. Select Input File, then Add Transform, then select a data file, as
above. To add an additional file, click the line, and you will see the Input File line
again. Click it again followed by Add Transform and select another file. You can
add transforms to each data file branch.
Substitutions - The Substitutions option lets you use character strings to perform
the desired set of operations on multiple data files. This is a useful and powerful
option if you plan to use script files extensively in your analyses. However, using it
to its full extent requires some preplanning for your choice of file names. Let's look
at a couple of examples that will illustrate its operation.
Let's say you have 5 .eeg data files called exampA.eeg through exampE.eeg.
Note that the file names have in common "examp", and the only thing that
differentiates them is the final letter. That is the character "string" that we will
substitute (the string can have any number of characters). The first step is to
make a list of the characters to be substituted. Select Script from the list of
Transforms. When the Transform Script display appears, click the
button, and see the following display.
The are two string lists that you may use (%1 and %2). The general idea is to
make one or two lists of characters that will be substituted wherever you place
<%COPYRIGHT - 2008%>
Main Menu bar 227
Click the button, and see the Edit Substitution display. (This is the
same display the you may later alter by clicking the button).
For this example, we will be using the %1 substitution list only. Since the first
file we will be using has an "A" as its only unique character, enter an "A" in the
%1 field, and click OK. An "A" will appear in the %1 column. Repeat these steps
to enter B, C, D and E (Insert, B, OK, and so forth). Then click the OK button
on the Substitution List display, and you will be back at the Transform Script
display.
Select the Input File option, click the button, and select the
first file. In this case, it is the exampA.eeg file. Now click the
button. The Input File display will appear, and we want to modify the file name.
This is where you replace the uniquely occurring file name characters, that is,
the strings that you listed in the Substitution list, with "%1". In this case, the
"A" in the File Name line should be replaced with "%1". The path and file name
would read . Then click the Open button. You will see
Then Save the Script file (if desired). Click the Run Script to run the Script file.
You will see it cycle through for each file that has been retrieved.
<%7317A Edit%>
228 Edit 4.5
When completed, you will see a Transform Report. The report can be saved
as a .log file using the Log File field (see below).
Since there are two possible substitution lists that may be used, we could
have, for example, entered a different string list under the %2 column, and
specified that in the Output File name .
The files ending in A-E are retrieved, transformed, and saved as vvv through
zzz (see the section of the Transform Report below).
As you can see, this simple procedure can be used to rename files, even if no
other Transforms are applied.
The button is used to remove an entry from the list (highlight the
entry, then click the Remove button). The button is used to modify
existing entries (highlight the entry and click the Edit button). In some
circumstances, it may be easier to create your substitutions list from a text
editor, rather than using the steps described above. You may do that as long
as you save the file as a .txt file. Then click the button, and
select the .txt file. You may select a number of files at once to add to the list
<%COPYRIGHT - 2008%>
Main Menu bar 229
Editing options. While you can use the button to make changes on
a Transform display, it is not possible to modify the Script file itself - aside from
pruning (deleting) a limb of the tree. That is, it is not possible to delete a single
operation from within a tree, nor to add a step within a tree. For this reason, we
encourage you to construct your Script file on paper first, then create it in the
Script screens. Instead of highlighting a selected transform and then clicking the
button, you can just click the right mouse button on the transform
to go directly to the properties display.
Log Files. You can create a record of the script file operations by enabling the Log
File option from the main Script window. Use the Browse button to set the path
and file name. The summary information is written to a text file (with a .log
extension), which can be reviewed with a text editor.
You also have the option to save the results of the Transform Report (same
information) from the Transform Report screen using the Save As button. The Save
As utility window will appear, and you may specify the file name and path (.log
extension).
<%7317A Edit%>
230 Edit 4.5
Start by retrieving the viscpt.cnt file, and then apply the Voltage Threshold
transform. This is used to add event marks in a designated channel (VEOG, in this
case), whenever a voltage threshold is met (100mV in a positive direction, in this
example).
A type code of 100 was specified for the events. The Voltage Threshold display
should appear as follows.
In the next step, epochs of 0-200ms are created around the type codes of 100.
(Be sure to set the Sort Criteria Type field to 100). An Output .eeg file is created,
and then averaged. The averaged file is then save as artifact.avg. This will create
a perfectly suitable artifact-laden file on which you could then apply the Spatial
SVD, as described in the Spatial Filter section above. Of course, you could also
continue the Script file further and do the Spatial SVD in it.
Cartesian/Polar Coordinates (EEG, AVG, COH; script mode only) - The Cartesian
Coordinate Transform applies especially to complex data, such as after
computation of a Forward FFT, and is a complement to the Polar coordinates
transform. That is, the Polar coordinates transform reverses the Cartesian
coordinates transform, and vice versa. The Cartesian representation of complex
data stores the real part as the first coordinate, and the imaginary part as the
second coordinate. Note that real time domain data can also be viewed as
complex, with the understanding that the imaginary part is identically zero. In
<%COPYRIGHT - 2008%>
Main Menu bar 231
The Polar coordinates transform also applies especially to complex data, such as
after computation of a Forward FFT, and is a complement to the Cartesian
coordinates transform. That is, the Cartesian coordinates transform reverses the
Polar coordinates transform, and vice versa. The polar representation of complex
data stores the magnitude (square root of real part squared plus imaginary part
squared) as the first coordinate, and the phase angle (arctangent of imaginary
part divided by real part) as the second coordinate. Note that real time domain
data can also be viewed as complex, with the understanding that the imaginary
part is identically zero. In this case, the magnitude (first coordinate) equals
absolute value (rectification), and the phase angle is 0 degrees for positive values
and 180 degrees for negative values. In addition to frequency domain complex
data, this transform anticipates an increasing role for treating complex time series
in the future (e.g., complex demodulation). This transform has no effect if the data
are already represented in Polar coordinates. Note that, as of this writing, the AVG
format does not currently store complex data, but the first coordinate (magnitude)
only; however, both EEG and COH formats support full complex data.
Executing Scripts from Outside SCAN. You may execute script files from an external
batch file (.bat file) using the following command:
2.5 Options
The Options fields allow you to set a variety of personal preferences used in the display
windows, such as, colors, axis labels, etc. You may also save and later recall size and
position information for the data windows you open. All of the settings are saved in
"Workspace" files (.aws extensions).
X-Axis - The X-Axis page is divided into 2 regions: Single X-Axis and Tick marks.
<%7317A Edit%>
232 Edit 4.5
Single X-Axis - Click on the Enable field to display the x-axis in the multiple
window display for averaged or epoched files. Select whether you would like
the axis to appear at the Top, the Baseline, or Bottom of the waveform
display. Click on the Time Zero box to have a vertical line drawn at time zero.
Tick marks - Click on the Enable field if you would like tick marks displayed on
the x-axis. Enable Labels if you would like labels to appear under the tick
marks. Under the Step size options (Time and Freq) you may select the
interval between successive tick marks. The Time domain steps are in ms, and
the Frequency domain steps are in Hz. Click the pull-down arrow indicator and
select the desired option (range is from 0.1ms to 100 seconds under the Time
field, and .5Hz to 10kHz under the Freq field; or, select Auto to let the
program place the marks automatically).
When you are satisfied with the settings, click the Save As button to add the
information to the workspace file, then click on OK to continue. Click Cancel to
leave the page without applying any of the selections.
Y-Axis - The Y-Axis page is divided into 3 regions: Single Y-Axis, Tick marks, and
Scaling.
<%COPYRIGHT - 2008%>
Main Menu bar 233
Single Y-Axis - Click on the Enable field to display the y-axis in the multiple
window display. Select whether you would like the axis to appear at the left
end of the x-axis (click Adjust left), the right end of the x-axis (click Adjust
right), or intersecting with the zero point on the x-axis (click Time zero).
Tick marks - Click on the Enable field if you would like tick marks displayed on
the y-axis. Enable Labels if you would like the labels to appear beside the
scale. Under the Step size option you may select the interval between
successive tick marks. Click the pull-down arrow indicator and select the
desired option (range is from 0.01mV to 100mV; or, select Auto to let the
program place the marks automatically).
Scaling - Select whether you would like the scaling to be Linear or to use a
Logarithmic scale.
When you are satisfied with the settings, click the Save As button to add the
information to the workspace file, then click on OK to continue. Click Cancel to
leave the page without invoking any of the selections.
General - The General page is divided into Colors, Misc. and Polarity options.
Colors. Under the Colors section you may specify the color for various display
features, including Text, Axes, Time Zero, Waveform, Frequency Bands,
Waveform Background, Waveform Box, and Window Background. Selecting any
of these except the Frequency Bands option, will display the basic color palette
consisting of 48 options. Click on the desired color, then click OK to invoke the
color.
Note
<%7317A Edit%>
234 Edit 4.5
The Text color will determine the color of the electrode labels. When selecting
the Text color, bear in mind that Bad channel labels will always appear in red,
and Skipped channel labels will always appear in black, regardless of the color
you select for the Text.
If you would like to create your own custom color, click the Define Custom
Colors>> bar. An extension to the color palette will appear. In the large color
screen, catch the reticule with the mouse, move it around the spectrum, and
see the corresponding color in the Color/Solid box below. Notice also the
intensity bar on the far right. Catch the triangular indicator with the mouse,
and slide it up and down to vary the intensity of the color in the Color/Solid
box. When you have decided on a color, click the Add to Custom Colors bar,
and the color will be repeated in one of the Custom boxes on the original Color
screen. Create as many customized colors as you wish.
Notice that each of the display features options will bring up the color palette
with the custom colors you have created. To select one of the custom colors,
click on the box, then click OK to invoke the color for the display feature you
had selected.
The Frequency Bands option is the only exception to the other Colors options.
Clicking this option displays the Frequency Band Colors window. With this
feature you may 1) label up to eight EEG frequency bands, 2) define the start
and stop frequency limits for up to eight EEG frequency bands, and 3) select a
color for each frequency band. Note that these settings apply only to the
Online Frequency Analysis you selected under Overall Parameters g
Frequency section.
The default frequency band names are Delta, Theta, Alpha, Beta1, Beta2,
Muscle, 50Hz and 60Hz; however, you may rename these as you desire.
<%COPYRIGHT - 2008%>
Main Menu bar 235
You may also redefine the frequency limits of each band. Keep in mind that the
actual frequency resolution will be determined by the Points value you
selected under Overall Parameters g Frequency section, and the AD rate.
For example, 256 points, with a sampling rate of 1000Hz, gives a frequency
resolution of approximately 3.9Hz. Therefore, while you might define, for
example, Alpha as 8.0 to 12.99Hz, the actual Start and Stop values may be
closer to 7.8Hz and 11.7Hz. With 1024 points, the actual Start and Stop points
are approximately 7.84 and 12.74, respectively. The program will round the
Start and Stop points you enter, but realize that these are not the exact
values that are calculated. Notice also that you may have overlapping
frequency bands. For example, the 60Hz band is completely encompassed by
the EMG band.
Lastly, you may define the colors for each band by clicking on the
corresponding button in the Color column. The color palette will appear, as
described above. Select the desired color and click OK to continue.
Misc. - In the miscellaneous field you may select additional display options.
Waveform box. This field toggles the Waveform Box on and off. This is the
<%7317A Edit%>
236 Edit 4.5
line box that surrounds the electrode display. The color is controlled by the
Waveform Box color button.
Display Electrode Labels. This option will toggle the display of the electrode
labels (in the upper left hand corner of the displays).
Show Standard Deviation. This field toggles the display of the Standard
Deviation for averaged data files, assuming the sweeps or files must have
been averaged with the Compute Standard Deviation option enabled. When
averaging single sweeps, that option is found on the Averaging transform
display, in the Options section. When group averaging AVG files, the
Compute Standard Deviation option is found on the Group Averaging
Properties display.
Show Head Overlay. When enabled, this option will display the head
overlay.
Polarity. These fields allow you to set the polarity when the file is retrieved.
You can set it for From File to use whatever polarity setting is saved with the
data file. Or, you can select Negative Up or Negative Down to override the
data file and present the polarity the way you want.
<%COPYRIGHT - 2008%>
Main Menu bar 237
The gray area between the electrode displays is set by the Window Background
color control. The white area within the displays is controlled by the Waveform
Background control. The black electrode label color is set by the Text control.
The gray color for the VEOG and HEOG channels indicates that these are Skipped
channels. The red color for the FZ label indicates that this was set as a Bad
channel. Labels that have an asterisk have been designated as Artifact rejection
channels. The dark green box around each electrode display is the Waveform Box
. The color of the waveforms is set by the Waveform control. The blue head
shape is the Head Overlay. Zooming in on a channel gives the following display.
The positions of the x and y axes are controlled by the Single X Axis and Single
Y Axis buttons (such as, the Top, Baseline, and Bottom options for the X axis). In
the example, the X-axis is set for Baseline, and the Y-axis is set for Adjust Left.
The Tick Marks controls toggle the tick marks on and off, toggle the tick mark
labels on and off, and set the interval between the tick marks. The vertical blue
line on the x-axis around 0 mVs is the Time Zero mark. This is seen on all of the
channels in the multiple window display.
<%7317A Edit%>
238 Edit 4.5
Note
For printing purposes you may want to have all white backgrounds.
When you are satisfied with the settings, click on the Save As button to add the
information to the workspace file, or to create a new workspace file (you may
want to have more than one workspace file depending on the operations you
routinely perform; the .aws extension is added automatically). Click OK to
continue, or click Cancel to leave the page without applying any of the selections.
<%COPYRIGHT - 2008%>
Main Menu bar 239
The "Window 2" fields are used in ACQUIRE when you are displaying two single
windows (the second one is grayed out in EDIT).
2.5.5 Batch
This option displays the Autorun feature dialog screen for use with BATCH files. Please
refer to the Tcl Batch Commands manual for details.
<%7317A Edit%>
240 Edit 4.5
2.6 Tools
The Tools option accesses several utility routines.
Waveboard - This option is used to open the Waveboard. The Waveboard is used to
display waveforms from the same file, or different files. You can also launch the
Waveboard from the Toolbar icon . Please see the Waveboard appendix at the end
of this manual for a complete description.
Mapgen - In prior versions, Mapgen was a stand-alone routine, accessed from the
Program Launcher. It is now accessed from EDIT. Mapgen is used to create or modify
.map files. Please refer to the Mapgen manual for complete details.
MATLAB - If the MATLAB software package is installed on your computer, and you
have a Toolbox license, SCAN 4.5 allows you to export data to MATLAB and import
them back to EDIT. You should use MATLAB 6; MATLAB 5 will work, but some of the
functionality related to bringing the graphics windows is not supported. Note that
trigger information is not exported along with the EEG data in the CNT files. Please
refer to the Toolbox manual for details.
MS Excel - This option is used to open the MS Excel program (Toolbox license
required), and export data files directly to it. Please refer to the Toolbox manual for
details.
2.7 Window
The Window option accesses the standard options in Windows for arranging multiple
displays on the screen.
Cascade - Selecting Cascade aligns the windows in a stack of overlying "cards", with
the edges exposed to allow access for highlighting, as shown below.
<%COPYRIGHT - 2008%>
Main Menu bar 241
multiple window displays (e.g., more than 3), however, the Tile Horizontally, or Tile
Vertically option will arrange the window displays in an well-organized fashion, as
shown below:
Tile Vertically - Tile Vertically will automatically arrange windows in a vertical manner,
stretching from the top of the screen to the bottom, side by side. With multiple
window displays, however, the Tile Vertically, or Tile Horizontally option will arrange
the window displays in a well-organized fashion, as shown above.
2.8 Help
The Help section contains several options: Manual access options, Internet Help, About
EDIT and Reset Workspace.
Scan Tutorials - This manual contains several tutorials to introduce you to acquisition
and analysis in SCAN.
<%7317A Edit%>
242 Edit 4.5
Edit Manual - Clicking this option will open the EDIT manual in PDF format. If you are
looking for a particular detail, we suggest checking for it in the Table of Contents.
BATCH Manual - This selection will give you immediate access to the Tcl Batch
Commands manual in PDF format.
Batch Tutorial - This option access the Tcl Batch Tutorial manual, which is a good
place to begin to get introduced to Batch commands.
Toolbox Manual - This selection accesses the manual for Toolbox, containing details
for EKG Noise Reduction, Blink Noise Reduction, PCA/ICA, etc.
Source Manual - Clicking this option will open the SOURCE manual in PDF format.
Release Notes - Clicking this option displays the latest release notes document, in
which the new features are summarized.
Internet Help - Clicking the Internet Help option will take you directly to the Scan Help
section on our web site. From there, you may jump to the Support section, or send an
e-mail to the Technical Support department.
About EDIT - The About EDIT option will display the current version of the acquire.exe
file (which contains both the online ACQUIRE and offline EDIT modules), as well as
information about your serial number, etc.
<%COPYRIGHT - 2008%>
Main Menu bar 243
Reset Workspace - This option provides a quick way to restore the workspace file
(.aws extension) to its default settings. Corrupted workspace files have been
encountered occasionally in the SCAN 4.0 software (mainly in ACQUIRE), and this
option provides an easy way to restore the workspace file. If you were not directed to
this option by Technical Support, it is advised that you do not use it.
3 Toolbar Icons
Listed below are all the icons that appear on the Toolbar. Not all functions are available
for each type of file (for example, you can not go to the next rejected sweep when you
are displaying an average data file). When applying these, make sure that the desired
display screen has the "focus".
File Open, Save, and Update Changes - The first two are typical icons for
opening new files or saving displayed files. Each opens a utility screen in which you
can select the desired folder, file, or enter a file name. The Update Changes can be
<%7317A Edit%>
244 Edit 4.5
used in cases where you have modified a data file, and wish to save it using the same
file name. In some circumstances, that could not be done in prior versions of SCAN
because the file was already open (in both point and click and BATCH modes). The
Update Changes button will preserve the modifications with the open data file when
you close it. When you wish to update the open file, click the icon and you will be
asked to verify that you want to overwrite the existing file. (Update changes does not
function with COH files).
History Window - The History field displays a list of the most recent Transform
commands in BATCH form that have been executed. A text version of the History is
written automatically to the History45.txt file, which may be found in the default file
storage folders for XP and Vista.
Right click inside the History box and you will see options to Copy the text (for use
in BATCH files), Clear the window, and change the font size.
Show Next/Previous Display Page - From the Edit g Channel Layout window,
in either ACQUIRE or EDIT, you have the option to assign electrodes to additional
display pages. The icons will be active if you have created additional pages. Use them
to step through the Next or Previous pages.
Typically, you will create the additional display pages in ACQUIRE so that they will
<%COPYRIGHT - 2008%>
Toolbar Icons 245
already be present when you retrieve the files in EDIT. However, it is also possible
to create display pages in EDIT.
The Display Page feature allows you to assign electrode channels to additional
screen display pages. To do this, click the up arrow button at the end of the Page
field. The field will display a 1 and the button will become active.
The screen behind the Channel Layout screen will be empty. Click the Assign
Channels button, and see the Channels in Page 1 display. Double click on the
individual electrode labels (so they turn green), to add them to the first additional
display page, and/or use the and buttons.
Click OK when you are through, and you will see the selected electrode displays.
Size and position them as desired. Through this process you can assign electrodes
to any display page you wish. You may assign the same channel to more than one
display page (for example, you might want the artifact channel to appear on each
display page). Use the down arrow button to get back to the original display page.
Repeat these steps to assign electrodes to one or more display pages. Then click
OK to exit. Resave the data file to make the changes permanent. Now step
through the Display Page icons to see the additional pages.
<%7317A Edit%>
246 Edit 4.5
Grid Display (Display only) - Selecting this option displays the multi-channel
electrode windows in a grid form, ignoring any positioning that has been performed.
Click the icon again to return to the original display layout.
Baseline On/Off (Display only) - The Baseline option centers the waveforms within
the allocated display region for each channel. This is for display purposes, and has no
effect on the stored data.
Invert Polarity (Display only) - Clicking this icon inverts the displayed waveforms.
It does not affect the stored data. You can set EDIT to always read files with
negative up or down (or as it was recorded in the original file) from the General tab
under Options (on the Main Menu bar), then Multiple Window Settings.
Zoom In/Out - These options are active when you enlarge an electrode
display in a multiple window display. To use, click the icon, then drag a rectangle
around the area on the waveform that you want to enlarge. Release the mouse button
to see the "zoomed" area. Click the Zoom Out icon to return to normal size.
Mapping Options - There are several ways in which you can map your data
from EDIT. These include: 2D Mapping, 2D Cartooning, Spectrum Mapping, and 3D
Mapping (see the next section for details). Not every type of mapping is available for
every type of data file. You can tell which types are possible by seeing whether the
icon is grayed out or not.
Launch Waveboard - Clicking this icon launches the Waveboard program that is
used to display waveforms from different files, measure and mark components, and so
forth. Please refer to the Waveboard Appendix for complete details.
Launch Montage Editor - This option launches the Montage Editor, which is used
to create and modify montage files and Linear Derivation files. The Montage Editor is
also accessed from the Edit button that appears on several screens, including the
Linear Derivation display. The Montage Editor is described in complete detail in the
Montage Editor Appendix.
<%COPYRIGHT - 2008%>
Toolbar Icons 247
Print - This option opens the standard Print utility screen (refer to the Print
section under Files for more details).
Display Status Window - From time to time you may "lose" the Status boxes seen
in the data displays. Should this happen, click the button to restore them.
Scan Control Buttons - These buttons are used for the automatic replay, or
scanning, of a continuous or epoched file. The outer buttons will start the scanning
either forward or backward through the file. The middle button will stop the scan. The
speed of the scan is controlled with the Speed Scan Interval, under the View button
on the Main Menu bar (see that section of the manual above for details).
Sweep Status Indicators - As you step through an epoched file, one of these
two buttons will be "pressed" to indicate whether the sweep has been tagged as
Accepted or Rejected. You can change the status of the sweep by clicking the other
button.
<%7317A Edit%>
248 Edit 4.5
The display will show all of the events that are in the continuous file. These include,
Stimulus, Keypad (or Response), Reject, Accept, Keyboard, DC Correction and
Segment events. Where events are detected, there will be a + sign by the type of
event. Clicking it shows a list of the times within the continuous file where these
events occur. For example, if there are stimulus events, these will be listed
individually. If you have Merged the Behavioral Data file (.dat file) from STIM
(described under Merge Data File), the Latency and Accuracy information will be
displayed.
Under Reject and Accept, the times points listed are the beginnings of a new rejected
or accepted region. DC corrections are listed, as are Stop/Start points in the
continuous file (under Segments). In other words, this is a listing of the contents of
the Event File (described above), that allows you to jump to any event that is in the
file. Highlight the event, click OK, and you will be taken to that point in the continuous
file.
The Go To button functions in a slightly different way with epoched files. When you
click the Go To icon, a Go To Sweep display will appear. The total number of sweeps
in the file is displayed, and you may enter the number of the desired sweep in the
field. Then click OK to go directly to that sweep.
<%COPYRIGHT - 2008%>
Toolbar Icons 249
Go To Time - The Go To Time icon is active with CNT files only. After retrieving
the file, click the icon, and you will see the following display.
The total recording length of the file is shown at the top. Enter the Hours, Minutes
and Seconds for the desired time point, and click OK. You will be taken to that point in
the data file.
Note that you may move the sweep control Toolbar as a single unit. This can be
useful when, for example, you are reviewing sweeps manually to select those to
accept or reject. Click the left mouse button on the Toolbar, between the active
icons, and drag it to a new location.
You can also drag it to the side the of the upper Toolbar, creating one long Toolbar.
To return it to its original location, drag it to a position partially on top of and slightly
below the original Toolbar and drop it.
Note
The next three Toolbar icons - Mark a Block, Place a Marker, and "Delta" - are used
with continuous files only. They may only be used one at a time. When one option is
active (icon is "depressed"), the others will not be active until you deselect the
depressed one.
Mark a Block - The Mark Block is used with continuous files to mark a section of
the recording. Once marked, it can be rejected, accepted, saved, and so forth. After
retrieving the CNT file, click the Mark Block icon. Position the mouse at the beginning
of the section of interest in the CNT file, and click the left mouse button once. Then
<%7317A Edit%>
250 Edit 4.5
position the mouse at the end of the section of interest, and click the left mouse
button again. The following list of options will appear. If the block you wish to
designate extends beyond the display you are seeing, use the forward or backward
arrows on the Toolbar to step to the next screen(s). When you click the mouse the
second time, the entire block will be marked.
Clear Marks - If you had made any Marks (including Keyboard Function Key
events), using the Place Mark option from the Toolbar , this option may be
used to remove them. Use the Mark Block function to delineate the section from
which you want the Marks removed, then select Clear Marks.
Accept Block - This option allows you to accept a block that had previously been
rejected.
Reject Block - Clicking this option will cause this block to be excluded during the
epoching process. After clicking the button, you should see the block turn red in
color.
Clear Events - This option will remove any stimulus, response, or keyboard event
markers that appear in the continuous file. Note: When you save or close the
continuous file, you will be asked whether you wish to save the modifications you
have made. If you save the file with the modifications, these deletions will be
permanent. We recommend you always work with a copy of you data file so the
original will remain intact.
Clear Specific Events - This option allows you to remove selected stimulus and/or
response events within a marked block. Use the Mark Block operation to delineate
a block of data, and select the Clear Specific Events option. The following dialog
box will appear.
<%COPYRIGHT - 2008%>
Toolbar Icons 251
Enter the stimulus and/or response type codes to be removed, and click OK. The
type codes will be removed within the designated block.
Save Block - This option is used to save a designated block(s) of continuous data
to a new CNT file. Follow these steps to save blocks from an original CNT file to a
new CNT file.
2. In the original CNT file, use the Mark Block option to select a section of the
CNT file that you want to save to the new file. When you click the mouse
button the second time, to indicate the end of the block, you will see the
option list above. Select Save Block, enter a file name and select a folder, click
OK and the block will be written to the new file. You will also see the Segment
File window.
3. Repeat the Mark Block / Save Block steps to save all the sections you wish.
The blocks will be written to the same new CNT file.
4. When you are finished, click the option to close the new CNT
file. Alternatively, you may close the original CNT file and that will close the
new CNT file as well. To retrieve the new "segment" CNT file, you must first
close it using either method.
5. When you retrieve the new CNT file, there you will see "SS" (Stop/Start)
event markers that indicate the end/beginning of each block you saved.
Clear Annotations - If you inserted any Annotations, you may remove them from
the block you designate.
Cancel Block - Selecting this option exits the option screen without making any
changes. The beginning and ending points of the block are not retained.
<%7317A Edit%>
252 Edit 4.5
Place a Mark - This option is used to place event marks in a CNT file using the
function keys from the keyboard. To use it, first retrieve a CNT file, move to a section
where you would like to add an event mark, and click the Add Mark icon. Move the
mouse to a position in the file where you would like to add the event mark, and press
a function key. You will see a comment added at the bottom of the display.
The marks that are displayed are the default ones shown in the Events Key section in
ACQUIRE. You may reassign these, as desired. To do so, click the right mouse button
inside the single window display to get the Properties option, then select Overall
Parameters, and then the Events tab. This is the same screen that you see in
ACQUIRE. To change the Text associated with a function key, you should first
highlight the line with the function key and it. Then position the mouse cursor
in the Hot Key field, and press the desired function key (e.g., F6). Then type the text
you want in the Text field, and click the button. Then click the Save As
button to save the changes (to the .ast file), and click OK. When you use the Add
Mark option and press that function key, you should see the new text.
You may treat these Marks as regular events, that is, you can create epochs around
them during the epoching process, or Go To the Events. To epoch around the
keyboard events, select Keyboard in the Event Types section of the Epoching
Properties display under the Epoch file transform.
Of course, you can select Stimulus, Response and Keyboard events at the same time,
if you wish. The type codes that are used correspond to the function keys in the
following way. The F1 function key is reserved by Windows for calling Help files, and
the type codes begin with a code of 0. Therefore, F2 has a type code of 0, F3 has a
code of 1, F4 is 2, and so forth up to F12 (type code of 10). These are the codes you
will see in the Go To Events list (under Keyboard), when you create an Event File, and
when you Epoch the continuous file.
Type Annotation - You may add annotations to a CNT file by clicking the Type
<%COPYRIGHT - 2008%>
Toolbar Icons 253
Annotation icon. Position the mouse/vertical line where you want the annotation to be
added, and click the left mouse button. You will then see the Enter Annotation
display.
Type the text that you wish to enter in the top line, and click OK. You will then see an
A' at the bottom of the CNT file where the text was added. Position the mouse over
the A' and you will see the comment in a Tool Tip box. The Playback Status box will
display the time of the event, and the class of the event.
The larger field in the Enter Annotation display, below the line where you enter the
text, will display an inventory of text lines that you have entered in the setup file in
ACQUIRE (under the Events tab). You can add more lines to the inventory by clicking
the right mouse button inside the single window display, and selecting Properties,
then Overall Parameters. Click the Events tab, and enter an annotation, and click the
Add button. Save the setup file. These comments will then be available on the Enter
Annotation screen above.
Measure interpeak amplitude (Delta) - This option is use for measuring the
amplitude change ("Delta"), between two points on the waveforms in EEG and AVG
files (enlarge a window to full size). After clicking the icon, position the mouse at the
initial point for the peak measurement, then click and hold the left mouse button.
When you now move the mouse cursor around the display screen, you will see the
change in amplitude displayed in either a Tooltip that moves with the mouse (EEG and
AVG files), or in the Delta column at the right side of the display (CNT files). This is
the change in time (AVG and EEG) and amplitude (all types) between the initial and
the current mouse positions.
Insert Stimulus Event - This button is active with continuous data files only. It
allows you to enter a user defined type code at selected places in the CNT file. Click
<%7317A Edit%>
254 Edit 4.5
the icon and the displayed window will appear. Enter the desired type code (1-255)
and click OK. Then click the CNT file at whatever point(s) you want to insert the
events. Click the icon again to stop inserting events. You can access the same
window using Ctrl+V, although in this case you must position the mouse cursor first,
then press Ctrl+V. Enter the type code and click OK. A single event will be placed at
the mouse position.
Note
The maps that are used for all types of 2D Mapping must correspond to the data files
you are mapping. The .map files are created in MapGen. The labels must match
exactly the labels you used in the setup file in ACQUIRE. You may rename the
electrodes in EDIT to make the data file match the map file, if needed. You may have
fewer electrodes in the .map file than in the data file, as long as the labels match. If
you are using conventional labels, the internal mapping scheme in EDIT will map all
recognized electrodes automatically, in which case you do not need a .map file.
The Global interpolation method uses all electrodes to calculate values at any
given point; whereas, the Local interpolation uses the 1-4 nearest electrodes in
the calculations. There are advantages and disadvantages to both methods.
The advantage of the Global method is that it provides smoother maps. The
disadvantage is that it may take longer to produce them. The time for the
calculations is proportional to the number of electrodes. Conversely, the
advantage of the Local interpolation method is that the time for calculations is not
dependent on the number of electrode channels (neighboring electrodes can be
found once and then stored). The disadvantage in that the maps may not be as
smooth as with the Global method.
<%COPYRIGHT - 2008%>
Toolbar Icons 255
file is made. However, Global interpolation is now the default used in SCAN 4.1+.
where g(x,y) is the globally interpolated value at map coordinates x and y; w(x,y)
is a column vector (n-dimensional, n = number of channels) of inverse distance
squared weights of the map coordinates with respect to electrode locations; W is
a symmetric matrix (n-by-n) of inter-electrode inverse distance squared weights;
and v is a column vector (n-dimensional) of the actual potential measurements
across all channels. The t superscript denotes the transpose operation. Thus, a
column vector of dimension n (v) multiplied by a square matrix of dimension n-by-n
-1 t
(W ) multiplied by a row vector of dimension n (w(x,y) ) yields a globally
interpolated scalar potential value (g(x,y)).
where xi and yi are coordinates of the ith electrode, and a is a positive constant
added to avoid singularity in the expression when x=xi and y=yi . In this
implementation, a is set to the average inter-electrode distance. Intuitively, one
may draw an analogy between the form of this weighting function and Coulombs
inverse distance squared law for the force between a pair of electrostatic charges.
where i and j index electrodes. The inverse of W is not directly computed in this
implementation; rather, a speed-optimized Gaussian elimination routine is used to
compute W-1v.
After clicking the 2D Mapping icon, you will see an external map display as well as
an additional map in the data screen. Move the mouse cursor in the full size
electrode display. If the colors in the map do not change, or if the topography
does not look correct, that means that the .map file does not match the data file.
Refer to the Load MAP file option below.
Placing 2D Maps - You may place a 2D map directly on the waveform display by
positioning the mouse cursor near the point you wish to map, so that the
additional "head figure" appears with the mouse cursor. Position the hash mark
<%7317A Edit%>
256 Edit 4.5
on the point you wish to map, click and hold the left mouse button down, and
drag the rectangular shape to a clear area on the display. Release the left
mouse button, and a 2D map will be "dropped' at the position.
Note that you may reposition the 2D map by grabbing it with the left mouse
button, and dragging it to a new location. You may edit the Marker by clicking
the right mouse button near the cross-hair marker. You then have the option
to Delete the marker, or access the Edit Properties. If you select Edit
Properties, you will see the following:
<%COPYRIGHT - 2008%>
Toolbar Icons 257
The Label can be a string you enter, or you can use the Latency, Amplitude, or
Latency/ Amplitude as the label. You may also change the latency of the
selected point to a new latency, and you can change the color of the label
(click Color button to access standard palette display).
Right mouse button options when clicking on a placed 2D map - Click the right
mouse button on one of the maps you have just placed, and see the Delete
Right mouse button clicking on the 2D maps, cartoons, and spectrum displays. The
options listed below are shown when you click the right mouse button within the 2D
map or 2D cartoon displays.
<%7317A Edit%>
258 Edit 4.5
2D map 2D cartoon
Scale min/max values... - This option allows you to change the values on the map
scale. Click it to see the Map Scales display. Enter the desired Min and Max values,
and click OK.
Color Scale Type... - This option allows you to select from among several color
schemes that may be used with the 2D Maps (refer to the 2D Mapping description
above for complete details).
Load MAP File... - Use this option to select a different .map file (refer to the 2D
Mapping description above for more details).
Show Electrodes - This option toggles on or off the display of the black dots
corresponding to the electrode locations, as they were placed in the map file when
it was created in MapGen.
Show Electrode Info - When enabled, this option will display the values at each
electrode position on the map when the mouse is positioned over the electrode.
Use Local Interpolation - Selection of this option will use the Local Interpolation
method to generate the maps. Maps are created using either of two interpolation
algorithms - Global interpolation method and Local interpolation method - as
described at the beginning of this section.
Use Map Tracking - When enabled, the 2D maps that appear when you click the
2D Mapping icon will "track" the position of the mouse as you move it along the
waveform. When disabled, the maps will not track the mouse position.
Use 3D Mapping - This option activates the 3D Mapping option. Please refer to the
2D Mapping section above for operating details.
Copy Image to Clipboard - Selecting this option will copy the 2D map image to the
Windows Clipboard (as a bitmap file). From there you may Paste it into other
Windows applications, such as Word.
Print - The option accesses the standard Print screen, and may be used for
printing the 2D map directly.
Save Image As... - This option accesses the standard Save File screen which may
<%COPYRIGHT - 2008%>
Toolbar Icons 259
Load Snapshot - This option allows you to load a BMP file and then superimpose a
2D map on top of the BMP image. (This has been an option in ACQUIRE since 4.2,
where you can use a digital camera or a BMP picture, and show the 2D map
changes in real time). One application would be to superimpose EP data recorded
from a cortical grid on a BMP picture of the grid in place.
A 2D map can be positioned directly over the grid to show the potential
distribution.
To generate a display such as the one above, you will need first to create a 2D
map in the desired shape. Please refer to the MapGen manual for complete
<%7317A Edit%>
260 Edit 4.5
directions. Basically, you need to create a small shape in blue (about the size of a
quarter), import it in MapGen, and then place the electrodes on it. The output is a
.map file that can be selected from within EDIT.
Set up the 2D map display as usual, right click on the map display, and select the
Load Snapshot option to load a BMP file. You will see the map superimposed on the
BMP, with a control box.
Use the control box corners as you would any other window to resize and
reposition the 2D map. Grab/drag the center box to rotate the image. Use the
Toolbar icons to make the map display more or less transparent, to load a different
file, to save the image as a BMP file, and to change the Color of the control box
lines.
Left click inside the map part to display the control lines; click outside the map
display to hide the control lines.
View 2D Map From... - When selected, this option allows you to select views from
the Top, Right or Left sides. In the EDIT program there is an internal default
mapping template containing 77 electrodes with top, left and right views. If your
data file uses a subset of these electrodes, the program will map the data file from
the different perspectives. If your data file uses different labels (or numbers), then
you will need to create the map files you wish to use in MapGen.
Background - When selected, you have the option to use the Default (black) or
Inverted (white) background on the Cartoon display.
Save 2D Cartoon Image... - This option opens a Save As... utility in which you
may enter a file name, designate a path, and Save the cartoon image as a
Windows Metafile (the .wmf extension is added automatically).
Right mouse button Mapping options within the electrode display - Click the right
mouse button on the electrode display to access a more complete list of options.
<%COPYRIGHT - 2008%>
Toolbar Icons 261
The list will vary depending on whether you clicked in a minimized or maximized
electrode display. Both are shown below (minimized, then maximized).
Most of these are explained below in the section called Right mouse button clicking
inside the electrode displays, but the following are relevant to 2D mapping.
Mapping - This option displays a secondary menu that has the various mapping
options.
View 2D/3D Map (EEG, AVG) - This option will be active when you enlarge
an electrode display to mid- or full-size. You may enable or disable 2D
Mapping from this line. It may be accessed more easily from the Toolbar
icon . Refer to the 2D Mapping section above for mapping details.
Note
When you are placing 2D maps and Adding Markers at the same time, it will
be necessary for you to disable temporarily the 2D Mapping (otherwise you
will drop a map when you want to drag the Marker). The 2D Mapping
toggle is useful in this instance so you don't lose the maps you have
placed.
Use Map Tracking - If this option is enabled, then the 2D map will change
as you move the mouse in the waveform display. Disabling it will let you
<%7317A Edit%>
262 Edit 4.5
Delete All Maps - Click the Delete All Maps line to delete all maps. You may
also disable the 2D Mapping feature by clicking View 2D Maps (so the check
mark does not appear).
Enable Map at Right Corner - This option is used to display or remove the
2D map in the upper right hand corner of the waveform display.
Printing/Saving the map and waveform display - From the same right button
menu you have the option to Copy Image to Clipboard, Print the display, or
Save Image As... a Windows Metafile.
Selecting the Copy Image to Clipboard feature will copy the display to the
Windows Clipboard as a bitmap (BMP) file. From there it is easily inserted into
other Windows applications, such as Word, using the Paste option. Selecting
Print opens the standard Print display, described above under Files. Selecting
the Save Image As... option opens a Save As utility to save the display as a
Windows Metafile (the .wmf extension is added automatically).
Mapping on a 3D head shape - The EDIT program can map your data on a
"stock" 3D head. If you have difficulty running the 3D mapping option, try
changing the Colors field on your Windows Display Properties g Settings
display to High Color (16 bit) or True Color (32 bit). The 256 colors setting is
insufficient.
<%COPYRIGHT - 2008%>
Toolbar Icons 263
To map your data on a 3D head shape, you should first retrieve an AVG file,
enlarge an electrode display to full size (such as CPZ), and then click the 2D
Mapping icon . (In this example, we are using the P300rare.avg file created
from the P300.eeg demo file). Click the right mouse button on either of the 2D
maps that appear when you select 2D Mapping. Select
from the list of options. You will see a 3D head appear. Position the mouse at
the peak of the P300 component waveform, at about 386ms. (Move the cursor
straight up away from the waveform to allow you to retain the time point while
continuing to move the mouse). The selected time point will be mapped on the
3D head.
You may now position, resize, and spin the display, as desired. For example,
position the mouse within the 3D display, hold the left mouse button down, and
move the mouse on a level, horizontal line, back and forth. You will see the
head rotate with it. Similarly, you may move the mouse vertically (while holding
the left button down), and tilt the head toward or away from you. Hold the left
mouse button down and move the cursor all around, and the head will follow in
all directions.
Now, position the cursor in the middle of the display, hold the right mouse
button down, and move the cursor up and down. Moving it up makes the head
shape smaller; moving it down makes it larger. To spin the head, hold the left
mouse button down, and move the cursor rapidly across the display, releasing
the button after it travels a short distance. The head will begin spinning on its
own. If it spins too fast, move the mouse at the same time to slow it down
(smaller heads also spin faster than larger ones). To stop it, grab the head with
the left mouse button, and move it slightly. This will stop the rotation. While
the head is spinning, you may use the right mouse button to change its size.
If you right click again on that head shape, you will see that the list of options
<%7317A Edit%>
264 Edit 4.5
has changed slightly. You now have the option to . This will let
you select the .tri file that corresponds to that subject (assuming you have
digitized the electrode positions and head shape in 3DSpaceDx or 3DSpace). 3D
mapping uses the same .map file, or internal mapping scheme, that is used in
2D mapping. The 2D map is stretched around the 3D head. If all of you
electrodes are not mapped, you will likely need to create a .map file (in
MapGen) where the labels match those in your data file.
You can change the scaling of the map on the 3D head by using the up and
down arrows on the Toolbar.
Note that you can use 3D heads to map various points on the waveforms,
changing the position from map to map, if desired.
<%COPYRIGHT - 2008%>
Toolbar Icons 265
Start/Stop (ms) - The Start and Stop fields are used to specify the beginning
and ending time points for the section to be cartooned.
Interval - Interval is the averaging interval. Maps will be created every X ms,
based upon the average of the data points within that interval. The interval
value must be a multiple of the "dwell" time (the total number of ms divided by
the number of points). For example, an epoch from 0 to 1000ms, with 500
points, will have a dwell time of 2ms. The Interval is therefore a multiple of 2. If
you enter a value that is not a multiple of the dwell time, the program will
select the nearest acceptable value automatically.
Note
If you encounter problems when you change the interval (such as, the 2D
Update button appears not to work), try entering the desired Start and Stop
times, then change the N Columns and N Rows fields until you get the desired
interval (they are interrelated).
N columns (1-10) and N rows (1-10) - These two fields allow you to set the
maximum number of maps per row and per column to be displayed in the 2D
Cartoon display. Up to 100 maps may therefore be presented. The values that
you enter here will supercede the Stop point entered above. For example, if
you select 5 columns and 10 rows, that will generate 50 maps. If the Interval is
2ms, then 50 maps times 2ms equals a total span of 100ms. The program will
begin mapping at the Start point, and then map the 50 maps, covering the
next 100ms, regardless of the Stop time.
Y Min (mV) and Y Max (mV) - These fields set the mapping scale for the
cartoon. A smaller range will result in a more colorful map.
Average Over Interval - If you select this option, all of the data points in the
interval will be averaged to create a single map. If you do not select it, the
maps will be based on only the single time points indicated.
<%7317A Edit%>
266 Edit 4.5
Preserve map's proportion - When enabled (check mark appears), all the maps
will stay the same size and proportion when you resize the 2D Cartoon window.
That may result is the need for scrollbars to see all of the maps. When
disabled, the maps will change in proportion in order to display all the maps
created, regardless of the size of the 2D Cartoon display.
2D Cartoon - When you have made all the changes desired, click the Update
2D button to apply the changes.
When the above settings are used with the vep.avg file, the following cartoon will
appear (90-110ms section).
<%COPYRIGHT - 2008%>
Toolbar Icons 267
View 2D Map From... - When selected, this option allows you to select
views from the Top, Right or Left sides. In the EDIT program there is an
internal default mapping template containing 77 electrodes with top, left
and right views. If your data file uses a subset of these electrodes, the
program will map the data file from the different perspectives. If your data
file uses different labels (or numbers), then you will need to create the map
files you wish to use in MapGen.
Background - When selected, you have the option to use the Default
(black) or Inverted (white) background on the Cartoon display.
Color Scale Type... This option allows you to select from among several
color schemes that may be used with the 2D Maps (refer to the 2D Mapping
<%7317A Edit%>
268 Edit 4.5
Load MAP File... Use this option to select a different .map file (refer to the
2D Mapping description above for more details).
Copy Image to Clipboard - This option will copy the cartoon maps to the
Windows Clipboard (as a BMP file). From there you may Paste it into other
Windows applications, such as Word.
Print - The Print option accesses the standard Print screen, as described
above under Files.
Save 2D Cartoon Image... - This option opens a Save As... utility in which
you may enter a file name, designate a path, and Save the cartoon image
as a Windows Metafile (the .wmf extension is added automatically).
For an example, retrieve the closed.cnt file, and then click the Spectrum Mapping
icon. The maps will appear using the internal default mapping template containing
77 electrodes from the 10-20 system, and extended placements (see the 2D
Mapping section for more details). It will map whatever data channels there are
that match the internal default mapping template. To use a different map file, right
click on the maps, and select Load Map File to select a file that is compatible with
your data file (the .map file, created in MapGen, must have the same electrode
labels as seen in the Channel Assignment list. There may be fewer electrodes in
the .map file, but not more). The display will look similar to the following one. Note
that as you step through the CNT file, the maps will change accordingly. If you
accelerate or decelerate the continuous display, the maps will change according to
what appears in the single window display.
This example uses a CNT file, but you can also compute the Spectrum Maps for EEG
and AVG (time and frequency domain) files.
Right mouse button options with spectrum mapping - If you click on the spectrum
<%COPYRIGHT - 2008%>
Toolbar Icons 269
maps with the right mouse button, you will see the following list.
With the exception of Band Parameters, these options are discussed above.
Band parameters... - The Band Parameters screen lets you select frequency
ranges for the maps, their labels, scale settings, etc. Selecting the options will
display the following screen.
For each frequency band, you see the name, the Start and Stop limits (in Hz),
the Min and Max display limits (in mVs), and a column called Normalize.
<%7317A Edit%>
270 Edit 4.5
Normalize, when toggled Yes, will automatically scale each map according to
the minimum and maximum voltages. When toggled No, the maps will be scaled
according to the Min and Max values you enter in the Spectrum Map
Parameters display above. You may set all the bands as Normalized, or not, by
clicking the Normalize All field. You may modify any of the settings for an
individual frequency band by double clicking the left mouse button on the band
name, or by highlighting the band and clicking the Edit button. You will then
see the Spectrum Band Properties screen. Edit the properties as desired, then
click OK. Notice the Add and Delete buttons on the Parameters screen. The
Add button will display the properties screen above, in which you may enter
the name and settings for each new spectral map. To Delete an existing band,
highlight it with the left mouse button and click the Delete button.
4 Context Menus
Depending on the type of data file being displayed, there are different options that are
accessible when you click the right mouse button. Clicking the right mouse button inside
an electrode display gives a different list of options than clicking it between the electrode
displays. There are also right mouse button options when you click on the 2D map and 2D
cartoon displays. Many of these have been described above, and all are detailed below for
convenience.
<%COPYRIGHT - 2008%>
Context Menus 271
Save As... - Selecting this option allows you to save the file as a new data file. A
Output File display will appear in which you may enter the new file name and path
designation.
Update Changes - Selecting this option allows you to apply changes to whichever
data file has the "focus". In prior versions, certain operations could not be applied
because the file was open, and you had to save the file with a different file name.
Beginning with SCAN 4.3, you can update the changes in the open file. The
changes will be saved when up close the file (if you choose to save them). When
you select the Update Changes option, you will see a confirmation message. The
option does not function with COH files.
Copy Image to Clipboard - The multiple window display will be copied to the
Windows clipboard, with file information included. This can then be Pasted into
other Windows applications.
Print... - Selecting the Print option opens a standard Print display screen. Set the
options as desired, and click OK.
Save Display Image... - This option allows you to save the image as a Windows
<%7317A Edit%>
272 Edit 4.5
metafile. A Save As screen will allow you to enter a file name and path (the .wmf
extension will be added automatically).
Properties - The Properties option will take you to the same screens used in
ACQUIRE to create the setup file and acquire the displayed data. Some of the
fields are shown for informational purposes, and others may be changes to modify
the displayed data file.
Channel Layout - Selecting this option displays the Channel Layout screen used
in ACQUIRE. You can use it here in much the same way to reposition and resize
the electrode displays, create additional display screens, import and export
electrode position information, and so forth.
Subject... - This displays the Subject screen with any information that you
entered in ACQUIRE as part of the data acquisition. Refer to the ACQUIRE
manual for more details about the Subject screen.
Transforms (CNT, EEG, AVG, COH) - This is an alternative route to the Transforms
menu list that is accessed from the Main Menu bar. The transforms are described
in more detail above.
Send Waveforms to Waveboard - Selecting this option will send all of the
waveforms to the Waveboard. Refer to the Waveboard manual in the Appendix
section below for complete details of its operation.
MS Excel - This option is used to export CNT, EEG and AVG files to Excel. It
assumes you have Excel installed and that you have a license for the Toolbox. For
details, see the description above under Tools (on the Main Menu bar).
Clear Markers - This option will Clear all Markers that you placed with the Add
Marker and Peak Detection options.
Marker Report - If you have Added several Markers to an EEG, AVG or COH file,
this option will create a text file list of the Markers.
With an EEG file, select the Marker Report option, and the EEG file will appear to be
having a seizure as the sweeps are rapidly searched for Markers. At the end of the
search, an Output File utility display will appear in which you may enter a file name
and path (the .dat extension will be added automatically). The resulting file will
look something like the following (from Notepad):
<%COPYRIGHT - 2008%>
Context Menus 273
Similarly, multiple Markers made in an AVG file will produce a Marker Report similar
to the following (frequency domain files will have appropriate labels):
Show Markers - This toggles On and Off the display of the markers you have
placed with the Add Marker option described below. When toggled Off (no check
mark), the markers will not be displayed. Toggle it On to display them again. This is
in contrast to the Clear Markers option, which will permanently remove the
markers.
Load 3D Electrode positions (CNT, AVG, EEG, COH) - This option is used to add
measured 3D electrode position data to the data file. The information is contained
in the .3dd file created in 3DSpaceDx, and is used in the SOURCE program. Clicking
the option displays the Open File utility window, from which you may select the
.3dd file. The file must be from the subject whose EEG data you are viewing in
EDIT (otherwise the electrode positions will be only approximations).
Butterfly Plot (AVG, EEG) - Selecting this option will superimpose all channels
together, plus calculate the Mean Global Field Power for the displayed epoch. The
data will be redisplayed as shown below.
<%7317A Edit%>
274 Edit 4.5
Note
MGFP should not be used with the .avg file results obtained from Event Related
Band Power - the results will not be valid.
Deselect the option (or just close the window) to return to the original display.
Set Display Min/Max (EEG, AVG, COH) - This option allows you to set the minimum
and maximum display limits (without going through Properties g Overall
Parameters g Epochs to set them). Selecting the option displays the following
screen, in which the minimum and maximum values may be entered.
Add Display Filter / Remove Display Filter - The Add Display Filter option accesses
the Filter dialog screen, from which you may apply a digital or analog filter to the
displayed data only. The Remove Display Filter option returns the displayed data to
their prior state.
Add Linear Derivation / Remove Linear Derivation - The Add Linear Derivation
option lets you select and apply an LDR file to the displayed data. Click the
<%COPYRIGHT - 2008%>
Context Menus 275
Unhide Electrodes - If there are any hidden channels in the data file, these can all
be unhidden by selecting this option.
Record Info - Clicking this option displays miscellaneous information about the data
file.
Load Comparison File (AVG) - Selecting this option accesses an Open Files utility
display through which you may select files to be overlain upon your original file.
The comparison files must have the same number of channels, electrode labels,
start and stop times for the epochs, and number of points. You can overlay up to
at least 20 additional files. These can be selected at the same time by using
Ctrl+Mouse click on each of the desired files in the Select Data Files display.
Comparison files will be given different colors so you can differentiate them from
each other and the original file. When you zoom into one of the electrodes, a
color-coded legend will appear at the top of the display. Shown below are 5 files
superimposed on one original one.
<%7317A Edit%>
276 Edit 4.5
Right mouse button options - If you click on one of the electrode labels at the
top with the right mouse button, you will see the displayed list of options.
Change color... - This opens the standard color palette. Select a different
color, or create you own with the Define Custom Colors>> button, and click
OK to apply the new color.
Delete file - This option allows you to delete a single file from the display.
You will be prompted for verification before the file is removed.
Delete All Comparison Files (AVG) - Select this option to delete all of the
comparison files that have been overlain.
Comparison File Options. This option becomes accessible after you load a
comparison file. Clicking it displays the following window.
<%COPYRIGHT - 2008%>
Context Menus 277
The Comparison list will show all the comparison files you have selected. Highlight
one, then select the Color and Line style for that file. Then highlight the next file
and make any modifications, and so on. The new styles will be seen when you
enlarge one of the electrode displays.
View SNR Values - The Signal-to-Noise Ratio (SNR) values for each channel may be
viewed with this option, as well as the overall noise level and best SNR value.
View N Values - When viewing an averaged data file, the N Values will display the
number of cases that were used to construct the average.
View Impedance Values - The last impedance values that are present when you
are running the impedance routine are saved with the data file. Right click between
electrode displays and select the View Impedance Values option to see the saved
values. You then have the option to save the values to an ASCII file, if desired.
<%7317A Edit%>
278 Edit 4.5
The first list of options above appears when click inside a minimized electrode
display. All of these are also present when you click inside a maximized display,
except for the Hide Electrode and Maximize Electrode options. Additional options
are possible after the display is maximized (partially, or completely). All are
described below.
Channel Properties (CNT, EEG, AVG, COH) - Selecting the Channel Properties
option gives access to the Electrodes properties screen. This has the same fields
of information that are contained in the Channel Layout and Channel Attributes
screens seen in ACQUIRE (under Edit). With CNT files, the Electrode Properties
display is accessed by clicking on the desired electrode name (from the column of
labels on the left side of the display). You may modify the settings as desired.
<%COPYRIGHT - 2008%>
Context Menus 279
Compare Electrode(s) (EEG, AVG, COH) - The Compare option allows you to
superimpose electrodes from the same data file. For example, if you want to
compare C3 and C4, click the right mouse button inside the C3 display (enlarging it
first is typical), and select the Compare Electrode(s) option. The following display
will appear (shown in two parts).
The Current Electrode is displayed in the top left field. The additional electrodes
are listed in the Electrodes column, and shown in the montage on the right side of
the display. Highlight the C4 electrode from the list and click the button, or
simply click it from the montage display.
<%7317A Edit%>
280 Edit 4.5
C4 will appear in the Comparison list. Note that you may change the colors of the
comparison electrode by clicking the Colors... button. This displays the standard
Colors selection display.
The line style may be changed by clicking the Line field pull-down menu.
When you have entered the electrodes to be compared, click OK, and you will see
the selected electrodes super-imposed on the original one.
<%COPYRIGHT - 2008%>
Context Menus 281
You can remove selected electrodes from the Comparison list by highlighting them
and clicking the button.
Butterfly Plot (AVG, EEG) - This is the same option as described above under Right
mouse button clicking between the electrode displays.
Show Signal Info - If enabled, you will see a Tooltip box with latency (or Hz) and
amplitude information for each data point as you move the mouse inside the
waveform display. Disable the option to suppress the Tooltip.
Hide / Unhide Electrodes - The Hide Electrode option will "hide" the selected
electrode display (it does not delete it from the data file). The Unhide Electrodes
option will redisplay all previously hidden electrodes.
Mapping - This option displays a secondary menu that has the various mapping
<%7317A Edit%>
282 Edit 4.5
options.
View 2D/3D Map (EEG, AVG) - This option will be active when you enlarge an
electrode display to mid- or full-size. You may enable or disable 2D Mapping
from this line. It may be accessed more easily from the Toolbar icon . Refer
to the 2D Mapping section above for mapping details.
Note
When you are placing 2D maps and Adding Markers at the same time, it will be
necessary for you to disable temporarily the 2D Mapping (otherwise you will
drop a map when you want to drag the Marker). The 2D Mapping toggle is
useful in this instance so you don't lose the maps you have placed.
Use Map Tracking - If this option is enabled, then the 2D map will change as
you move the mouse in the waveform display. Disabling it will let you select a
single point (click a point and it will be mapped).
Delete All Maps - Click the Delete All Maps line to delete all maps. You may also
disable the 2D Mapping feature by clicking View 2D Maps (so the check mark
does not appear).
Enable Map at Right Corner - This option is used to display or remove the 2D
map in the upper right hand corner of the waveform display.
<%COPYRIGHT - 2008%>
Context Menus 283
Copy Image to Clipboard - This option copies the contents of the display to the
Windows Clipboard (as a bitmap file). From there, you may Paste it into other
Windows applications, such as Word.
Print (EEG, AVG, COH) - Print accesses the standard print screen for printing the
displayed images (see also Print under Files above).
Save Image As ... (EEG, AVG, COH) - Use this option to save the electrode window
display as a Windows metafile. Metafiles can be inserted into a variety of Windows
application software. For example, save an electrode display as a metafile (.wmf
extension added automatically), and add it to a Word document by selecting
Insert, then Picture, then From File, and selecting the electrode file.
Send to Waveboard (EEG, AVG, COH) - This option allows you to send selected
waveforms to the Waveboard. The waveforms will always be sent to Waveboard1.
Use Tracking Mode for Source - This option will be unavailable unless you are using
the SOURCE program (see the SOURCE manual for details).
Use Interval Mode for Source - This option will be unavailable unless you are using
the SOURCE program (see the SOURCE manual for details).
Add Marker (EEG, AVG) - This option allows you to mark a point on the waveform
and add text. For frequency domain files, you must have the "line" option, rather
than a histogram. Enlarge an electrode display to full size, then click the right
mouse button inside the display, at the point where you want the marker to
appear. Click the option. You will see the Marker Properties display
appear. Enter the desired text in the Label field (or use the amplitude and/or
latency options), enter the latency where the Marker should be placed (if you
want a different one), and change the color of the text, if desired. Then click OK.
<%7317A Edit%>
284 Edit 4.5
The Mark will appear in the display. Using the left mouse button, grab the cross
hair that appears at the beginning of the Mark, and drag it to the desired location.
To change the label, click the right mouse button on the cross hair, and you will
see a small option list. Delete will delete the marker. Click Edit Properties, and you
will see the same Marker display shown above. You may then modify the text and
color, as desired. If desired, you can click between electrode displays and select
the Marker Report option. This will create a .dat file (ASCII) that has the marker
information.
Clear Markers (EEG, AVG, COH) - Selecting this option will remove any markers you
have placed.
<%COPYRIGHT - 2008%>
Context Menus 285
Channel Order - This option allows you to reorder the sequence of channels on the
CNT file display. (The same option may be selected from the
button on the Channel Layout display). Clicking it displays the following screen.
The current order of channels is in the left side column. To remove a channel from
the list, just highlight it and click the button. Note: this removes the
channel from the list, not from the display. There will always be the same number
<%7317A Edit%>
286 Edit 4.5
of channels displayed; this option will only alter the order. To reorder the display
completely, click the button. Then click the channel labels in the
montage display in the order that you want them to appear. As you rebuild the list,
you might want to separate the channels with spaces. Click to
leave a space between the channels as you select them. If you omit some
channels, they will be added at the bottom of the single window display. Click OK
when you are through to see the new ordering. To save the CNT file with the new
order, click Save As under File. You will then have the option of either overwriting
the existing file, or creating a new one.
Add Derivation - Add Derivation allows you to apply an LDR transform to the CNT
file. (You will need to create a matching LDR file first using the Montage Editor;
please see that Appendix at the end of this manual). The applied LDR is for display
purposes only. Use the Linear Derivation transform, on the list of Transforms, to
apply and save the changes, if desired. Note: if you use Add Derivation, the
additional display pages will be disabled.
Common Ref Derivation - Selecting this option will compute as display the data
with common average reference.
Remove Derivation - Click this option to remove the applied LDR transform.
Add Display Filter - Clicking this option displays the Filter screen. Enter the
Remove Display Filter - Clicking this option removes the effects of the Add Display
Filter option.
Set seconds per page - This option in used in place of the Accelerate and
Decelerate icons on the Toolbar to change the number of seconds displayed per
page. Click it to see the "Seconds per page" dialog box, in which you may enter
the number of seconds you want to be displayed (up to 180 seconds).
<%COPYRIGHT - 2008%>
Context Menus 287
Record Info - Clicking this option displays information about the CNT data file.
The section you created is a block that can be used in several ways.
<%7317A Edit%>
288 Edit 4.5
Add Annotation. Select this option and the following screen will appear. From the
text line, you may enter a text string.
The comment will be added to the CNT file at the bottom, in the middle of the
block, and appear with a letter. Move the mouse over the letter to see the
annotation. The annotation can be removed using the Remove Annotation(s)
option.
Accept Block / Reject Block. You can use this method to mark or unmark blocks of
data in the CNT file. The other method is to use the Mark Block icon from the
Toolbar. Marked blocks will be omitted during epoching (unless you deselect the
Reject Epochs that Overlap rejected Blocks option in the Epoching Properties dialog
screen).
Integrated Map. Delineate a block of data, select this option, and you will see that
block of data mapped with a 2D map. All of the points for each channels are
summed, and it is the integrated sums that are mapped. Over a large block of EEG,
therefore, the map will tend to be all zeros, as the summed values tend toward
zero. Map a small block, containing, for example, a spike or a blink, and the map
will reflect the distribution.
Map as 2D Cartoon. Delineate a block of data, select this option, and you will see
that block of data mapped with a 2D cartoon (see 2D cartooning for details).
The remaining options - Copy, Print, Save, etc. - have been described elsewhere,
and are largely self-explanatory.
<%COPYRIGHT - 2008%>
Context Menus 289
If you move the mouse over the electrodes labels, you will see a Tool Tip displaying
the electrode label. This is useful in files with many channels where the electrodes
labels may be hard to read.
These have the same functions as described above. Integrated Map will create a 2D
map based on all of the data points in the selected range. Map as 2D Cartoon will display
the maps in the selected range in a 2D Cartoon.
<%7317A Edit%>
290 Edit 4.5
<%COPYRIGHT - 2008%>
Summary of Keystroke Commands 291
<%7317A Edit%>
292 Edit 4.5
6 References
Elberling, C. and Don, M. Quality estimation of averaged auditory brainstem responses, Scand. Audiol.
1984, 13, 187-197.
Halliday, A. M., McDonald, W. I., and Mushin, J. Visual evoked responses in the diagnosis of multiple
sclerosis. Br. Med. J., 1973, 4, 661-664.
Lehmann, D. and Skrandies, W., Segmentation of EEG potential fields, Electroencephalography and
Clinical Neurophysiology, 1986, 38, 27-32.
Otnes, R.K. and Enochson, L. Applied Time Series Analysis, New York: John Wiley, 1978, pp. 212-215.
Pflieger ME and Nakada T (1999): The spatial resolving power of high-density EEG: An assessment of
limits. In: T. Nakada (ed.), Human Higher Function I: Advanced Methodologies, to appear.
Raz, J., Turetsky, B.I., and Fein, G.: Confidence intervals for the signal-to-noise ratio when a signal
embedded in noise is observed over repeated trials. IEEE Trans. - BME, 1988, 35, 646-649.
Semlitsch, H. V., Anderer, P., Schuster, P., and Presslich, O., A solution for reliable and valid reduction
of ocular artifacts applied to the P300 ERP, Psychophysiology, 1986, 23, 695-703).
Sutton, S. Barren, M., Zubin, and J., John, E.R. Evoked-potential correlates of stimulus uncertainty.
Science, 1965, 150, 1187-1188.
Tesche CD, Uusitalo MA, Ilmoniemi RJ, Huotilainen M, Kajola M, Salonen O (1995): Signal-space
projections of MEG data characterize both distributed and well-localized neuronal sources.
Electroencephalogr Clin Neurophysiol, 95: 189-200.
Thatcher RW, Toro C, Pflieger ME, Hallett M. Human neural network dynamics using multimodal
registration of EEG, PET, and MRI. In RW Thatcher et al., editors. Functional Neuroimaging: Technical
Foundations. San Diego: Academic Press, 1994: 269-278.
Turetsky, B.I., Raz, J., and Fein, G. Noise and signal power and their effects on evoked potential
estimation. EEG and clin. Neurophys. 1988, 71, 310-318.
Turetsky BI, Raz J, and Fein G. 1989. Estimation of trial-to-trial variation in evoked potential signals by
smoothing across trials. Psychophysiology, 26, 700-712.
<%COPYRIGHT - 2008%>
References 293
7 Appendix A - Waveboard
The Waveboard is a handy utility program that may be used to display, annotate, and
measure data from individual channels. It may be used as a stand-alone program, or it
may be called from the ACQUIRE or EDIT programs. Its main features include:
The display of Multiple Window data from channels selected from the same
or different data files.
The ability to mark time points for each channel (latency and amplitude).
The ability to place one or two cursors to show latency and amplitude
measurements and differences between them.
For this demonstration we will use the Vep.avg demonstration file that is in your \Scan
Data\Demo Files\Veps folder. Launch the EDIT program from the Program
Launcher, and click File g Open data file, or click the Open Data File icon . Set the
Files of type pull-down menu to AVG files, then go to the \Scan Data\Demo Files\Veps
folder and double-click on the Vep.avg file. The data file will appear similar to the
following.
<%7317A Edit%>
294 Edit 4.5
Now click the Launch Waveboard icon from the Toolbar , and minimize the Waveboard
display.
Step 2 - Copying data to the Waveboard. Let's copy O1, OZ and O2 to the Waveboard.
Position the mouse cursor on the O1 display, enlarge it to mid- or full-size, and click the
right mouse button. Select the option.
Repeat the same steps for the OZ and O2 electrodes. Now Maximize the Waveboard
display, and maximize the waveform display inside the Waveboard display, if desired. The
result will look similar to the following (your background and waveform colors will likely
appear different, depending on the settings you selected in the Multiple Window Settings,
under Options). Use the Up and Down arrows to scale the data on the display, as
desired, and invert the polarity , if desired.
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 295
Step 3 - Changing colors. Let's change the colors to make it easier to tell the waveforms
apart. Position the mouse over the O1 waveform label, and click the right mouse button.
You will see the displayed list of options.
As the display suggests, you can change the thickness of the waveform lines, or you can
change the style of the line from solid to dots, dashes, etc. For now, just click the Color
<%7317A Edit%>
296 Edit 4.5
button, and you will see the standard Windows Color Palette display.
Select a color for the O1 waveform (red). If you don't like any of the displayed color
options, click the Define Custom Colors>> bar, and select a customized color. Then
click OK, and OK again. You should then see the new color for O1. Repeat the sequence
to change OZ and O2 to different colors (green and blue).
Step 4 - Adding Text. Now, let's add some text. Click the Add Text icon , and click the
left mouse button in the approximate area where you want to add the text. The Text
display will appear.
Click the mouse in the text field, and enter something like "VEP data". You can change the
font style, size, and other characteristics by clicking the Font button. Then click OK. The
text will appear. You may reposition it by clicking and holding the left mouse button over
the text to "grab" it, and drag the text to a desired location. Release the mouse to place
it there. You can also click the right mouse button over the text. You will see a small
option list which you can use to Delete the text or Edit the text. If you select Edit Text,
you will get the same Text window as shown above.
Step 5 - Measuring Points. Now let's measure amplitude and latency of the peak of the
P100 component at OZ. Click the Add Marker icon , and then position the cross-hair
at the P100 peak at OZ. Hold the left mouse button down, and drag the amplitude and
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 297
latency values to a clear place on the display, then release the left mouse button to
place it there. If you wish to change the placement, position the mouse over the
measurements, and click and hold the left mouse button. You can then grab and drag the
measurement information to a desired location. The indicator line will stay attached. Your
display should now appear similar to the following.
Step 6 - Adding Scale Tools. Now, let's add the Latency and Amplitude Scale Tools for
precise measurement of latency and amplitude. Click the Latency Bar icon from the
Waveboard Toolbar. You will see the x-axis scale tool. Click on it one time with the left
mouse button, and a rectangle will appear on one end . By grabbing the
rectangle with the left mouse button, you can extend or reduce the length of the scale
tool. Alternatively, click on the scale tool with the right mouse button, and you will see a
small option list. Selecting Delete will delete the scale tool. Selecting Set Latency will
display the Latency window, through which you may select the length (in ms) of the tool.
The Dynamic Range is the length of the entire epoch, and is the maximum range allowed
for the scale tool.
<%7317A Edit%>
298 Edit 4.5
Add the Amplitude Scale Tool (or y-axis tool) by clicking on its icon . The options for
it are directly analogous to the Latency scale. You can reposition the scale tools by
grabbing them with the left mouse button and dragging them to a desired location. Your
display will now appear similar to the following.
Step 7 - Moving the Waveforms. Note that it is possible to move each waveform up and
down on the screen. Grab a channel label (O2) with the left mouse button, and drag it
upward. If you want to overlay the waveforms on top of each other (so they have the
same position for zero Volts on the screen), you can click and drag them into position, or
do it more simply by selecting Options g Overlay All from the Main Menu bar.
To restore the channels to their original positions, select Options g Raster All. If you
were displaying channels from different data files that had the same labels (such as, OZ
from two or more data files), you can select the Raster w/ Label Matching option. This
will overlay waveforms that have the same labels (see step 10 below).
Step 8 - Using the Cursors. Next, let's do some relative latency difference measurements
and some peak-to-trough measurements. Click the Enable Cursor 1 icon from the
Toolbar. You will see a vertical dashed line (Cursor 1) appear with the letter "A" at the top
of it. You will also see several columns appear on the right side of the screen. Grab the
cursor line with the left mouse button, and drag it back and forth. You will see the
latency (in ms) of its current position displayed at the top of the first column, and the
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 299
corresponding amplitude values (in mVs) for each of the waveform points. Position the
cursor at the peak of the N70 component measured from OZ (about 66ms).
Now enable the second cursor by clicking its icon from the Toolbar. It will have the
letter "B" at the top of it. Position it so that it is at the peak of the P100 component.
You will see two more columns of numbers on the right side of the display. In Column B,
there is the latency of the second cursor as well as the amplitudes for that time point for
each of the waveforms. The third column - Delta - displays the change in latency at the
top, and the change in amplitude below for each channel, in relation to the position of the
first cursor. This is a quick way to measure latency differences between two points, and
the peak-to-trough amplitude differences.
Step 9 - Saving, Printing, etc. You can save the file by clicking File g Save As, or by
clicking the Save icon from the Toolbar. Designate a path and file name, then click OK
(the .wvb extension will be added automatically). You may then retrieve the file at a later
time. You may also Print the file directly using the standard Windows printing
conventions, or you may Copy the display to the Windows Clipboard.
Step 10 - Combining channels from different files. Lastly, one of the more useful aspects
of the Waveboard is its capability for combining waveforms from different data files. Note:
The files must have the same epoch durations and number of points to combine them on
the same Waveboard display. In the \Scan Data\Demo Files\Seps directory there are two
files called sepblk.avg and sepnoblk.avg. These are somatosensory EP recordings obtained
during right median nerve stimulation. The sepnoblk.avg file did not use the Deblocking
feature of the SynAmps, and the sepblk.avg file was acquired with Deblocking. Deblocking
blocks acquisition for brief spans of time, and can be used to eliminate SEP stimulus
artifact. With the Waveboard, it is very easy to show the effects of deblocking between
the two recordings.
Retrieve the sepnoblk.avg file in EDIT. The stimulus artifact is very apparent in electrodes
F3, FZ and F4. Copy these to the Waveboard, as described above. It is a good idea at
this point to change the color of these channels so it will be easy to tell them apart from
the sepblk.avg data channels. Change the colors as described above.
Now retrieve the sepblk.avg data file (it is not necessary to close the first file). Send the
<%7317A Edit%>
300 Edit 4.5
same three channels to the Waveboard. Maximize the Waveboard display, and you will see
the data from all 6 channels. Scale the display, as desired. Click Options g Raster w/
Label Matching. This will overlay the channels with the same channel labels, and
provides a convenient way to display data from two (or more) conditions on the same
graph. (It is also a nice demonstration of the Deblocking feature of the SynAmps).
This concludes the Waveboard tutorial. The remainder of the manual describes all of the
features of the Waveboard.
Starting the Waveboard and Sending Waveforms to it. The basic steps in operation are to
start EDIT (or ACQUIRE) first, then click the Waveboard icon . The main Waveboard
screen will appear.
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 301
There will be an empty Waveboard1 display, which can be enlarged to full size, if desired.
You may send individually selected channels to the Waveboard, or you may send all of
them at one time. Click the right mouse button anywhere that is NOT in an electrode
display window, and you will see a list of options. Select the
option to send all the waveforms to the Waveboard. If you position the mouse within a
single, enlarged electrode display and click the right mouse button, you will see the
option list. Select the option, and only the single waveform will be
sent. Repeat the process for each waveform you wish to send. An example of the
Waveboard display might look like the following.
<%7317A Edit%>
302 Edit 4.5
Positioning the waveforms on the display. The waveforms may be dragged up or down
to new locations by grabbing the label with the left mouse button (the background of
the label will change colors). It is also possible to reposition the waveforms
automatically using the Raster and Overlay options described below under Options.
Some right mouse button options. There are some options that are accessible only
with the right mouse button. Click on a waveform LABEL using the right mouse
button. The displayed menu will appear.
The Cut and Copy options are fairly standard and self-explanatory, and are described
below.
Rename. You may rename the channel easily by selecting the rename option. The
Name window will appear with the current electrode label. Type in a new label, and
click OK.
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 303
Waveforms Options.... Selecting the Waveform Options line displays the following
screen.
The default line thickness is 1, but you can increase the thickness up to a value of
10. The pull-down menu under Line Styles shows the different styles that may be
selected for the waveforms.
Note: When changing the Line Styles, the Line Thickness should be set to 1.
You may change the color of the individual waveforms by clicking the Color
button. The standard Windows Color palette will appear.
<%7317A Edit%>
304 Edit 4.5
Select a color for the selected waveform, and click OK. If you don't like any of the
displayed color options, click the Define Custom Colors>> bar, and select a customized
color. Then click OK, and OK again. Repeat the process to select a new color for each
channel, as desired.
Click the right mouse button anywhere else, and you will see the following list of
options.
Paste. The Paste option will be active if you have previously Cut a waveform from
the Waveboard (same function as Edit g Paste from the Main menu bar). In
combination, the Cut and Paste options may be used to take a waveform from one
Waveboard display, and Paste it into another.
Clear All. Selecting this option will permanently delete all Waveboard contents
(same function as Edit g Clear All from the Main menu bar). You will see a
warning asking for verification before the contents are deleted.
Save Display Image... This option opens a standard Save As utility screen through
which you may enter a file name, designate a path, and save the image as a
Windows metafile (the .wmf extension is added automatically). This is the same
function as File g Save Display Image.
The majority of the remaining options are accessed from visible options within the
Waveboard display. At the top of the main screen, the Main Menu list contains the
following options: File, Edit, View, Window, Options and Help.
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 305
7.2.1 File
The options under File are standard Windows features, and will be described only briefly.
They include New, Open, Close, Save, Save As, Print, Print Preview, Save Display Image,
Recent File, and Exit. Fewer options will be displayed if there is no Waveboard file open.
New. New opens a new Waveboard display to which data can be copied. You can access
this option more easily from the Toolbar icon . Note that waveforms sent from EDIT or
ACQUIRE will always be sent to Waveboard1. The waveforms may then be copied to a
New Waveboard display that you open.
Open. The Open command displays a standard Open File utility. In the Files of type
pull-down menu you can select preexisting Waveboard Files (*.wvb), or display all the
files in the folder. Only *.wvb files may be opened. This option can be accessed
directly from the Toolbar icon .
Close. The Close command will close whichever Waveboard file has the focus.
Save. The Save command saves the current Waveboard to its existing folder using its
same name. If you try to Save a new file, one that has not been saved before, you
will get the Save As utility display.
Save As. The Save As command opens a standard Save File utility which may be used
to enter a file name and designate a destination folder. The .wvb extension is added
automatically when Waveboard files are saved. Save As can be accessed more easily
from the Toolbar icon .
Print. The Print command displays a standard Print window which you can use to
select the printer. The Print window can also be accessed from the Toolbar icon .
Note that the screen image may not match exactly the image that is actually printed.
Use the Print Preview option to view the printed output.
Print Preview. The Print Preview command will allow you to preview the information
that you wish to print.
Save Display Image. This option opens a standard Save As utility for saving the
display in a Windows metafile format. Enter a file name, designate the path, and click
the Save button to save the file (the .wmf extension will be added automatically).
<%7317A Edit%>
306 Edit 4.5
Recent File. The Recent File area shows a list of recently retrieved *.wvb files. If you
wish to recall one of these, you can click the mouse directly on the file (instead of
going through the extra steps using File g Open file).
7.2.2 Edit
The Edit option opens a menu list of standard Windows options for Cutting, Copying,
Pasting and Clearing files.
Cut. The Cut command can be used to remove individual waveforms from the Waveboard.
Highlight the electrode Label (the background behind it will change colors), then select
Cut, and that waveform will be removed (to the Windows Clipboard). Cut may be
accessed more easily from its Toolbar icon . You can also click the right mouse button
on the electrode label to access the Cut option.
Copy. The Copy command will copy a highlighted waveform (label) to the Windows
Clipboard. It can be accessed more easily from the Toolbar , and also by clicking
the right mouse button on the electrode label.
Paste. The Paste command will paste a waveform from the Windows Clipboard to the
Waveboard display. It can be accessed more easily from the Toolbar , or by
positioning the mouse where you want the waveform to be pasted and then clicking
the right mouse button.
Clear All. The Clear All command will permanently delete all Waveboard contents. You
will be asked for verification before the contents are deleted.
You can access the Clear All command more easily by clicking the right mouse button
in any free space in the Waveboard display screen.
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 307
7.2.3 View
View is used to enable or disable the display of the Toolbar and Status Bar.
Toolbar. The Toolbar contains the icon shortcuts near the top of the main screen.
These are described in more detail below.
Status Bar. The Status bar at the bottom of the main screen is used for displaying
brief information about icon functions (position the mouse over the icon and read the
status bar description). The Status Bar will also display the latency of the mouse
position whenever the mouse cursor is positioned within the waveform display.
7.2.4 Window
The Window options include New Window, Cascade, Tile Horizontally, Tile Vertically, and a
list of open windows.
New Window. The New Window option creates a new window that has the same contents
as a previously opened Waveboard window. It can be used to make modifications to the
Waveform display while retaining an original version of the display.
Tile Horizontally. The Tile Horizontally option will arrange the open windows
automatically so that the windows span the width of the larger Waveboard window,
one above, but not overlapping, another.
Tile Vertically. The Tile Vertically option will arrange the open windows automatically
so that the windows span the height of the larger Waveboard window, side by side,
but not overlapping, one another.
Open Windows List. Lastly you will see a list of the currently opened display windows.
You can change the focus to any window by clicking on it from the list (so that the
check mark is beside the window). In some instances, where a desired window is
hidden completely behind another, this is an easier way to change the focus to the
desired window.
<%7317A Edit%>
308 Edit 4.5
7.2.5 Options
Options contains the following choices: Properties, Raster w/ Label Matching, Raster All,
Overlay All. Please refer also to the tutorial above for more information and examples.
Auto Raster When Adding. It allows you to enable or disable the Auto Raster option
when you are adding files to the Waveboard. When enabled (check mark appears),
the channels that are added to the Waveboard will be added above or below
existing channels (not overlain). When disabled, new channels will be overlain on
previously added channels.
Background Color. This option lets you select a color for the background behind
the waveforms. Clicking the button shows the standard Color selection display.
Select a color and click OK, and the background color will change.
Border Color. This option lets you select a color for the border area around the
waveform display. Clicking the button shows the standard Color selection display.
Select a color and click OK, and the border color will change.
XAxis Tic Interval. This allows you to set the tic marks along the x-axis of the
waveform display. If you select Auto, the tic marks will be placed with an
automatically selected interval. Deselect Auto and enter in an interval value (such
as 100), and the tic marks will appear every 100ms.
Units. The Units options let you select what units are used for values on the
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 309
x-axis. "Auto" will autodetect the best scaling to use, but you may override it by
selecting seconds, milliseconds, or microseconds.
Raster w/ Label Matching. When enabled, this option will take all channels having the
same label and overlay them. For example, let's say you send O1, OZ and O2 to the
Waveboard, from three different data files. If you select the Raster with Label
Matching option, you will see the three O1 channels overlain on top of each other, the
three OZ channels on top of each other, and the three O2 channels on top of each
other.
Raster All. The Raster All option will display all channels that are on the Waveboard in
non-overlapping space (none of the channels overlay any other channels).
Overlay All. The Overlay All option will overlay all the channels on the Waveboard.
Whatever Baseline Correction computation you made in EDIT will be transferred
automatically to the Waveboard.
The first seven icons - New file, Open File, Save As..., Cut, Copy, Paste, and Print are
standard Windows icons and are described above. The remaining icons are specific to the
Waveboard, and are described below.
Up/Down Display Scale Arrows. The Up and Down arrows are used to vary the
display scale of the data displayed in the Waveboard. These alter the display scaling only,
and have no effect on the original data file.
Baseline On/Off. Clicking this option centers the waveforms in their allocated regions
on the display. It has no effect on the actual data measurements. If you have overlain
the waveforms, enabling this option will cause the superimposed waveforms to line up
according to the initial data point (which you may not want to do). Generally, you would
not use this option with overlain waveforms.
Polarity Reversal. The polarity icon inverts the display polarity (positive up to
negative up). This affects the displayed data only, and has no effect on the original data
file.
Enable/Disable Zero Indicator. Enabling the option will display a dashed line showing
the zero-voltage baseline, as calculated in EDIT.
Add Text. This option allows you to add text to the Waveboard display. Click the
icon, and then click the left mouse button in the approximate area on the Waveboard
display where you want the text to appear. The Text dialog box will then appear.
<%7317A Edit%>
310 Edit 4.5
Then enter the text you want to display. If you want to vary the font, style, size, etc.,
click first on the Font button. A standard Font display screen will appear.
After you have placed the text on the screen, you may reposition it by grabbing it with
the left mouse button, and dragging it to a new location. Click on the text with the right
mouse button, and you have the option to Delete it, or to Edit it. If you wish to edit it,
click the Edit Text option, and the same Text window shown above will appear.
Add Marker. The Add Marker option allows you to add a marker that displays the
millisecond and microvolt values for any point on a waveform. Click the icon, then position
the cursor on the point of interest. Then click and hold the left button down, and drag
the marker to a clear space and release the button. You can change the position by
grabbing the marker with the left mouse button and dragging it to a new location. Click on
the marker with the right mouse button, and you will see an option list consisting of
Delete, which will delete the marker, and Options. Clicking the Options line displays the
Marker Options screen.
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 311
The default position uses the Latency and Amplitude values for the marks. You can modify
that by selecting the User Defined option. This allows you to enter any text you wish (see
Final Output Image below for example).
Scale tools. Next on the Toolbar are the two scale tools. The first displays a
scale tool for the x-axis, or latency scale. The second displays a scale tool for the y-axis,
or amplitude scale. Click the Latency Bar icon and the latency scale tool will appear.
Click on the scale tool one time with the left mouse button, and a rectangle will appear on
one end . By grabbing the rectangle with the left mouse button, you can
extend or reduce the length of the scale tool. Alternatively, click on the scale tool with
the right mouse button, and you will see a small option list. Selecting Delete will delete
the scale tool. Selecting Set Latency will display the Latency window, through which you
may select the length (in ms) of the tool. The Dynamic Range is the length of the entire
epoch, and is the maximum range allowed for the scale tool.
Operation of the Amplitude Scale Tool is directly analogous to the Latency scale. You
can reposition the scale tools by grabbing them with the left mouse button and dragging
them to a desired location. (See the tutorial above for graphical display).
Cursor 1 and Cursor 2. These buttons allow you to move one or two cursors on
the Waveboard display to measure latencies, amplitudes, and differences between the
cursors on all waveforms. (The second cursor is not active until you place the first one).
Click the Enable Cursor 1 icon from the Toolbar. You will see a vertical dashed line
<%7317A Edit%>
312 Edit 4.5
(Cursor 1) appear with the letter A at the top of it. You will also see several columns
appear on the right side of the screen. Grab the cursor line with the left mouse button,
and drag it back and forth. You will see the latency (in ms) of its current position
displayed at the top of the first column, and the corresponding amplitude values (in mVs)
for each of the waveform points. Position the vertical dashed line at any point on the
screen.
Now enable the second cursor by clicking its icon from the Toolbar. It will have the
letter "B" at the top of it. Position it at a different point. You will see two more columns
of numbers on the right side of the display. In Column B, there is the latency of the
second cursor as well as the amplitude(s) for that time point for each waveform(s). The
third column - Delta - displays the change in latency at the top, and the change in
amplitude below for each channel, in relation to the position of the first cursor. This is a
quick way to measure latency differences between two points, and the peak-to-trough
amplitude differences. To the right is a sample of the columns of measurements.
You can change the labels from "A" and "B" by clicking the right mouse button on the
vertical cursor line.
<%COPYRIGHT - 2008%>
Appendix A - Waveboard 313
You will see the Name display appear. Click the left mouse button on the text line, and
enter the new cursor label. You can rename both cursors.
The Final Waveboard Image. The following display shows an example of the primary
features of the Waveboard in a single image.
The numbers in the columns on the right side appear blurred because they are
superimposed. (Move the waveforms to separate the numbers).
<%7317A Edit%>
314 Edit 4.5
Linear derivation files in SCAN 4.3+ allow you to perform a variety of online and offline
analyses with a high degree of flexibility. All of the online analyses - plus more extensive
applications - may be performed offline in the EDIT module. The purposes of the next
section are to acquaint you more fully with the concept of linear derivation files, and to
provide some examples of .ldr files that will illustrate their uses.
Linear derivation files will have .ldr extensions, and may be created, reviewed and edited
with the Montage Editor, or a standard text editor, such as Notepad. In a text editor, the
first line will consist of 2 numbers: 16 20 in this example. This indicates that you will be
creating 16 new channels from the existing 20 channels that are recorded. This is the
essence of the linear derivation approach - to create new data channels from weighted
linear combinations of existing channels.
Lets say that you are recording 20 channels using the standard 10-20 montage
placements, and that you are using a linked-ears reference for each. The next line in the .
ldr text file (when viewed with a text editor) contains electrode labels for the standard
10-20 system. These do not have to be in any particular order, but they do have to agree
in number and label with the information contained in the corresponding setup file that
was created in ACQUIRE. The first column contains the labels of the new channels that
you are creating. The labels are created manually.
The numbers in the cells are multipliers, or scaling factors, for the data in the original file
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 315
that you are acquiring, or have already acquired. The original data points for each channel
are multiplied by the corresponding multiplier, and the data in the newly derived channels
are simply the linear sums of these weighted values. For a simple conversion to a bipolar
channel, for example, Fp1-F7, the data points from the Fp1 channel are multiplied by 1,
the data points for the F7 channel are multiplied by -1, and data points from all other
channels are multiplied by 0. All of the data values for a single time point are then
summed linearly across channels, and the result is the difference between Fp1-linked ears
and F7-linked ears, or Fp1-F7. The remainder of the bipolar conversion is then simply a
matter of placing the 1 and -1 multipliers in the appropriate columns. (A simple way to do
this is described below).
Notice that the first line was changed to indicate that 4 channels will be created (seen in
the text editor, not in the Montage Editor). Eight channels were selected for each of the
Front, Back, Left and Right derived composite channels. The multiplier is therefore 1/8,
or .125. You can use 1s for the multipliers if you wish - fractions were used in order to
maintain the same microvolt scaling as in the original recording. Using 1s as the
multipliers would increase the derived channel amplitudes by a factor of 8.
For more information about Linear Derivation, please refer to the Linear Derivation, Spatial
SVD, and the Spatial Filter transforms described in the EDIT manual. With this brief
introduction to the basic premise of the LDR files, we will move on to discuss ways to
create and edit them, as well as Montage files.
Let's begin by starting the EDIT program and retrieving the P300.eeg file from the \SCAN
DATA\Demo Data\P300s folder. Click the Montage Editor icon from the Toolbar.
Overview of the Montage Editor. Let's look superficially at the basic sections and
functions of the Montage Editor. Note first that the electrodes are arranged on the Head
Contour display in the same positions as in the data file that was retrieved. The electrode
<%7317A Edit%>
316 Edit 4.5
labels and position information is retrieved automatically when you open the Montage
Editor.
The Main Menu bar in the Montage Editor has four options: File,
Montage, View, and Help. Nearly all of the operations that are listed in these pull-down
menus may be accessed more easily from the Toolbar icons
, and the features will be described in that section below. If you prefer keyboard controls
rather than the mouse, you may access the Main Menu bar options using the standard
conventions. For example, press alt-f from the keyboard to access the File pull-down
menu, then press the capitalized letter to select one of the options.
Set Weights - The next section on the display, labeled as "Set Weights", provides a list of
LDR or MNT files that has been created and stored in the last directory that was
accessed. Click the pull-down menu at the far right side of the field to see the list.
Whether you see MNT or LDR files depends on which type of file you have chosen to edit.
This is typically done using the Toolbar icons, as discussed below.
The section on the left hand side of the screen displays a text matrix of the LDR or MNT
file.
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 317
The large display area on the right hand side of the screen displays the Head Contour with
the current montage, using the electrode label and position information from whatever file
you have retrieved.
Toolbar icons - Now, let's look at the basic functions accessed from the Toolbar icons.
<%7317A Edit%>
318 Edit 4.5
Notice also there are two additional icons in the lower corner of the Head Contour display
area.
Create New Montage - This option will remove any current contents from the
displayed MNT or LDR file, allowing you to create a new montage from scratch. This
will not affect the saved MNT or LDR file (as long as you don't overwrite the existing
file).
When you click the icon, you will see the following display.
You will be asked to enter a number for the number of output channels that you want
to create. You will also be asked if you wish to Create an Identity Matrix. If you
enable this option, an LDR file will be created that has 1's going down the diagonal,
with all other cells set to 0. The output file will be the same as the original file (the
number of input and output channels must be the same). This is useful in cases
where, for example, you want to create a new file that has fewer channels. Just
delete the channels that you don't want from the y-axis list - the 1's are already in
place along the diagonal (see below for instructions on deleting output channels). If
you elect to create an identity matrix, you will see loops appearing for each of the
output channels on the Head Contour display.
Note: if you enable the Create an Identity Matrix option, it will remain enabled the
next time you enter the Montage Editor.
Open Montage File - This option allows you to open an existing MNT or LDR file. If
you have selected the Edit Bipolar Montage icon , the Open File list will show MNT
files. If you have selected the Edit LDR File icon , you will see a list of LDR files.
Note:The Montage Editor program is accessed after you have retrieved a data file. If
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 319
you want to retrieve an LDR file that does not match the data file, select the file
using Open Montage File. You will then see the following message.
Click Yes to continue, and the new LDR file will be retrieved.
Save Montage File - This option allows you to save a MNT or LDR file. A Save File
utility window will appear, allowing you to enter a file name and path (the .MNT or
.LDR extension will be added automatically).
Edit Bipolar Montage - This option allows you to edit a bipolar montage. An
example of this process is presented below.
Edit LDR File - This option allows you to edit an LDR file. An example of this
process is presented below.
Zoom In - This option allows you to zoom in on the Head Contour display. When
<%7317A Edit%>
320 Edit 4.5
selected, you will see a diagram in the upper left hand corner of the display, with a
darker shaded region. Using the left mouse button, grab and drag the shaded region to
a new location. That location will be shown in the zoomed display. This is particularly
useful when you are working with files that have large numbers of electrodes. Note:
Double-clicking the left mouse button in an area will also zoom into that area.
Zoom Out - The Zoom Out icon will return the display to the original size (see
Zoom In above).
Show Head Contour - This button toggles the Head Contour display on and off.
Full Size Display - Clicking this option will enlarge the electrode display to the full
screen size, and will hide the text portion of the display. Clicking it again will return to
the split display.
Zoom Display - The Zoom Display button performs the same function as the Zoom
In and Zoom Out icons.
The first step is to retrieve a data file for which you would like to create a bipolar
montage. For this demonstration, retrieve the P300.eeg file in EDIT. Then click the
Montage Editor icon . Click the Edit Bipolar Montage icon , if needed. You will see a
display similar to the following:
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 321
To create a bipolar channel from the original linked ears recording, the basic process is
a subtraction of one monopolar channel from another monopolar channel. In other
words, to create the bipolar FP1-F3 channel, the program subtracts F3-A1/A2 from
FP1-A1/A2. The user interface for this instruction is very simple. Click and hold the left
mouse button on FP1, and drag the resulting arrow to F3, and release the mouse
button. The arrow will attach itself to F3.
The creation of the new channel will be listed in the text display on the left hand side
of the screen.
<%7317A Edit%>
322 Edit 4.5
Now go back and create as many bipolar channels as desired. Your final bipolar
montage might appear similar to the following.
As you draw the lines for the bipolar montage, you will see the channels being added
to the text matrix on the left side of the screen. Continue creating the desired bipolar
channels.
Now, let's say you mistakenly created a channel, and you would like to delete it. In
the above example, let's delete the FC3-FC4 channel. Position the mouse on the
FC3-FC4 label, and click the right mouse button. You will see a small option window
with the Delete Channel option.
Select it and you will see a window confirming your desire to delete the channel. Click
Yes to delete it.
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 323
If you want to start over from scratch, select the Create New Montage option under
File.
To save the bipolar montage, click the Save Montage File icon . A Save As utility
window will appear allowing you to enter a file name (e.g., P3-bipolar). Click the
pull-down arrow at the end of the "Files of type", and select whether you want to
save the file as an .MNT or .LDR file.
Note
If you are creating a bipolar montage for display purposes, or any other purpose
aside from selecting channels for the Coherence transform, save the file as an LDR
file - not an MNT file. The LDR file is used in most instances.
Then enter a file name and path (the .MNT or .LDR extension will be added
automatically). The next time you enter the Montage Editor, and click the Edit Bipolar
Montage icon, you will see the MNT file listed in the Montage pull-down display.
The bipolar montage that you have created can be applied in the calculation of
Coherence. An option on the Coherence screen allows you to select an .MNT file.
Coherence will be calculated for those channels only. (If you want to try this with the
P300.eeg file, you must first perform a Spline Fit where you force the number of points
to be a power of 2. To see the results in the final Coherence display you will need to
set one of the bipolar electrodes as the Coherence Reference using the right mouse
button. See the Coherence description in the EDIT manual for more details).
The bipolar LDR file can be applied anytime the Linear Derivation option is available on
the Transform or Script options list. For example, save the bipolar montage created
above using the LDR file type, and exit the Montage Editor. With the P300.eeg file still
displayed in EDIT, select Linear Derivation from the Transform menu.
When the Linear Derivation display appears, use the button to retrieve the LDR
file.
<%7317A Edit%>
324 Edit 4.5
Click the button to continue. The LDR file will be applied and you will see
the derived bipolar channels.
For those familiar with earlier versions of SCAN software, the Linear Derivation
feature is now used to display your data as bipolar channels, rather than having
separate bipolar options.
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 325
In the upper left hand corner of the matrix you will see (0:0). This is the cell identifier.
Each cell in the matrix may be identified by its row and column number (row, col). The
numbers correspond to whatever cell is in the top left corner of the section of the matrix
being displayed.
All of the electrodes are listed across the top of the matrix, as well as down the left side
of the matrix. The arrows and sliding buttons will let you look through the entire matrix.
The channels across the top are the existing channels. The channels going down the left
side are the new channels being created. The numbers within the matrix are the LDR
weights. Each data point for each existing channel is multiplied by the respective weight,
and the weighted data points are then summed linearly and written to a new channel in a
new data file.
In the simplest example, let's create a new data file that contains only the four midline
channels. The easiest way to do that is to create an Identity Matrix, and then delete the
unwanted channels. Click the Create New Montage icon , and enable the Create
Identity Matrix option.
Click OK, and you will see a text matrix that has the same output files as input files, with
1's running down the diagonal. Notice that the Head Contour display will show loops at
each electrode (click the Show Head Contour icon , if needed, to see the display).
<%7317A Edit%>
326 Edit 4.5
The Identity Matrix could have been created manually by creating an output file with 4
channels, and then clicking on the labels in the Head Contour display. Clicking a label once
with the left mouse will cause the loop to appear, and simultaneously will write a 1 in the
corresponding cell. It is also possible to enter the 1 in the desired cell in the text matrix.
That will cause the loop to appear on the Head Contour display at the corresponding
electrode site.
If saved at this point, the LDR file would create an output file that was identical to the
input file. Now go down the column of electrodes labels on the left, and do a combination
Ctrl + Left Mouse click on all the ones you want to delete (they will all be highlighted).
Then click the right mouse button on one of the highlighted labels, and click the
option to delete the channels. In this example, it would have
been slightly easier to have highlighted all the channels at once (by highlighting the top
label, then using the Shift + Left Mouse click on the bottom label), and then deselecting
the 4 channels to be retained.
Conceptually, we want to preserve the original data from a given channel. The weight for
that channel should therefore be 1, and the weights for all the other channels should be
0. When summed linearly, the result will be no change to the original data. The final matrix
should appear as follows (shown in part).
Click the Save Montage File icon , enter a file name (the LDR extension will be added
automatically), and click Save. Then close the Montage Editor.
Back in EDIT, make sure the closed.cnt file has the focus, then select Linear Derivation
from the list of Transforms. Use the Browse button to select the LDR file that you
just created. Enter a file name for the Output CNT file, and click OK.
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 327
You will then see the Linear Derivation progress bar track the execution of the transform.
Since this is a CNT file, you will need to retrieve it. The resulting file will contain the 4
channels.
<%7317A Edit%>
328 Edit 4.5
You will also see a cursor and a tooltip box instructing you to place the new label as
desired. Position it in the posterior area of the Head Contour display. If you then apply the
LDR file to create a new data file, retrieve that file, and enter the Montage Editor, you will
see the electrode label.
Now, delete all of the other channels in the output label column, leaving only the
"occipital" channel. That row will have all zeros. Create links from each of the 5
surrounding electrodes to the new "occipital" one.
This will place "-1s" in the PO1, PO2, O1, OZ and O2 columns. In the text area, replace
the -1's with 0.2's . Save the LDR file, and exit the Montage
Editor. In EDIT, select Linear Derivation from the list of transforms. Select the LDR file you
just saved, and apply it. The newly created file will have one channel that is a composite
of the 5 channels.
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 329
Below is a section from the lower right hand part of the output LDR file created when the
P300.eeg file underwent Ocular Artifact Reduction.
The column on the far right is from the VEOG channel. The other columns are from some
of the EEG electrodes. Throughout the file, along the diagonal, are 1's. These are the cells
where the existing channels intersect with the new channels to be created. If there were
no numbers in the VEOG column, the LDR file would have no effect when applied. In other
words, the artifact subtraction is based solely on the values in the VEOG column. These
values are the linear transmission coefficients computed in the Ocular Artifact Reduction
transform, and will have the highest values at the frontal channels. Note that they are all
negative numbers (with the exception of the lower right hand 1.0, which is the
intersection of the input and output VEOG channel).
It should therefore be apparent how the subtraction part of the artifact reduction works,
when using an LDR file. For any given EEG channel, the weight is 1, so the data points for
it are unchanged. The points for the VEOG channel are multiplied by the transmission
coefficient (i.e., reduced proportionally to the covariance of the artifact in each channel).
When summed linearly, that proportion of the amplitude at the VEOG channel is
subtracted from the amplitude at the EEG channel (because it is a negative number).
Since this is an LDR file, it may be applied to other files from the same subject (assuming
the data were acquired under comparable conditions).
A more complex LDR file is created when you perform a Spatial SVD transform on a data
file. The picture below is a section of the LDR file created when applying the Spatial SVD
to the P300.eeg file.
<%7317A Edit%>
330 Edit 4.5
As you can see, the LDR files can get fairly complex. In this example, COMP1 is the first
component detected in the Principle Components Analysis, and it is the component that
accounts for the largest amount of variance. If you look along the row for COMP1, you will
see that some channels have relatively larger weights. These are the channels where
COMP1 is most clearly distributed. The LDR is essentially preserving the activity from
those channels where the component is most evident (larger weights), and minimizing the
activity from those channels where the component is less evident (smaller weights). When
summed linearly, the result is the clearest, single waveform depiction of COMP1. As with
the Ocular Artifact Reduction LDR file above, you may apply the SVD LDR file to a
different, but comparable data file.
The Montage Editor can be used to modify these LDR files. For example, you may rename,
delete, or insert output channels using the right mouse button options described above.
You can, of course, modify the values contained within the cells, however, we do not
recommend doing so unless you have a thorough understanding of the effects it will have
on your data.
<%COPYRIGHT - 2008%>
Appendix B - The Montage Editor 331
9 Appendix C - Header
The header consists of two parts: general, and channel-specific. The general part
contains information that applies to all channels (such as digitization rate, pre-trigger
interval, etc.), whereas the channel-specific part contains information which pertains to
particular channels (such as electrode label, calibration factor, etc.). The size of the
general part of the header is currently 900 bytes, and the size of the channel-specific
part of the header is 75 bytes per channel. A C coded file called SETHEAD.H lists the full
details of these header structures (may be downloaded from the www.neuroscan.com
web site). Partial details of these structures are given below.
Beginning with version 4.1, a footer of varying length is appended to all data files. This
contains information that is used by EDIT. Users can safely ignore this information.
However, one is cautioned not to use the file size in determining the amount of waveform
data contained in the file.
2
The information below does not include the 32 bit format as used with SynAmps , which is
proprietary.
A C language structure called ELECTLOC for the electrode specific part of the header is
defined below (see the SETHEAD.H file for details concerning the reserved space):
The structure for the general part of the header is called SETUP, and is defined below.
(For full details regarding the reserved space, please refer to the SETHEAD.H file.)
<%7317A Edit%>
332 Edit 4.5
A fragment of C code to read the header of a file might look like the following:
#include <stdio.h>
#include <stdlib.h>
#define N_ELECT 64
#include sethead.h
ELECTLOC *channel[N_ELECT];
SETUP erp; /* variable to contain header info */
FILE *fp; /* file pointer */
<%COPYRIGHT - 2008%>
Appendix C - Header 333
short i;
/* open file */
fp = fopen(test.eeg, rb);
At this point, the erp structure contains all of the header information. The procedure for
reading the header would be the same for .CNT, .AVG, .EEG, .COH, and .SET files.
Actual data begins immediately after the header for .EEG, .AVG, and .CNT files. Thus, the
offset to the beginning of data is 900 (=sizeof(SETUP)) + 75 (=sizeof(ELECTLOC)) *
erp.nchannels bytes.
.AVG Data. Average data is stored as 4-byte floats in vectored format for each channel.
Each channel has a 5-byte header that is no longer used. Thus, after the main file
header, there is an unused 5-byte header followed by erp.pnts of 4-byte floating point
numbers for the first channel; then a 5-byte header for channel two followed by
erp.pnts*sizeof(float) bytes, etc. Therefore, the total number of bytes after the main
header is: erp.nchannels * (5 + erp.pnts*sizeof(float)). To scale a data point to
microvolts, multiply by the channel-specific calibration factor (i.e., for electrode j:
channel[j]->calib) and divide by the number of sweeps in the average (i.e.,
channel[j]->n);
.COH data. Coherence data is the result of a pair-wise comparison between electrodes.
Immediately following the data header is a comparison directory. This directory consists of
a square matrix of offset numbers that point to the location of the coherency spectrum.
It appears immediately after the data header. Here is a code fragment to read in the
coherence directory:
<%7317A Edit%>
334 Edit 4.5
// Allocate memory
real=(float*)malloc(sizeof(float)*erp.pnts);
imag=(float*)malloc(sizeof(float)*erp.pnts);
{
real[i]=real[i]*real[i]+imag[i]*imag[i];
}
<%COPYRIGHT - 2008%>
Appendix C - Header 335
.EEG Data. There are erp.compsweeps sweeps of data in an .EEG file. Each sweep of
data consists of a sweep header followed by the EEG data. The sweep header could be
characterized by the following structure:
After the sweep header, data is stored as 2-byte integers in multiplexed format; i.e.,
letting J=erp.nchannels and I=erp.pnts, the data points are as follows: data point #1 for
channel #1, data point #1 for channel #2, . . ., data point #1 for channel #J; . . . ; data
point #I for channel #1, data point #I for channel #2, . . ., data point #I for channel #J.
To scale a data point to microvolts for channel j, first subtract off the amplifier DC offset
(if any) found in the variable channel[j]->baseline. Then multiply by the sensitivity
(channel[j]- sensitivity) times the channel-specific scale factor (channel[j]->calib) divided
by 204.8.
.CNT. Data are stored as 2-byte (short) integers after the main header in continuous
multiplexed format. Thus, the first data scan consists of erp.nchannels points (=
2*erp.nchannels bytes). The second data scan likewise contains erp.nchannels points (=
2*erp.nchannels bytes), etc., until the beginning of the event table is reached. (NOTE:
With old ACQUIRE versions prior to 4.0 a different continuous format was used if you are
using SynAmps with your SCAN system. Please see below for a description of the
SynAmps continuous file format).
Following this data is the event table. The event table begins at a file offset that is given
(in bytes) by the erp.EventTablePos variable. The following C definitions are used for the
event table:
typedef enum
{
TEEG_EVENT_TAB1=1, //Event table tag type
<%7317A Edit%>
336 Edit 4.5
TEEG_EVENT_TAB2=2
}
TEEG_TYPE;
This structure describes a tag type 0 in a continuous file:
This structure describes an event type 2 in a continuous file (it contains additional
information regarding subject performance in a behavioral task):
At the beginning of the event table is a TEEG (Tagged EEG) structure that is defined in
the SETHEAD.H file. Following this structure is the event table proper. Currently, there are
two types of event tables the first with a minimum of event information, and the
second with additional behavioral information. The Teeg variable in the TEEG structure
<%COPYRIGHT - 2008%>
Appendix C - Header 337
The number of events in the event table can be calculated by dividing the size
variable in the TEEG structure by sizeof(EVENT1) (or sizeof(EVENT2), as the case may
be). The events (of structure EVENT1 or EVENT2) immediately follow the TEEG structure.
.CNT (SynAmps). The following applies to files created with ACQUIRE versions prior to
2
4.0. For files created with ACQUIRE version 4.1 and later see above (excluding SynAmps ).
When using SynAmps for continuous files, data are sent in a blocked rather than
multiplexed format. Data are sent from the SynAmps in the following format:
Where X is a 16 bit integer, N refers to a data point and M the number of channels. Data
are typically sent in blocks of N data points channel-by-channel. The size in bytes of one
channel block is stored erp.ChannelOffset located in the SETUP structure (see
above). To read these files you should allocate a buffer the size of
erp.ChannelOffset and read each bock channel-by-channel. Since data is recorded
continuously, you will need to concatenate each channel block into a continuous stream
keeping track of channel alignment. Events are stored in an identical manner to the 100
and 330kHz modules (see above).
<%7317A Edit%>
338 Edit 4.5
BYTE reserved[4080]
Then the facet and vertex information follows:
short number_of_facets
short number_of_vertices
At this point there is a difference. After the sweep header, the frequency domain data for
each sweep has the following format:
for each channel (erp.nchannels):
<%COPYRIGHT - 2008%>
Appendix C - Header 339
The header in 4.3+ data files is the same as in earlier versions: 900 byte setup followed
by 75 bytes per channel. The end of the data is encoded in the NextFile parameter.
nEndOfData = Setup.NextFile
HeaderSize = 900 + 75 * nChans
nPoints = (nEndOfData-HeaderSize)/(nChannels*4)
UvperLSB = elect_tab[i].sensitivity/204.8f;
2
Note: the SynAmps does not have programmable gain like the SynAmps. It will always be
either .0298023 mV/bit for DC recordings, and .00014827 mV/Bit for AC recordings.
2
There are no calibration factors to apply for SynAmps data. Calibration values are applied
BEFORE the data are stored.
Additional files are available to help construct code for reading the 32bit structure.
Contact Technical Support for additional information.
<%7317A Edit%>