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
126 stars 83 forks source link

read_raw_bids should read digitization files #203

Open sappelhoff opened 5 years ago

sappelhoff commented 5 years ago

This is currently not implemented.

Our _read_raw function does accept the respective arguments to read a digitized montage:

https://github.com/mne-tools/mne-bids/blob/0fa987edeef36fed8dfc04f04c50224900158f8f/mne_bids/read.py#L38-L41

and while _read_raw gets called in read_raw_bids, that function does NOT accept the needed arguments:

https://github.com/mne-tools/mne-bids/blob/0fa987edeef36fed8dfc04f04c50224900158f8f/mne_bids/read.py#L80-L82

EDIT below

NOTE: All necessary auxilliary files (e.g., headshape, elp, ..) for the raw reader functions in MNE-Python SHOULD be extracted from BIDS (coordsystem.json, electrodes.tsv, ...) --> That's the point of this PR.

jasmainak commented 4 years ago

@sappelhoff I think this is also something that you can look into when you have time. It would be a good addition and it would allow people to make topomaps for EEG. And if there is no digitized montage, you can read a standard montage using the channels in channels.tsv

adam2392 commented 4 years ago

This is a clarifying question regarding @sappelhoff's question https://github.com/mne-tools/mne-bids/pull/416#issuecomment-632552024

What is a digitization file you are referring to? I'm assuming you mean files that use the save function here https://mne.tools/dev/generated/mne.channels.DigMontage.html#mne.channels.DigMontage.save? If so, then no currently #416 doesn't address digitization files, but it can now get very close. I'm sure if someone tackles it, then within the dig.py file, they can fit another function to read the digitization files instead of electrodes.tsv.

jasmainak commented 4 years ago

sometimes people actually record the actual location of the electrodes on the head instead of using a standard montage. This is saved in a digitization file. There is a long and confusing history of digitized files vs regular montage files in MNE-Python. In BIDS you don't want to share montage, but only digitized electrodes