@@ -1829,7 +1829,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
1829
1829
of the wavelet is determined by the ``sigma`` parameter, which gives the
1830
1830
standard deviation of the wavelet's Gaussian envelope (our wavelets extend to
1831
1831
±5 standard deviations to ensure values very close to zero at the endpoints).
1832
- Some authors (e.g., :footcite:`Cohen2019`) recommend specifying and reporting
1832
+ Some authors (e.g., :footcite:t: `Cohen2019`) recommend specifying and reporting
1833
1833
wavelet duration in terms of the full-width half-maximum (FWHM) of the
1834
1834
wavelet's Gaussian envelope. The FWHM is related to ``sigma`` by the following
1835
1835
identity: :math:`\mathrm{FWHM} = \sigma \times 2 \sqrt{2 \ln{2}}` (or the
@@ -1852,7 +1852,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
1852
1852
frequency in ``freqs``. If you want different FWHM values at each frequency,
1853
1853
do the same computation with ``desired_fwhm`` as an array of the same shape as
1854
1854
``freqs``.
1855
- """ # noqa E501
1855
+ """
1856
1856
1857
1857
# %%
1858
1858
# G
@@ -2344,7 +2344,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
2344
2344
] = """
2345
2345
label_tc : array | list (or generator) of array, shape (n_labels[, n_orient], n_times)
2346
2346
Extracted time course for each label and source estimate.
2347
- """ # noqa: E501
2347
+ """
2348
2348
2349
2349
docdict [
2350
2350
"labels_eltc"
@@ -2668,10 +2668,9 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
2668
2668
"""
2669
2669
2670
2670
docdict [
2671
- "morlet_notes "
2671
+ "morlet_reference "
2672
2672
] = """
2673
- The Morlet wavelets follow the formulation in
2674
- :footcite:`Tallon-BaudryEtAl1997`.
2673
+ The Morlet wavelets follow the formulation in :footcite:t:`Tallon-BaudryEtAl1997`.
2675
2674
"""
2676
2675
2677
2676
docdict [
@@ -4178,7 +4177,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
4178
4177
4179
4178
.. versionadded:: 0.20
4180
4179
.. versionchanged:: 1.1 Added ``'eeglab'`` option.
4181
- """ # noqa E501
4180
+ """
4182
4181
4183
4182
docdict [
4184
4183
"split_naming"
@@ -4438,8 +4437,8 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
4438
4437
"""
4439
4438
4440
4439
docdict [
4441
- "temporal-window_tfr_notes "
4442
- ] = r """
4440
+ "temporal_window_tfr_intro "
4441
+ ] = """
4443
4442
In spectrotemporal analysis (as with traditional fourier methods),
4444
4443
the temporal and spectral resolution are interrelated: longer temporal windows
4445
4444
allow more precise frequency estimates; shorter temporal windows "smear"
@@ -4457,18 +4456,43 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
4457
4456
smoothing increases with frequency.*
4458
4457
Source: `FieldTrip tutorial: Time-frequency analysis using Hanning window,
4459
4458
multitapers and wavelets <https://www.fieldtriptoolbox.org/tutorial/timefrequencyanalysis>`_.
4459
+ """ # noqa: E501
4460
+
4461
+ docdict [
4462
+ "temporal_window_tfr_morlet_notes"
4463
+ ] = r"""
4464
+ In MNE-Python, the length of the Morlet wavelet is affected by the arguments
4465
+ ``freqs`` and ``n_cycles``, which define the frequencies of interest
4466
+ and the number of cycles, respectively. For the time-frequency representation,
4467
+ the length of the wavelet is defined such that both tails of
4468
+ the wavelet extend five standard deviations from the midpoint of its Gaussian
4469
+ envelope and that there is a sample at time zero.
4470
+
4471
+ The length of the wavelet is thus :math:`10\times\mathtt{sfreq}\cdot\sigma-1`,
4472
+ which is equal to :math:`\frac{5}{\pi} \cdot \frac{\mathtt{n\_cycles} \cdot
4473
+ \mathtt{sfreq}}{\mathtt{freqs}} - 1`, where
4474
+ :math:`\sigma = \frac{\mathtt{n\_cycles}}{2\pi f}` corresponds to the standard
4475
+ deviation of the wavelet's Gaussian envelope. Note that the length of the
4476
+ wavelet must not exceed the length of your signal.
4477
+
4478
+ For more information on the Morlet wavelet, see :func:`mne.time_frequency.morlet`.
4479
+ """
4460
4480
4461
- In MNE-Python, the temporal window length is defined by the arguments ``freqs``
4462
- and ``n_cycles``, respectively defining the frequencies of interest and the
4463
- number of cycles: :math:`T = \frac{\mathtt{n\_cycles}}{\mathtt{freqs}}`
4481
+ docdict [
4482
+ "temporal_window_tfr_multitaper_notes"
4483
+ ] = r"""
4484
+ In MNE-Python, the multitaper temporal window length is defined by the arguments
4485
+ ``freqs`` and ``n_cycles``, respectively defining the frequencies of interest
4486
+ and the number of cycles: :math:`T = \frac{\mathtt{n\_cycles}}{\mathtt{freqs}}`
4464
4487
4465
4488
A fixed number of cycles for all frequencies will yield a temporal window which
4466
4489
decreases with frequency. For example, ``freqs=np.arange(1, 6, 2)`` and
4467
4490
``n_cycles=2`` yields ``T=array([2., 0.7, 0.4])``.
4468
4491
4469
4492
To use a temporal window with fixed length, the number of cycles has to be
4470
4493
defined based on the frequency. For example, ``freqs=np.arange(1, 6, 2)`` and
4471
- ``n_cycles=freqs / 2`` yields ``T=array([0.5, 0.5, 0.5])``.""" # noqa: E501
4494
+ ``n_cycles=freqs / 2`` yields ``T=array([0.5, 0.5, 0.5])``.
4495
+ """
4472
4496
4473
4497
_theme = """\
4474
4498
theme : str | path-like
0 commit comments