manual to get started with BrainWave

advertisement
Brainwave
User Guide
1. Introduction
BrainWave (BW) is a program for the analysis of time series and matrices written by Cornelis Jan
Stam. Background information and the latest version can be found at:
http://home.kpn.nl/stam7883/brainwave.html.
BrainWave contains options for the computations of power spectra, functional connectivity and
network measures. Since these fields are in development, BrainWave is regularly updated where
previously available analyses options might still be available or disappear. Below are the
instructions for version 0.9.151.7.2.
2. Setting the settings
Before you import files, the settings need to be correct for your data file.
From the menu bar, select Settings, and the following window will appear:
default 0. When an integer is inserted, the first lines of your dataset are skipped
(the number of lines corresponding to the integer filled in.
default 4096. The number of samples in one epoch. The number can be adjusted
to lower values from the dropdown menu.
default 1.0. To increase or decrease the amplitude of the signals
default 500 Hz. Can be adjusted to match you data set.
default 0.5 Hz. High pass filter. Can be adjusted to match you needs.
default 70.0 Hz. Low pass filter. Can be adjusted to match you needs.
default 21. Can be adjusted to match you data set.
default 1 (no down sampling). Downsampling can increase processing speed, at
the cost of precision of the data. When downsampling, the Sample frequency also needs to be
adjusted. For example: a time series with sample frequency of 1250 Hz can be down sampled 4
times (Downsample at 4 and Sample frequency at 1250 / 4 = 313 Hz).
deselects all channels. Deselected channels are red.
selects all channels.
deselects the first 102 channels. Deselected channels are red.
selects the first 102 channels (but does not deselect other channels).
> use dropdown menu (default:
to change derivation.
Make sure to save your settings before proceeding.
3. Opening a time series file in BW
You can import files for analysis. BW expects ASCII or text files, tab delimited, where columns
refer to electrode/sensor/recording site and rows refer to time (samples).
It expects no header. If your files contain a header, there is an option to mute the first rows of a
file in the settings menu (see 2.).
Two ways to open a file.
3. Selecting and storing epochs from a time series file in BW
You can scroll through your file with the buttons below the time series:
Individual epochs (‘pages’) from the file can be stored separately:
This will store the current epoch (the epoch that is visible on the screen).
If you deselected channels, these channels will be set to zeros (a flat line) when saving the
epoch. Note that during further analyses, these channels need to be deselected (red lines),
otherwise their value (“0”) will be included in the analyses with dramatic consequences!
4. Opening and storing matrices
If you want to import a matrix instead of a time series, you can do so by clicking
menu bar and I
. You can check if it is imported correctly by clicking
menu bar and
.
A matrix can be stored:
>
.
from the
from the
5. General information for batch analysis
If you have multiple epochs and/or multiple time series that you want to analyze similarly, there
is a batch function. Please keep in mind that it is not possible to run one batch analysis for
multiple frequency bands.
Only analyze files that are stored on a local computer and do not analyze files through a
network connection: A temporary network interruption will cause disturbances in the
computations which will affect the results, but which will not always be visible!
Check if your dataset settings are adjusted to what you want to analyze.
Deselect artefact channels to exclude them from analysis.
the time series of interest
Select the first and last epoch you want to have included in the analysis (the same number of
epochs in each subject!)
: if you want to compare two groups with permutation testing with pvalues corrected for multiple tests; uses 10000 iterations per test. This can only be used for
synchronization measures, one at the time. Click "Groups" (underneath the 4 boxes in the right
upper corner) and indicate first and last files of the two groups to be compared with "Start1,
Stop1, Start2 and Stop2". The output can be viewed in Show, Results, where mean, standard
deviation and corrected p-values are displayed. In Show, power, it is possible to view the maps
for Mean1, Mean2, Difference and p-values (blue is p > 0.05; shades of purple and red: p-values
< 0.05). Values are not stored in the results file.
Select boxes of the analysis that you want to run (for example FFT, PLI). Some analyses can be
done in the same action, but it is not possible to analyze more than one connectivity measure at
the same time.
you can select a folder and give the results file a name. If default setting is
not changed, the results file will appear in the same folder as the BrainWave program.
: when selected, the program will make a file mySpectrum, exported to the
same directory as the results file, which contains the power spectrum averaged over all selected
channels per epoch. It contains the first 1024 points of the power spectrum. Resolution is
1/epoch duration in seconds. Power values are the absolute values divided by 1000.
: this will start the analysis. The output a text file, put in the folder where BrainWave
is stored (default) or the folder you selected (with
). If opened in excel, the
output contains columns that represent the channels. The column Mean gives the mean of all
channels, or in case this is not informative it will show something else, such as the maximum.
6. FFT/ Power Analysis (relative)
FFT on the epoch on the screen:
FFT on multiple epochs of one or more subjects:
NOTE: You cannot adjust the frequency bands in FFT analysis.
Definitions of the frequency bands in in Brainwave FFT:
Delta:
0.5- 4 Hz
Theta:
4 - 8 Hz
Alpha:
8-13 Hz
Beta:
13-25 Hz
Gamma:
25-49 Hz
7. Analysis of functional connectivity
It is not possible to analyze more than one connectivity measure at the same time.
Different measures for functional connectivity (FC) can be calculated in Brainwave:
- Coherence
- Imaginary Coherence
- Phase Coherence
- PLI (Phase Lag Index)
- SL (Synchronization Likelihood)
- PTE (Phase Transfer Entropy)
- PLT (Phase Lag Time)
- WPLI (Weighted Phase Lag Index)
- AEC (amplitude envelope correlation)
This list might undergo changes with new developments.
When the box Export Matrix is ticked (left lower quadrant of the batch window), the adjacency
matrices for all analyzed epochs will be saved in a txt file myMatrix in the same folder as the
myResults file.
SL settings:
NOTE: If want to calculate SL as a FC measure you have to take in to account a few things:
1. For theta, alpha, beta and gamma bands just use the auto reconstruct option!
2. In delta band (and slower oscillations, like in fMRI data) you have to
in the SL settings and adjust the values manually:
The table shows how to calculate the parameters:
Table 2 SL parameters
Lag
L
= FS/( 3*HF )
Embedding dimension
M
= 3*HF/LF
Theiler window
W1
= 2 *L*(m-1)
Pref
Pref
< 0.05
W2
W2
> 10/Pref + W1 – 1
(typically 0.01)
For example for rs-fcMRI analysis in children:
8. Graph Analysis
Several types of networks and corresponding network measures can be computed,
The time required to finish the analyses depends on the number of channels (size of your
network), the number of subjects, the speed of your computer and the type of analysis.
>
> Check the box of the
you want to use.
> Check the box of the graph analysis you want to perform.
9. Visualizing the results
Results can be displayed in various ways through the menu
.
Here, the results are listed as text / numbers. The content varies with the analyses that have
been performed. The results of a permutation test are also found here.
Here, one or two time series can be displayed and x- and y-axis adjusted. This is informative
when looking at phase relationships.
Here, one or two frequency spectra can be displayed (if FFT has been performed in non-batch
mode), with adjustable x- and y-axis.
If a connectivity analysis has been performed, here the adjacency matrix will be displayed. If a
batch analysis was done, the matrix of the average connectivity is shown. Also, MST and
visibility graph option can be chosen.
Several ways to display your network: as a circle, spring, ranked, and MST. Only if MST is
formally computed earlier, some nodes will be red: these nodes have the highest betweenness
centrality.
The phase difference between two channels can be computed and visualized on the unit circle
for all data points of the epoch on the screen. This will only show results for non-batch analyses.
This option allows you to view the time course of either the phases, the PLI, or the dPLI for all
channels. The length of the time window can be decreased to view more details.
For BrainLab 21 channel EEG, Biosemi 64 channel EEG, CTF and Electa MEG signal space and
Electa MEG source space, as well as some computer models, there are nice options to visualize
relative powers,(directed) conncectivity, network properties, modules, and significantly
different electrodes/sensors/regions resulting from the permutation analysis that can be
accessed through the several drop down menus.
After batch analysis, the results that are displayed are the average results.
After graph spectral analysis, eigenvalues can be viewed here.
After unweighted network analysis, the degree distribution can be viewed here.
10. Test signals and models
Currently, no user guide is available for these options.
Download