Table of Contents
blinkcp - blink correction procedure for ERP data
file.avg file.cbk file.cav [options]
blinkcp applies a blink correction
procedure to the ERP data in the blink data file file.blk and the average
file file.avg. file.blk is created by the avg program with the "-b" option.
It contains one bin for each bin in file.avg. Each of these bins contains
the average of trials determined to contain blink artifacts by the artifact
rejection routine polinv. (See the garv program documentation for information
on artifact rejection during data averaging.) file.blk also contains 3 additional
bins: one containing the average of all the epochs that are in file.avg,
one containing the average of all the blink-contaminated epochs in file.blk,
and finally another average of all the blink-contaminated epochs time-locked
to the blink instead of to the stimulus onset.
blinkcp uses all this information
to create a "spatial filter" for removing the contribution of blinks with
minimal distortion of the EEG. This spatial filter is applied to both the
data in file.blk and file.avg. blinkcp creates 2 files: the corrected blink
data file file.cbk, which is the result of applying the spatial filter
to file.blk; and the corrected average file file.cav, which is a weighted
average of the epochs in file.avg and file.cbk.
N.B. The order of the artifact
rejection tests in the artifact rejection file employed by avg in creating
file.blk file is very important. The avg program applies the artifact rejection
tests in the order they are found in the artifact rejection file, terminating
upon the first failure. Since the polinv artifact rejection function is
used to determine which epochs go into file.blk, you will usually place
this function after any other rejection functions to make certain that
epochs containing blinks go into file.blk only if they contain no other
The following options can be used when running blinkcp:
blinkcp prints out
various messages as it’s running. Most of these serve to indicate where
the program is in the process of creating and applying the spatial filter.
After creating the spatial filter, blinkcp prints out some statistics
that server as a measure of how "good" the spatial filter is. These are:
- Use and "iterative" approach in creating the spatial filter. The default
approach is to use a Principal Component Analysis (PCA) of the data to
determine the best spatial filter.
- -npcs n
- Use n principle components when
doing the PCA to create the spatial filter. The default is 1.
- -bp low high
- Use low and high as the cutoff frequencies for a bandpass filter that
is applied to both file.blk and file.avg. blinkcp uses default cutoff
frequencies of 0.2 and 15 Hz. Using a bandpass filter helps increase the
signal to noise ratio, which improves the spatial filter.
- Do NOT
apply a bandpass filter to the data files.
- -s filtfile
- Save the spatial filter
to a file called filtfile.
- -a filtfile
- Instead of creating a spatial filter,
apply the one that has been saved in filtfile presumably by a previous
run of blinkcp with the -s filtfile option.
- Use bin 0 in the spatial
filter creation and application. Normally bin 0 is reserved for calibration
pulses, so it is not used by default.
- Automatically answer yes to all
yes/no questions such as "File already exists, overwrite?".
- Quiet mode.
Don’t print all the status lines.
- -f cov_avgfile
- Use the data in cov_avgfile
to do the covariance calculation for determining signal contribution instead
of using the data in file.avg.
- -b bin# bin# bin#...
- Use only the data in the
specified bins when doing the covariance calculation for determining signal
contribution. Normally all the bins other than bin 0 (unless the -0 option
is invoked) are used. Note that you CAN use the -b option in conjunction
with the -f option.
- signal / noise ratio
- Measure of how much of the
signal is distorted by the spatial filter. A perfect filter would yield
a value of 0. The typical value is close to 0 (around 0.01). Multiply by
100 to get the percentage of signal distortion.
- Measure of how
much noise (blink) remains after applying the spatial filter. A perfect
filter would yield a value of 0. Typical values are close to 0 (around
0.03). Multiply by 100 to get the percentage of remaining noise.
- This is a weighted sum of both kinds of error: total distortion of signal
due to noise that wasn’t filtered out and due to distortion of the original
signal by the filter. A perfect filter would yield a value of 0. Typically
this value will be around 10%.
These measures are also stored in the condition
description header variable of the last bin in the corrected blink data
file file.cbk above. Due to header space limitations, however, the names
have been replaced with the following:
- Signal to noise ratio (rmss/rmsn).
- Measure of signal distortion (rmses/rmss).
- Measure of noise distortion
- Total distortion (rmse/rmss).
For example, the condition
description header variable will look something like this: "Err S/N=0.247
S=.004 N=.086 T=.014".
None yet reported.
Anders Dale, Ronald Ohst
Table of Contents