mne-bids icon indicating copy to clipboard operation
mne-bids copied to clipboard

read_raw_bids should read digitization files

Open sappelhoff opened this issue 5 years ago • 3 comments

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.

sappelhoff avatar May 11 '19 14:05 sappelhoff

@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

jasmainak avatar Jul 12 '19 17:07 jasmainak

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.

adam2392 avatar May 22 '20 13:05 adam2392

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

jasmainak avatar May 23 '20 15:05 jasmainak