Skip to content

Conversation

@cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Oct 22, 2024

Fixes #12907.

Copy link
Contributor Author

@cbrnr cbrnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the issue encountered e.g. with this dataset.

However, and this is likely unrelated, I was wondering why the log contains next(self.gen):

>>> raw = mne.io.read_raw("/Users/clemens/Downloads/S01_MI/motorimagination_subject1_run1.gdf")
Extracting EDF parameters from /Users/clemens/Downloads/S01_MI/motorimagination_subject1_run1.gdf...
GDF file detected
Setting channel info structure...
Could not determine channel type of the following channels, they will be set as EEG:
F3, F1, Fz, F2, F4, FFC5h, FFC3h, FFC1h, FFC2h, FFC4h, FFC6h, FC5, FC3, FC1, FCz, FC2, FC4, FC6, FTT7h, FCC5h, FCC3h, FCC1h, FCC2h, FCC4h, FCC6h, FTT8h, C5, C3, C1, Cz, C2, C4, C6, TTP7h, CCP5h, CCP3h, CCP1h, CCP2h, CCP4h, CCP6h, TTP8h, CP5, CP3, CP1, CPz, CP2, CP4, CP6, CPP5h, CPP3h, CPP1h, CPP2h, CPP4h, CPP6h, P3, P1, Pz, P2, P4, PPO1h, PPO2h, eog-l, eog-m, eog-r, thumb_near, thumb_far, thumb_index, index_near, index_far, index_middle, middle_near, middle_far, middle_ring, ring_near, ring_far, ring_little, litte_near, litte_far, thumb_palm, wrist_bend, roll, pitch, gesture, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy
Creating raw.info structure...
/Users/clemens/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/contextlib.py:144: RuntimeWarning: Channel names are not unique, found duplicates for: {'armeodummy'}. Applying running numbers for duplicates.
  next(self.gen)

Or is it just my setup?

@larsoner
Copy link
Member

Thanks @cbrnr !

@cbrnr cbrnr deleted the gdf-np2 branch October 23, 2024 05:34
@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 23, 2024

I forgot to add the "backport-candidate" label to this PR (I just slapped it on the issue), so I assume this has not been backported automatically?

@larsoner larsoner added the backport-candidate on-merge: backport to maint/1.11 label Oct 23, 2024
@larsoner
Copy link
Member

@meeseeksdev backport to maint/1.8

meeseeksmachine pushed a commit to meeseeksmachine/mne-python that referenced this pull request Oct 23, 2024
larsoner pushed a commit that referenced this pull request Oct 23, 2024
Co-authored-by: Clemens Brunner <clemens.brunner@gmail.com>
larsoner added a commit to larsoner/mne-python that referenced this pull request Oct 28, 2024
* upstream/main: (824 commits)
  Add `psd_args` to `plot_ica_sources` and `ICA.plot_sources` (mne-tools#12912)
  Fix GDF NumPy >= 2 (mne-tools#12909)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#12908)
  ENH: Improve report usability (mne-tools#12901)
  MAINT: Avoid problematic PySide6 (mne-tools#12902)
  Sync README dependencies with pyproject.toml (mne-tools#12890)
  remove trailing slash from pybv base URL [ci skip] (mne-tools#12892)
  Cast tuple of filenames to list to improve error handling (mne-tools#12891)
  Website (mne-tools#12885)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#12888)
  BUG: Fix bugs with coreg (mne-tools#12884)
  Bump mamba-org/setup-micromamba from 1 to 2 in the actions group (mne-tools#12887)
  Update spacing for comments in pyproject.toml (mne-tools#12886)
  make HTML repr for Forward match others (mne-tools#12883)
  MAINT: Linkchecks [circle deploy] (mne-tools#12882)
  Update roadmap (mne-tools#12872)
  [MRG] Require good and bad channels when creating a SpectrumArray object (mne-tools#12877)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#12879)
  MAINT: Update code credit (mne-tools#12880)
  BUG: Fix bug with Path casting (mne-tools#12878)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-candidate on-merge: backport to maint/1.11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GDF reader incompatible with NumPy >= 2

3 participants