prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  use bibtex in plot_sensor_noise_level.py
  convert references in `examples/visualization/plot_sensor_noise_level.py` to use footcite / footbibliography
  
  
  </issue>
  <code>
  [start of examples/visualization/plot_sensor_noise_level.py]
  1 # -*- coding: utf-8 -*-
  2 """
  3 ======================================
  4 Show noise levels from empty room data
  5 ======================================
  6 
  7 This shows how to use :meth:`mne.io.Raw.plot_psd` to examine noise levels
  8 of systems. See [1]_ for an example.
  9 
  10 References
  11 ----------
  12 .. [1] Khan S, Cohen D (2013). Note: Magnetic noise from the inner wall of
  13    a magnetically shielded room. Review of Scientific Instruments 84:56101.
  14    https://doi.org/10.1063/1.4802845
  15 """
  16 # Author: Eric Larson <larson.eric.d@gmail.com>
  17 #
  18 # License: BSD (3-clause)
  19 
  20 import os.path as op
  21 import mne
  22 
  23 data_path = mne.datasets.sample.data_path()
  24 
  25 raw_erm = mne.io.read_raw_fif(op.join(data_path, 'MEG', 'sample',
  26                                       'ernoise_raw.fif'), preload=True)
  27 
  28 ###############################################################################
  29 # We can plot the absolute noise levels:
  30 raw_erm.plot_psd(tmax=10., average=True, spatial_colors=False,
  31                  dB=False, xscale='log')
  32
  [end of examples/visualization/plot_sensor_noise_level.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/examples/visualization/plot_sensor_noise_level.py b/examples/visualization/plot_sensor_noise_level.py
  --- a/examples/visualization/plot_sensor_noise_level.py
  +++ b/examples/visualization/plot_sensor_noise_level.py
  @@ -5,13 +5,7 @@
   ======================================
   
   This shows how to use :meth:`mne.io.Raw.plot_psd` to examine noise levels
  -of systems. See [1]_ for an example.
  -
  -References
  -----------
  -.. [1] Khan S, Cohen D (2013). Note: Magnetic noise from the inner wall of
  -   a magnetically shielded room. Review of Scientific Instruments 84:56101.
  -   https://doi.org/10.1063/1.4802845
  +of systems. See :footcite:`KhanCohen2013` for an example.
   """
   # Author: Eric Larson <larson.eric.d@gmail.com>
   #
  @@ -29,3 +23,8 @@
   # We can plot the absolute noise levels:
   raw_erm.plot_psd(tmax=10., average=True, spatial_colors=False,
                    dB=False, xscale='log')
  +###############################################################################
  +# References
  +# ----------
  +#
  +# .. footbibliography::
  
verification_info: {"golden_diff": "diff --git a/examples/visualization/plot_sensor_noise_level.py b/examples/visualization/plot_sensor_noise_level.py\n--- a/examples/visualization/plot_sensor_noise_level.py\n+++ b/examples/visualization/plot_sensor_noise_level.py\n@@ -5,13 +5,7 @@\n ======================================\n \n This shows how to use :meth:`mne.io.Raw.plot_psd` to examine noise levels\n-of systems. See [1]_ for an example.\n-\n-References\n-----------\n-.. [1] Khan S, Cohen D (2013). Note: Magnetic noise from the inner wall of\n-   a magnetically shielded room. Review of Scientific Instruments 84:56101.\n-   https://doi.org/10.1063/1.4802845\n+of systems. See :footcite:`KhanCohen2013` for an example.\n \"\"\"\n # Author: Eric Larson <larson.eric.d@gmail.com>\n #\n@@ -29,3 +23,8 @@\n # We can plot the absolute noise levels:\n raw_erm.plot_psd(tmax=10., average=True, spatial_colors=False,\n                  dB=False, xscale='log')\n+###############################################################################\n+# References\n+# ----------\n+#\n+# .. footbibliography::\n", "issue": "use bibtex in plot_sensor_noise_level.py\nconvert references in `examples/visualization/plot_sensor_noise_level.py` to use footcite / footbibliography\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\n======================================\nShow noise levels from empty room data\n======================================\n\nThis shows how to use :meth:`mne.io.Raw.plot_psd` to examine noise levels\nof systems. See [1]_ for an example.\n\nReferences\n----------\n.. [1] Khan S, Cohen D (2013). Note: Magnetic noise from the inner wall of\n   a magnetically shielded room. Review of Scientific Instruments 84:56101.\n   https://doi.org/10.1063/1.4802845\n\"\"\"\n# Author: Eric Larson <larson.eric.d@gmail.com>\n#\n# License: BSD (3-clause)\n\nimport os.path as op\nimport mne\n\ndata_path = mne.datasets.sample.data_path()\n\nraw_erm = mne.io.read_raw_fif(op.join(data_path, 'MEG', 'sample',\n                                      'ernoise_raw.fif'), preload=True)\n\n###############################################################################\n# We can plot the absolute noise levels:\nraw_erm.plot_psd(tmax=10., average=True, spatial_colors=False,\n                 dB=False, xscale='log')\n", "path": "examples/visualization/plot_sensor_noise_level.py"}]}