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

MNE-Python channel unit warnings should be suppressed #1100

Closed
joe-rabbit opened this issue Nov 14, 2022 · 13 comments · Fixed by #1282
Closed

MNE-Python channel unit warnings should be suppressed #1100

joe-rabbit opened this issue Nov 14, 2022 · 13 comments · Fixed by #1282
Labels
Milestone

Comments

@joe-rabbit
Copy link

joe-rabbit commented Nov 14, 2022

The original issue was resolved, but a second issue emerged on this thread. Skip to this comment and read on from there. I've hidden the original problem in "details". (signed, @drammock)

Description of the problem

Hello, I am new to mne and have a problem with this dataset.

It shows
ValueError: invalid literal for int() with base 10: ''

Steps to reproduce

`datatype='eeg'
subject='024'
task='med1breath'
suffix='eeg'
bids_path=BIDSPath(subject=subject,task=task,suffix=suffix,datatype=datatype,root=bids_root)
sidecar_path=bids_path.copy().update(extension='.json')
raw = read_raw_bids(bids_path=bids_path)
`

Link to data

doi:10.18112/openneuro.ds003969.v1.0.0]

Expected results

Reads file

Actual results

image

Additional information

Platform: Windows-10-10.0.22000-SP0
Python: 3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)]
Executable: C:\Users\josep\anaconda3\python.exe
CPU: AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD: 16 cores
Memory: 15.4 GB

mne: 1.2.2
numpy: 1.20.3 {MKL 2021.4-Product with 8 threads}
scipy: 1.7.1
matplotlib: 3.4.3 {backend=module://matplotlib_inline.backend_inline}

sklearn: 0.24.2
numba: 0.54.1
nibabel: Not found
nilearn: Not found
dipy: Not found
openmeeg: Not found
cupy: Not found
pandas: 1.3.4
pyvista: Not found
pyvistaqt: Not found
ipyvtklink: Not found
vtk: Not found
qtpy: 1.10.0 {PyQt5=5.9.7}
ipympl: Not found
pyqtgraph: Not found
pooch: v1.6.0

mne_bids: 0.11.1
mne_nirs: Not found
mne_features: Not found
mne_qt_browser: Not found
mne_connectivity: Not found
mne_icalabel: Not found

@joe-rabbit joe-rabbit added the bug label Nov 14, 2022
@welcome

This comment was marked as outdated.

@mscheltienne

This comment was marked as outdated.

@joe-rabbit

This comment was marked as outdated.

@mscheltienne

This comment was marked as outdated.

@joe-rabbit
Copy link
Author

image
What does it mean by this Warning.
and thank you it works!!

@mscheltienne
Copy link
Member

mscheltienne commented Nov 15, 2022

I guess that the units have changed compared to older versions? I am not super familiar with this part, but I think it's linked to #1059
@hoechenberger I'll let you comment on this if you want ;)

@drammock
Copy link
Member

when a channel type gets changed (in this case presumably from "EEG" to "Temp") then these warnings happen. Same with GSR1 and GSR2, which are skin conductance (in Siemens). All of them were apparently stored as "eeg" and MNE is changing their channel type based on the channel names, but it wants to make sure you know that in case it guessed wrong.

@joe-rabbit
Copy link
Author

Oh got it thank you

@hoechenberger
Copy link
Member

This issue should actually be transferred over to MNE-BIDS. I believe what's happening is in fact what @drammock said, except that the channel types aren't changed based on their name but based on the BIDS metadata. That is, I would think that we actually should suppress these warnings, as MNE-BIDS is doing exactly what it is supposed to do -- hence there is no need at all to emit a warning!

@welcome
Copy link

welcome bot commented Nov 15, 2022

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽‍♂️

@drammock drammock transferred this issue from mne-tools/mne-python Nov 15, 2022
@drammock
Copy link
Member

This issue should actually be transferred over to MNE-BIDS.

done

@drammock drammock changed the title ValueError: invalid literal for int() with base 10: '' MNE-Python channel unit warnings should be suppressed Nov 15, 2022
@sappelhoff
Copy link
Member

sappelhoff commented Mar 8, 2023

Should probably be fixed here:

raw.set_channel_types(channel_type_bids_mne_map_available_channels)

@hoechenberger
Copy link
Member

hoechenberger commented May 6, 2023

It's now easy to suppress these warnings in MNE, and that change will be included in MNE 1.4.

Once MNE 1.5 (!) is out, we can safely switch over to that new functionality, as we intend to support the latest two versions of MNE in MNE-BIDS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

5 participants