Giter Site home page Giter Site logo

functionsmatlab's Introduction

MATLAB functions and stuff

This is a fork of EEG functions originally written by Hause Lin (see https://github.com/hauselin/functionsMATLAB). Please ensure that both EEGLAB and ERPLAB are installed, as they are necessary for the functions provided.

This fork is designed to be more use-accessible and customizable, allowing for easy preprocessing and analysis of EEG/ERP data for a wide variety of study designes with minimal changes to the underlying code.

Most of the necessary functionality can be accessed using the run_scripts.m file located within the EEG directory. The user need simply change the following fields:

  • data.path: Enter in the parent directory path for the subject EEG data to be preprocessed and analyzed.

  • data.ids: A character array of subject IDs to be used

  • data.exclude: A character array of subject ids to be excluded from the analysis. This is included for easy batching (e.g., subject ids = 1:100, excluding 35).

  • data.conds: A structure containing condition information to be used in the analysis. Please ensure that the order in which condition information is provided is consistent (e.g., GO is always first, NOGO is always second). Multiple files per condition per subject (i.e., more than one run) are allowed, but they will be analyzed one file at a time, independent of the others.

  • data.conds.name: A character array of condition names you will be using. These names must be entered in the same way they appear in the filenames of the EEG data to be analyzed, as substring comparison will be used to fetch the proper files.

  • data.conds.binlist = A character array of the filepath of a text file containing the BINLIST information to be used.

  • data.conds.contrasts = A character array of file paths leading to the a text file containing contrast information for a given condition. Each condition should have its own unique contrast file. If no contrast is necessary, simply leave the corresponding entry within the array blank (i.e., []). Contrast data must be entered in the following format:

      CONTRAST NAME 1: 1 - 2
    
      CONTRAST NAME 2: 2 - 1
    

    Each line is a seperate contrast. Numbers correspond to the binlist provided for the given condition. Only simple addition and subtraction of bins is supported. Spaces must seperate each bin number and mathematical operator, as shown above. Contrast names cannot contain colons, as that is treated as a special character.

  • data.conds.preproc_cfg: A character array of filepaths pointing to a plain text file containing preprocessing configuration parameters. If not provided (i.e., field is left blank, []), then the default values will be used. See EEG/s1_preprocessEEG.m for details. Each line corresponds is treated as a preprocessing parameter to over-ride, and must be entered in using the following format:

      PARAMETER_NAME1 = value1
    
      PARAMETER_NAME2 = value2
    

NOTE that due to the subtle and somewhat subjective nature of EEG analysis, this function requires user supervision for the accurate labelling and removal of artifactual ICA components extracted from the EEG timecourse. Automatic removal of these components, while usable, is simply not up to our standards and is not recommended for final analysis. As such, using these functions can be rather time-consuming. It may be best to process your data in smaller batches in order to make it more manageable.

functionsmatlab's People

Contributors

hauselin avatar johneusebio 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.