Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] [BUG] [ENH] [WIP] Bug fixes and enhancements for time-resolved spectral connectivity estimation #104

Merged
merged 51 commits into from
Nov 21, 2022

Commits on Aug 31, 2022

  1. FIX: compute connectivity over multiple tapers when mode='multitaper'…

    …, then average
    
    FIX: add working support for computation of multiple connectivity metrics at once, as indicated by existing docstring
    
    FIX: correct calculation of PLV and coherence connectivity metrics
    
    FIX: block_size parameter now actually corresponds to the size of blocks instead of number of blocks
    
    ENH: add PLI and wPLI connectivity metrics
    
    ENH: improve docstring and typechecks in code
    
    ENH: streamline the public API with mne_connectivity.spectral_connectivity_epochs
    
    ENH: enable averaging connectivity results over frequencies and epochs
    ruuskas committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    41bd87b View commit details
    Browse the repository at this point in the history
  2. require MNE-Python 1.0 or newer due to breaking changes in mne.time_f…

    …requency.tfr_array_multitaper
    ruuskas committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    05ae8f6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9cc283c View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2022

  1. update docstring: connectivity is not averaged over Epochs by default

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    924b4ab View commit details
    Browse the repository at this point in the history
  2. fix docstring typo

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    c5b75f8 View commit details
    Browse the repository at this point in the history
  3. update docstring: faverage is False by default

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    7699983 View commit details
    Browse the repository at this point in the history
  4. update docstring: lower bound of frequency range for connectivity com…

    …putation may be None
    
    Co-authored-by: Britta Westner <britta.wstnr@gmail.com>
    ruuskas and britta-wstnr committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    89f683a View commit details
    Browse the repository at this point in the history
  5. update docstring: fmax may be None

    Co-authored-by: Britta Westner <britta.wstnr@gmail.com>
    ruuskas and britta-wstnr committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    cb2dab5 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2022

  1. update docstring

    ruuskas committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    0fd34c9 View commit details
    Browse the repository at this point in the history
  2. new default for fmin

    ruuskas committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    f4992a7 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'spectral_time' of github.com:ruuskas/mne-connectivity i…

    …nto spectral_time_hypyp
    ruuskas committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    cc1d69d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fa9bce7 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2022

  1. fix bug with indices: connectivity is now computed correctly between …

    …specified indices when set
    ruuskas committed Sep 5, 2022
    Configuration menu
    Copy the full SHA
    9e9f983 View commit details
    Browse the repository at this point in the history
  2. DOC: improve documentation

    ruuskas committed Sep 5, 2022
    Configuration menu
    Copy the full SHA
    2e4ccd1 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2022

  1. Configuration menu
    Copy the full SHA
    926c330 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b881c34 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    73fb937 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2022

  1. Configuration menu
    Copy the full SHA
    baaca26 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2022

  1. Change block_size default to 1

    This change will minimize memory usage by default.
    ruuskas committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    2a7e09e View commit details
    Browse the repository at this point in the history
  2. Add documentation for block_size

    Add a short description for the block_size parameter to allow users to
    better understand the memory usage of the spectral_connectivity_time
    function.
    ruuskas committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    2a0be06 View commit details
    Browse the repository at this point in the history
  3. Change for more useful variable names

    Improve the readability of code by shortening variable names in
    pairwise_pli.
    ruuskas committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    53ac7b5 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. Remove regression test

    Remove the regression test which tests against the spectral connectivity
     implementation in frites. The implementation in frites is erroneous,
     and therefore we should not test against it.
    ruuskas committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    bc61e54 View commit details
    Browse the repository at this point in the history
  2. Remove block_size parameter

    The block_size parameter is not useful, as testing shows that running
    the computation in blocks of epochs does not have a meaningful effect on
     the speed of computation, but significantly increases memory usage.
    ruuskas committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    7ce13bd View commit details
    Browse the repository at this point in the history
  3. Improve documentation

    Added a note on memory mapping in the docstring of
    spectral_connectivity_time. Corrected some typos and inconsistent
    backticks.
    ruuskas committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    c7dd18c View commit details
    Browse the repository at this point in the history
  4. Improve comments

    Removed redundant comments, clarified and fixed typos.
    ruuskas committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    4d2c1f0 View commit details
    Browse the repository at this point in the history
  5. Remove unused code

    ruuskas committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    1b6224f View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2022

  1. Configuration menu
    Copy the full SHA
    054512b View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2022

  1. Fix style issues

    ruuskas committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    283a1a1 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'spectral_time' of github.com:ruuskas/mne-connectivity i…

    …nto spectral_connectivity_time_pairwise
    ruuskas committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    083aa1b View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2022

  1. Add comment

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    e89ac77 View commit details
    Browse the repository at this point in the history
  2. Improve comment

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    19603bd View commit details
    Browse the repository at this point in the history
  3. Rename test function

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    e5da3ae View commit details
    Browse the repository at this point in the history
  4. Update docstring

    Add clear reference to MNE-Python functions.
    
    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    39f0ee6 View commit details
    Browse the repository at this point in the history
  5. Add comments

    Add some comments to clarify the new test case for time-resolved
    spectral connectivity.
    ruuskas committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    4b6311c View commit details
    Browse the repository at this point in the history
  6. Merge branch 'spectral_time' of github.com:ruuskas/mne-connectivity i…

    …nto spectral_connectivity_time_pairwise
    ruuskas committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    7c64633 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. DOC: Fix typos

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    f6684c0 View commit details
    Browse the repository at this point in the history
  2. DOC: Improve doc formulation

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    39fef93 View commit details
    Browse the repository at this point in the history
  3. DOC: Add note on memory mapping

    Co-authored-by: Adam Li <adam2392@gmail.com>
    ruuskas and adam2392 committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    08b5c79 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ccb0a2d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fe727f7 View commit details
    Browse the repository at this point in the history
  6. DOC: Improve documentation

    Revised documentation of spectral_connectivity_time.
    ruuskas committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    3b966ec View commit details
    Browse the repository at this point in the history
  7. Add test for cwt_freqs

    ruuskas committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    f082d6f View commit details
    Browse the repository at this point in the history
  8. BUG: Fix spectral_connectivity time

    Spectral connectivity computation failed if cwt_freqs was only a single
    number or an array with a single entry due to invalid array slicing.
    
    Fixed by incrementing the upper bound of the slice by one when
    computing the average in a frequency band.
    ruuskas committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    84d073b View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2022

  1. Compute weighted average over CSD

    Compute a weighted average of the tapered cross spectra when using
    the multitaper mode. Weighting is
    derived from the concentration ratios between the DPSS windows.
    ruuskas committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    3e7f208 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2022

  1. Fix style

    ruuskas committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    71b61ad View commit details
    Browse the repository at this point in the history
  2. Update the docstring of spectral_connectivity_time

    Made the docstring more stylish, removed unnecessary things and
    added better compliance with MNE-Python style guidelines.
    ruuskas committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    9e073c6 View commit details
    Browse the repository at this point in the history
  3. Remove unnecessary defaults

    The _spectral_connectivity function doesn't need defaults as these are
    already spelled out in the main spectral_connectivity_time function
    signature.
    ruuskas committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    dcfbc8b View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2022

  1. Configuration menu
    Copy the full SHA
    fb9869f View commit details
    Browse the repository at this point in the history
  2. FIX: Test

    larsoner committed Nov 17, 2022
    Configuration menu
    Copy the full SHA
    eec0113 View commit details
    Browse the repository at this point in the history
  3. FIX: Doc build

    larsoner committed Nov 17, 2022
    Configuration menu
    Copy the full SHA
    b2dda41 View commit details
    Browse the repository at this point in the history
  4. FIX: Not pre

    larsoner committed Nov 17, 2022
    Configuration menu
    Copy the full SHA
    099f194 View commit details
    Browse the repository at this point in the history