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

[DOC] Add methods list to epochs function and fix formatting of list in time function #171

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions mne_connectivity/spectral/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,26 @@ def spectral_connectivity_epochs(
method : str | list of str
Connectivity measure(s) to compute. These can be ``['coh', 'cohy',
'imcoh', 'mic', 'mim', 'plv', 'ciplv', 'ppc', 'pli', 'dpli', 'wpli',
'wpli2_debiased', 'gc', 'gc_tr']``. Multivariate methods (``['mic',
'mim', 'gc', 'gc_tr]``) cannot be called with the other methods.
'wpli2_debiased', 'gc', 'gc_tr']``. These are:

* %(coh)s
* %(cohy)s
* %(imcoh)s
* %(mic)s
* %(mim)s
* %(plv)s
* %(ciplv)s
* %(ppc)s
* %(pli)s
* %(pli2_unbiased)s
* %(dpli)s
* %(wpli)s
* %(wpli2_debiased)s
* %(gc)s
* %(gc_tr)s

Multivariate methods (``['mic', 'mim', 'gc', 'gc_tr]``) cannot be
called with the other methods.
indices : tuple of array | None
Two arrays with indices of connections for which to compute
connectivity. If a bivariate method is called, each array for the seeds
Expand Down
25 changes: 13 additions & 12 deletions mne_connectivity/spectral/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,19 @@ def spectral_connectivity_time(
Only the frequencies within the range specified by ``fmin`` and
``fmax`` are used.
method : str | list of str
Connectivity measure(s) to compute. These can be
``['coh', 'mic', 'mim', 'plv', 'ciplv', 'pli', 'wpli', 'gc',
'gc_tr']``. These are:
* 'coh' : Coherence
* 'mic' : Maximised Imaginary part of Coherency (MIC)
* 'mim' : Multivariate Interaction Measure (MIM)
* 'plv' : Phase-Locking Value (PLV)
* 'ciplv' : Corrected imaginary Phase-Locking Value
* 'pli' : Phase-Lag Index
* 'wpli' : Weighted Phase-Lag Index
* 'gc' : State-space Granger Causality (GC)
* 'gc_tr' : State-space GC on time-reversed signals
Connectivity measure(s) to compute. These can be ``['coh', 'mic',
'mim', 'plv', 'ciplv', 'pli', 'wpli', 'gc', 'gc_tr']``. These are:

* %(coh)s
* %(mic)s
* %(mim)s
* %(plv)s
* %(ciplv)s
* %(pli)s
* %(wpli)s
* %(gc)s
* %(gc_tr)s

Multivariate methods (``['mic', 'mim', 'gc', 'gc_tr]``) cannot be
called with the other methods.
average : bool
Expand Down
16 changes: 16 additions & 0 deletions mne_connectivity/utils/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@
as xarray ``attrs``.
"""

docdict["coh"] = "'coh' : Coherence"
docdict["cohy"] = "'cohy' : Coherency"
docdict["imcoh"] = "'imcoh' : Imaginary part of coherency"
docdict["mic"] = "'mic' : Maximised Imaginary part of Coherency (MIC)"
docdict["mim"] = "'mim' : Multivariate Interaction Measure (MIM)"
docdict["plv"] = "'plv' : Phase-Locking Value (PLV)"
docdict["ciplv"] = "'ciplv' : Corrected Imaginary PLV (ciPLV)"
docdict["ppc"] = "'ppc' : Pairwise Phase Consistency (PPC)"
docdict["pli"] = "'pli' : Phase Lag Index (PLI)"
docdict["pli2_unbiased"] = "'pli2_unbiased' : Unbiased estimator of squared PLI"
docdict["dpli"] = "'dpli' : Directed PLI (DPLI)"
docdict["wpli"] = "'wpli' : Weighted PLI (WPLI)"
docdict["wpli2_debiased"] = "'wpli2_debiased' : Debiased estimator of squared WPLI"
docdict["gc"] = "'gc' : State-space Granger Causality (GC)"
docdict["gc_tr"] = "'gc_tr' : State-space GC on time-reversed signals"

# Downstream container variables
docdict[
"freqs"
Expand Down
Loading