Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Bug with single channel annot #316

Open
larsoner opened this issue Mar 3, 2025 · 0 comments
Open

BUG: Bug with single channel annot #316

larsoner opened this issue Mar 3, 2025 · 0 comments

Comments

@larsoner
Copy link
Member

larsoner commented Mar 3, 2025

Locally in MNE-Python dev I see:

$ python -ui tutorials/preprocessing/90_eyetracking_data.py
('xpos_right', 'ypos_right', 'pupil_right')
number of calibrations: 1
Calibration |
  onset: -11.543 seconds
  model: HV5
  eye: right
  average error: 0.71 degrees
  max error: 0.99 degrees
  screen size: None meters
  screen distance: None meters
  screen resolution: None pixels

offset of the first calibration point: 0.72
offset for each calibration point: [0.72 0.42 0.99 0.59 0.49]
x-coordinate for each calibration point: [ 960.  960.  960.  288. 1631.]
/home/larsoner/python/mne-python/mne/event.py:502: RuntimeWarning: invalid value encountered in cast
  data = data.astype(np.int64)
Traceback (most recent call last):
  File "/home/larsoner/python/mne-python/tutorials/preprocessing/90_eyetracking_data.py", line 208, in <module>
    raw_et.plot(
  File "/home/larsoner/python/mne-python/mne/io/base.py", line 1943, in plot
    return plot_raw(
           ^^^^^^^^^
  File "<decorator-gen-208>", line 12, in plot_raw
  File "/home/larsoner/python/mne-python/mne/viz/raw.py", line 406, in plot_raw
    fig = _get_browser(show=show, block=block, **params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/larsoner/python/mne-python/mne/viz/_figure.py", line 704, in _get_browser
    fig = backend._init_browser(**kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/larsoner/python/mne-qt-browser/mne_qt_browser/_pg_figure.py", line 5716, in _init_browser
    browser = MNEQtBrowser(**kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/larsoner/python/mne-qt-browser/mne_qt_browser/_pg_figure.py", line 307, in func
    meth(self, *args, **kwargs)
  File "/home/larsoner/python/mne-qt-browser/mne_qt_browser/_pg_figure.py", line 3885, in __init__
    self._init_annot_mode()
  File "/home/larsoner/python/mne-qt-browser/mne_qt_browser/_pg_figure.py", line 5038, in _init_annot_mode
    region = self._add_region(
             ^^^^^^^^^^^^^^^^^
  File "/home/larsoner/python/mne-qt-browser/mne_qt_browser/_pg_figure.py", line 4927, in _add_region
    region = AnnotRegion(
             ^^^^^^^^^^^^
  File "/home/larsoner/python/mne-qt-browser/mne_qt_browser/_pg_figure.py", line 2682, in __init__
    self._add_single_channel_annot(ch)
  File "/home/larsoner/python/mne-qt-browser/mne_qt_browser/_pg_figure.py", line 2736, in _add_single_channel_annot
    self.single_channel_annots[ch_name] = SingleChannelAnnot(
                                          ^^^^^^^^^^^^^^^^^^^
  File "/home/larsoner/python/mne-qt-browser/mne_qt_browser/_pg_figure.py", line 2592, in __init__
    self.ypos = ypos + np.array([-0.5, 0.5])
                ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
ValueError: operands could not be broadcast together with shapes (0,) (2,) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant