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

Mismatch of coord systems between electrodes and channels/events

Open laemtl opened this issue 2 years ago • 5 comments

Description of the problem

Channel//Epoch data are exported in the ALS coord space to follow the EEGLAB specs. On the other hand, electrode data are exported in the head/captrak coord space.

Is there any reason to not export the electrode data in the same space?

Steps to reproduce

Exporting an EEGLAB dataset using
write_raw_bids(..., allow_preload=False, overwrite=False, verbose=False)

Link to data

No response

Expected results

Electrode data in the EEGLAB space

Actual results

Electrode data in the Captrak space

Additional information

Platform: Windows-10-10.0.19041-SP0 Python: 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] Executable: C:\Users\Lae\Documents\hbcd-eeg2bids\Scripts\python.exe CPU: Intel64 Family 6 Model 142 Stepping 9, GenuineIntel: 4 cores Memory: Unavailable (requires "psutil" package) mne: 1.2.0 numpy: 1.20.3 {OpenBLAS 0.3.13.dev with 4 threads} scipy: 1.9.2 matplotlib: 3.6.1 {backend=TkAgg}

sklearn: 1.1.2 numba: 0.56.2 nibabel: Not found nilearn: Not found dipy: Not found openmeeg: Not found cupy: Not found pandas: 1.5.0 pyvista: Not found pyvistaqt: Not found ipyvtklink: Not found vtk: Not found qtpy: Not found ipympl: Not found pyqtgraph: Not found pooch: v1.6.0

mne_bids: 0.10 mne_nirs: Not found mne_features: 0.2.1 mne_qt_browser: Not found mne_connectivity: Not found mne_icalabel: Not found

laemtl avatar Oct 14 '22 19:10 laemtl

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

welcome[bot] avatar Oct 14 '22 19:10 welcome[bot]

@agramfort

laemtl avatar Oct 14 '22 19:10 laemtl

I think that's one for @sappelhoff to tackle 🤠

hoechenberger avatar Oct 14 '22 21:10 hoechenberger

I think that's a classic case of "it was complicated and we only implemented what users needed at that time". I am afraid this will need a deep dive into the code base ...

sappelhoff avatar Oct 15 '22 08:10 sappelhoff

@laemtl technically I think we can do what we do but coordinate systems should be given in the sidecar files. Now I don't know if we do it properly.

@laemtl can you share a folder with some data and a script to replicate / investigate and if possible use one of the mne demo datasets. We have some data in CTF format eg https://mne.tools/dev/auto_tutorials/io/60_ctf_bst_auditory.html

agramfort avatar Oct 16 '22 09:10 agramfort