Repository: mne-tools/mne-python

Issue:
Document correctly that plot_ica_overlay() for Raw only plots the first 3 seconds of data
See https://mne.discourse.group/t/ica-plot-overlay-pan-forward-and-missing-data/2781



Discussion:

Resolving patch:
diff --git a/mne/viz/ica.py b/mne/viz/ica.py
--- a/mne/viz/ica.py
+++ b/mne/viz/ica.py
@@ -44,11 +44,11 @@ def plot_ica_sources(ica, inst, picks=None, start=None,
     inst : instance of mne.io.Raw, mne.Epochs, mne.Evoked
         The object to plot the sources from.
     %(picks_base)s all sources in the order as fitted.
-    start : int
-        X-axis start index. If None, from the beginning.
-    stop : int
-        X-axis stop index. If None, next 20 are shown, in case of evoked to the
-        end.
+    start : int | None
+        X-axis start index. If None (default), from the beginning.
+    stop : int | None
+        X-axis stop index. If None (default), next 20 are shown, in case of
+        evoked to the end.
     title : str | None
         The window title. If None a default is provided.
     show : bool
@@ -732,10 +732,10 @@ def plot_ica_overlay(ica, inst, exclude=None, picks=None, start=None,
         The components marked for exclusion. If None (default), ICA.exclude
         will be used.
     %(picks_base)s all channels that were included during fitting.
-    start : int
-        X-axis start index. If None from the beginning.
-    stop : int
-        X-axis stop index. If None to the end.
+    start : int | None
+        X-axis start index. If None (default) from the beginning.
+    stop : int | None
+        X-axis stop index. If None (default) to 3.0s.
     title : str
         The figure title.
     show : bool
diff --git a/tutorials/discussions/plot_background_statistics.py b/tutorials/discussions/plot_background_statistics.py
--- a/tutorials/discussions/plot_background_statistics.py
+++ b/tutorials/discussions/plot_background_statistics.py
@@ -41,9 +41,9 @@
 # some probability (e.g., p < 0.05). This probability is also called the
 # significance level :math:`\alpha`.
 # To think about what this means, let's follow the illustrative example from
-# [1]_ and construct a toy dataset consisting of a 40 x 40 square with a
-# "signal" present in the center with white noise added and a Gaussian
-# smoothing kernel applied.
+# :footcite:`RidgwayEtAl2012` and construct a toy dataset consisting of a
+# 40 x 40 square with a "signal" present in the center with white noise added
+# and a Gaussian smoothing kernel applied.
 
 width = 40
 n_subjects = 10
@@ -168,7 +168,8 @@ def plot_t_p(t, p, title, mcc, axes=None):
 # "Hat" variance adjustment
 # ~~~~~~~~~~~~~~~~~~~~~~~~~
 # The "hat" technique regularizes the variance values used in the t-test
-# calculation [1]_ to compensate for implausibly small variances.
+# calculation :footcite:`RidgwayEtAl2012` to compensate for implausibly small
+# variances.
 ts.append(ttest_1samp_no_p(X, sigma=sigma))
 ps.append(stats.distributions.t.sf(np.abs(ts[-1]), len(X) - 1) * 2)
 titles.append(r'$\mathrm{t_{hat}}$')
@@ -460,7 +461,7 @@ def plot_t_p(t, p, title, mcc, axes=None):
 # "Hat" variance adjustment
 # ~~~~~~~~~~~~~~~~~~~~~~~~~
 # This method can also be used in this context to correct for small
-# variances [1]_:
+# variances :footcite:`RidgwayEtAl2012`:
 titles.append(r'$\mathbf{C_{hat}}$')
 stat_fun_hat = partial(ttest_1samp_no_p, sigma=sigma)
 t_hat, clusters, p_values, H0 = permutation_cluster_1samp_test(
@@ -482,7 +483,8 @@ def plot_t_p(t, p, title, mcc, axes=None):
 # TFCE eliminates the free parameter initial ``threshold`` value that
 # determines which points are included in clustering by approximating
 # a continuous integration across possible threshold values with a standard
-# `Riemann sum <https://en.wikipedia.org/wiki/Riemann_sum>`__ [2]_.
+# `Riemann sum <https://en.wikipedia.org/wiki/Riemann_sum>`__
+# :footcite:`SmithNichols2009`.
 # This requires giving a starting threshold ``start`` and a step
 # size ``step``, which in MNE is supplied as a dict.
 # The smaller the ``step`` and closer to 0 the ``start`` value,
@@ -652,12 +654,6 @@ def plot_t_p(t, p, title, mcc, axes=None):
 #
 # References
 # ----------
-# .. [1] Ridgway et al. 2012, "The problem of low variance voxels in
-#        statistical parametric mapping; a new hat avoids a 'haircut'",
-#        NeuroImage. 2012 Feb 1;59(3):2131-41.
-#
-# .. [2] Smith and Nichols 2009, "Threshold-free cluster enhancement:
-#        addressing problems of smoothing, threshold dependence, and
-#        localisation in cluster inference", NeuroImage 44 (2009) 83-98.
+# .. footbibliography::
 #
 # .. include:: ../../links.inc


Test patch: