Skip to content

Commit

Permalink
[DOC] Add methods list to epochs function and fix formatting of lis…
Browse files Browse the repository at this point in the history
…t in `time` function (#171)
  • Loading branch information
tsbinns authored Feb 5, 2024
1 parent be17d09 commit 196a7fc
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 14 deletions.
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

0 comments on commit 196a7fc

Please sign in to comment.