https://github.com/cbrnr/timewarp

Time-warping variable-length EEG epochs for time/frequency analysis

https://github.com/cbrnr/timewarp

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.1%) to scientific vocabulary

Keywords

eeg meg time-frequency-analysis
Last synced: 5 months ago · JSON representation

Repository

Time-warping variable-length EEG epochs for time/frequency analysis

Basic Info
  • Host: GitHub
  • Owner: cbrnr
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 3.3 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
eeg meg time-frequency-analysis
Created about 7 years ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

Time-warping time-frequency maps

Motivation

TODO

Workflow

  1. Load the raw data and create epochs around events of interest. Make sure that epochs completely cover the longest epoch in the data. Since MNE supports only constant-length epochs, shorter epochs will contain irrelevant data at the end. This is fine, because the next steps will take care of this issue. Therefore, after this step, you should have an mne.Epochs object consisting of n epochs (let's call this object epochs) and an array of n epoch durations (in seconds) (let's call this array durations).
  2. Now we compute a standard time-frequency representation (TFR) from the epoched data. MNE currently includes three TFR functions in mne.time_frequency, namely tfr_morlet(), tfr_multitaper(), and tfr_stockwell(). All of them produce a suitable TFR that can be used for time-warping. These functions can compute either averaged (average=True, the default) or single-epoch (average=False) TFRs. Since time-warping requires single-epoch TFRs (an mne.time_frequency.EpochsTFR object), we need to pass average=False (we will average them later).
  3. Finally, we time-warp the mne.time_frequency.EpochsTFR object by passing it to the tfr_timewarp() function, together with the durations array defined in the first step. This will stretch/shrink all single-epoch TFRs to the same length, a process which we refer to as time-warping. Note that tfr_timewarp() returns another mne.time_frequency.EpochsTFR object with the same dimensions as the input object. However, the data from time 0 to the last time point is now time-warped, which means that it cannot be interpreted as time in seconds, but as a duration percentage (ranging from 0% to 100%).
  4. Plotting (or post-processing) the time-warped mne.time_frequency.EpochsTFR object usually involves averaging over all epochs first. This can be achieved by calling the average() method.

Example

TODO

Owner

  • Name: Clemens Brunner
  • Login: cbrnr
  • Kind: user
  • Location: Graz, Austria
  • Company: University of Graz

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

pyproject.toml pypi
  • matplotlib >= 3.8.0
  • mne >= 1.7.0
  • numpy >= 1.25
  • pandas >= 2.0.0
  • scipy >= 1.11.0