NeuroFreq: a MATLAB Toolbox for Time-Frequency Analysis of M/EEG Data

Eric Rawls
DOI: https://doi.org/10.1101/2023.11.01.565154
2024-02-21
Abstract:Time-frequency (TF) analysis of M/EEG data enables rich understanding of cortical dynamics underlying cognition, health, and disease. There are many algorithms for time-frequency decomposition of M/EEG neural data, but they are implemented in an inconsistent manner and most existing toolboxes either 1) contain only one or a few transforms, or 2) are not adapted to analyze multichannel, multitrial M/EEG data. This makes entry into time-frequency daunting for new practitioners and limits the ability of the community to flexibly compare the performance of multiple TF methods on M/EEG data. This paper introduces the toolbox for MATLAB, which includes multiple TF transformation algorithms that are implemented in a consistent fashion and produce consistent output. The toolbox includes TF decomposition algorithms of both linear and quadratic classes, utilities for resampling, averaging, and baseline correction of TF representations, and tools for visualizing and interacting with single-trial or averaged TF representations over multiple channels. This paper introduces these utilities, and applies them to synthetic and EEG data to demonstrate the toolbox.
Neuroscience
What problem does this paper attempt to address?
The paper primarily proposes a new toolbox for time-frequency (TF) analysis of electroencephalogram (EEG) and magnetoencephalography (MEG) data—NeuroFreq. Its main purpose is to address several key issues present in existing TF analysis tools: 1. **Inconsistent Algorithm Implementation**: The various TF decomposition algorithms are implemented inconsistently across different software packages, making it difficult to perform unified comparisons. 2. **Limited Toolbox Functionality**: Most existing TF analysis toolboxes either contain only a few transformation methods or are not suitable for multi-channel, multi-trial EEG/MEG data analysis. 3. **Limited Flexibility and Comparability**: This makes it challenging for new users to enter the field of TF analysis and restricts the community's ability to flexibly compare different TF methods. To solve these problems, the NeuroFreq toolbox has the following features: - **Algorithm Consistency**: It provides multiple linear and bilinear category TF transformation algorithms and implements these algorithms in a consistent manner. - **Comprehensive Support**: Includes linear TF methods (such as short-time Fourier transform, filtered Hilbert transform, etc.) and bilinear TF methods (such as Wigner-Ville distribution and its improved versions). - **Practical Features**: Equipped with data preparation, post-processing of transformed data (for example, resampling, averaging, and baseline correction), visualization, etc. - **Compatibility**: Can process datasets in EEGLAB format, and the output format is unified, facilitating direct comparison between different algorithms' results. - **Flexibility**: Capable of running on data from a single trial or multiple trials, supporting multi-channel analysis. By introducing the NeuroFreq toolbox, the authors aim to provide a more flexible, comprehensive, and user-friendly solution for the time-frequency analysis of EEG/MEG data, thereby promoting research progress in the field.