Skip to content

daviddwlee84/EEGViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EEGViewer

Electroencephalography signal analysis and visualization

This toolbox has been used in course "Design and Practice of Neuromarketing Experiment (腦科學行銷實驗設計與實作)" in NTUST (Taiwan Tech).

Demo

MultipleSlider

Basic Usage

Simple procedure

  1. Input Data

    • Now support regular *.edf and OpenBCI format *.txt
    viewer = EEGViewer('path/to/your/data.edf');

    or

    viewer = EEGViewer();
    viewer.Load('path/to/your/data.edf')
  2. Filtering (Optional)

    viewer.FIRfiltering(1, 30); % Band-pass FIR filter of 1~30 Hz
  3. Re-Reference (Optional)

    viewer.AverageReReference();
  4. SetMinDrop / SetMaxRange (Optional)

    viewer.SetMinDrop(minimum) % Default is 0 (don't drop)
    viewer.SetMaxRange(maximum) % Default is the maximum of all channel's FFT data
  5. SetCompressConstant (Optional)

    viewer.SetCompressConstant(constant) % Default is 1 (don't compress)

    Only use it when you want to compress the graph down (i.e. expand the limit of Z-axis).

  6. Static Plot

    viewer.PlotSingleSignal(channel)                % Plot single signal spectrum
    viewer.PlotDoubleSignal(channel1, channel2)     % Plot two signal spectrum symmetrically
  7. Animated Plot Setting (Optional)

    viewer.SetAnimateMaxLength(minutes) % Show only the range of the time period on screen
  8. Animated Plot

    viewer.AnimatedDoubleSignal(channel1, channel2, speed) % Plot animated two signal symmetrically. (default speed is 2)
    viewer.AnimatedMultipleSignal(channelList, speed) % Plot all animated signal in channelList (must be even number, default speed is 2)
  9. Slider Double Singal Plot

    viewer.SliderDoublePlot(channel1, channel2, secLength) % Show only the range of time period on screen

    Ps. It share the animatemaxlength global variable and same setting of Animated Plot function in AddAuxiliaryInformation for now.

  10. Slider Multiple Double Signal Plot

    viewer.SliderMultiplePlot(channelList, secLength) % Show only the range of time period on screen
  • Quick view of data

    viewer.ScrollView()
  • Add channel location name (for OpenBCI) (Optional)

    viewer.SetChannelLocationName('ch1', 'ch2', 'ch3', 'ch4', 'ch5', 'ch6', 'ch7', 'ch8')
  • Save FFT data as CSV

    This will output 1~60Hz fft data and sum of delta, theta, alpha, beta, gamma.

    viewer.SaveCSV('filename') % It will auto append .csv extension after filename.
  • Statistics CSV

    Output the following statistics with its value and formula (as filename_stat.csv)

    • Right frontal cortical asymmetry (alpha)
    • Frontal brain asymmetry
    • EEG alpha synchronization
    • Posterior resting state EEG asymmetries
    • Approach-Withdrawal (AW) Index
    • Frontal Alpha Asymmetry

    And GFP_theta table (as filename_gfp.csv)

    % [left channel nums; right channel nums]
    viewer.Statistics('filename', [1, 2, 3, 4; 5, 6, 7, 8]) % With only LRChannels
    viewer.Statistics('filename', [1, 2, 3, 4; 5, 6, 7, 8], [1, 2, 3; 5, 6, 7]) % With LRChannels and GFPLRChannels
  • Top-N Differential

    Print the top-N absolute value of differential for each channel

    viewer.DifferentialTopN(N)

Other function used

  • readOpenBCItxt.m - load *.txt output from OpenBCI's machine
  • read_edf.m - *.edf data loader

from EEGLAB

  • eegfilt.m - FIR Filter
  • eegplot.m - Scroll view on raw data
  • textsc.m - Places text in screen coordinates
  • fastif.m - Fast if

Popular Matlab Toolbox

EEGLAB

BCILAB

Open Source Matlab Toolbox for Brain-Computer Interface research

ERPLAB

FieldTrip

Related Links

OpenBCI

Python EEG

Previous Version Demo

SliderDoubleSignal Animated DoubleSignal

About

Electroencephalography signal analysis and visualization

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages