Giter Club home page Giter Club logo

eeg_pipeline's Introduction

eeg_pipeline toolbox

This toolbox was designed as part of an independent study to facilitate batch processing of EEG datasets.

Required toolbox:

Getting started

  • Use git or just download a zip of this toolbox and extract it somewhere on your hard drive.

  • Add eeg_pipeline folder to Matlab's path

  • In the command line, run: saeeg.BatchGUI

  • A gui should appear.

  • Use the Data Source button to locate the parent directory of your data.

  • Use the Analysis Output button to locate where the analysis results should be written.

  • The File Pattern fieldcan be used to restrict which files are found under the Data Source directory.

    • Recursively find all files: **/*
    • Recursively find 'bdf' files only: **/*.bdf
    • Recursively find all files that contain the string "PoolB": **/*PoolB*
    • Use more complex regular expressions to further restrict files.
  • Select a folder or files individually in the file tree at the left.

  • The dropdown box at the right-top of the gui should populate with analysis functions (really their own classes) that are compatible with the data type of selected files.

  • Use the settings menu at the top of the gui to customize program behavior.

  • A typical pipeline might look like:

    1. biosemi_preprocessing - convert biosemi data to fieldtrip data format for further processing
    2. data_concatenate - concatenate data based on simple file naming rules
    3. data_ica - compute independant component analysis. Results in comp component datatype
    4. comp_pregenerate_topomaps - pregenerate ica topographic maps and gui for speedy artifact selection and rejection
    5. fig_comp_mark_topomaps - runs the gui to select and reject ica artifacts
    6. data_mTRF - run forward or backward mTRF analysis (uses mTRF-Toolbox, see reference above)

main_gui

data_example

Adding analysis functions

  • To add more functions, copy and modify an existing class under eeg_pipeline\+saeeg\+agui
  • Each class requires a constructor that takes in MasterObj and parent.
    • MasterObj contains general program information and may or may not be useful
    • parent is a handle to the gui panel that can be used for user-modifiable parameters
  • Each class also requires two additional functions: run_analysis and create_gui

run_analysis

  • This function accepts the class object and a saeeg.FileQueue object (often simply coded as Q in existing classes)
  • Analysis parameters are specified using the create_gui function (see below).
  • The FileQueueobject handles the list of files that are selected and need to be processed.
  • Use Q.CurrentFile to get the current full path and filename.
  • Use Q.mark_completed to indicate that the current file has been processed.
  • Use Q.start_next to kick off the next file in the queue if available.

create_gui

  • This function is used to setup a simple interface for specifying parameters.
  • Use standard Matlab user interface objects, such as uieditfield, uitable, etc.
  • Read the values of these fields in the run_analysis function to specify your analysis parameters.

eeg_pipeline's People

Contributors

dstolz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.