mne-tools / mne-bids

MNE-BIDS is a Python package that allows you to read and write BIDS-compatible datasets with the help of MNE-Python.
https://mne.tools/mne-bids/
BSD 3-Clause "New" or "Revised" License
131 stars 85 forks source link

read_raw_bids can't create events if taskname includes decimal dot #1183

Closed TilmanKalthoff closed 10 months ago

TilmanKalthoff commented 10 months ago

For consistency in our project we would like to include a decimal dot in one of our task names (~"taskname0.5Hz"). The data loads correctly, however from -

raw = read_raw_bids(bids_path) events, event_dict = mne.events_from_annotations(raw)

the event_dict is empty. when renaming task in all files to "taskname05Hz, the events provided in the .tsv file are correctly passed to the event_dict.

Is this solely an issue for events, or for bids in general?

welcome[bot] commented 10 months ago

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

sappelhoff commented 10 months ago

Hi, thanks for the report!

Is this solely an issue for events, or for bids in general?

The BIDS task entity MUST be alphanumeric, as described in the specification here: https://bids-specification.readthedocs.io/en/latest/common-principles.html#definitions (see point 12).

I don't know why mne-bids partially succeeds in reading the data, but if your BIDS dataset is not valid, then I don't think there is a lot of fixing we can/should do in mne-bids.