From 1a8fb48580ce7a7df126793359f10125ba7400eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20M=2E=20K=C3=B6hler?= Date: Mon, 14 Oct 2024 21:11:39 +0200 Subject: [PATCH] [DOC] Improve documentation of freqs (#242) Co-authored-by: Daniel McCloy --- mne_connectivity/spectral/epochs.py | 15 ++++++++++----- pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/mne_connectivity/spectral/epochs.py b/mne_connectivity/spectral/epochs.py index 7ba0a154..a9cafc21 100644 --- a/mne_connectivity/spectral/epochs.py +++ b/mne_connectivity/spectral/epochs.py @@ -790,12 +790,15 @@ def spectral_connectivity_epochs( Spectrum estimation mode can be either: 'multitaper', 'fourier', or 'cwt_morlet'. Ignored if ``data`` is an :class:`~mne.time_frequency.EpochsSpectrum` object. - fmin : float | tuple of float + fmin : float | tuple of float | None The lower frequency of interest. Multiple bands are defined using - a tuple, e.g., (8., 20.) for two bands with 8Hz and 20Hz lower freq. + a tuple, e.g., (8., 20.) for two bands with 8 Hz and 20 Hz lower freq. + If ``None``, the frequency corresponding to 5 cycles based on the epoch + length is used. For example, with an epoch length of 1 sec, the lower + frequency would be 5 / 1 sec = 5 Hz. fmax : float | tuple of float The upper frequency of interest. Multiple bands are dedined using - a tuple, e.g. (13., 30.) for two band with 13Hz and 30Hz upper freq. + a tuple, e.g. (13., 30.) for two band with 13 Hz and 30 Hz upper freq. fskip : int Omit every "(fskip + 1)-th" frequency bin to decimate in frequency domain. @@ -828,8 +831,10 @@ def spectral_connectivity_epochs( bandwidth. Only used in 'multitaper' mode. Ignored if ``data`` is an :class:`~mne.time_frequency.EpochsSpectrum` object. cwt_freqs : array - Array of frequencies of interest. Only used in 'cwt_morlet' mode. Ignored if - ``data`` is an :class:`~mne.time_frequency.EpochsSpectrum` object. + Array of frequencies of interest. Only used in 'cwt_morlet' mode. Only + the frequencies within the range specified by ``fmin`` and ``fmax`` are + used. Ignored if ``data`` is an + :class:`~mne.time_frequency.EpochsSpectrum` object. cwt_n_cycles : float | array of float Number of cycles. Fixed number or one per frequency. Only used in 'cwt_morlet' mode. Ignored if ``data`` is an :class:`~mne.time_frequency.EpochsSpectrum` diff --git a/pyproject.toml b/pyproject.toml index 93d3ecfa..41a08e74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ doc = [ 'pooch', 'pydata-sphinx-theme==0.14.1', 'PyQt6', - 'sphinx', + 'sphinx!=8.1.0', 'sphinx-copybutton', 'sphinx-design', 'sphinx-gallery>=0.17.0',