-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MAINT] Add logic for handling AverageTFRArray in old MNE versions (#185
) Co-authored-by: Eric Larson <[email protected]>
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
domain using Morlet wavelets and the debiased squared weighted phase lag index | ||
:footcite:`VinckEtAl2011` is used as connectivity metric. | ||
""" | ||
|
||
# Author: Martin Luessi <[email protected]> | ||
# | ||
# License: BSD (3-clause) | ||
|
@@ -18,7 +19,7 @@ | |
import numpy as np | ||
from mne import io | ||
from mne.datasets import sample | ||
from mne.time_frequency import AverageTFR | ||
from mne.time_frequency import AverageTFRArray | ||
|
||
from mne_connectivity import seed_target_indices, spectral_connectivity_epochs | ||
|
||
|
@@ -92,7 +93,8 @@ | |
|
||
layout = mne.find_layout(epochs.info, "meg") # use full layout | ||
|
||
tfr = AverageTFR(epochs.info, con.get_data(), times, freqs, len(epochs)) | ||
# Note that users of mne < 1.7 should use the `AverageTFR` class | ||
tfr = AverageTFRArray(epochs.info, con.get_data(), times, freqs, nave=len(epochs)) | ||
tfr.plot_topo(fig_facecolor="w", font_color="k", border="k") | ||
|
||
|
||
|