- MNE version: 0.24.0
- operating system: Windows 10
I have been trying to run some source space connectivity analysis on the HCP dataset. I tried it on multiple platforms, e.g., FieldTrip and Brainstorm, and I found that the MNE style (Pythonic) fit my taste the most. Also, there are more documentation and support here, so I want to switch my analysis pipeline completely to MNE.
However, I ran into a few problems.
- I found a package MNE-HCP (MNE-HCP — MNE-HCP 0.1.dev12 documentation) that imports HCP data into MNE data structure, but this package haven’t been maintained for a long time. When I tried to load the preprocessed data using the example code
raw = hcp.read_epochs('100307', 'rest', hcp_path=hcp_path), it throw me an error, showing the following message:
... 609 # XXX hack for now due to issue with EpochsArray constructor 610 # cf https://github.com/mne-tools/mne-hcp/issues/9 --> 611 epochs.times = times 612 return epochs 613 AttributeError: can't set attribute
I am guessing this is because in an earlier version of MNE, it allows user to directly set the epoch attributes, but the current version does not support this anymore. The package documentation does not specify which version of MNE it supports. There is a similar thread someone put up a couple years ago here: Source Modeling HCP data in MNE - #2 by system, but I don’t think it has been solved already. Any thoughts on how I should fix this?
- Sensor registration. I wasn’t able to load the preprocessed epoch data, so I tried the raw data. I successfully loaded
raw = hcp.read_raw('100307', 'rest', hcp_path=hcp_path)to MNE, and I used
raw.plot_psd(fmax=200)to plot a spectral density plot. The signals are nicely plotted, however, I notice a wired rotation of the sensor location:
You can see in the upper right hand corner, there is a 90 degrees clockwise rotation of the helmet.
I also tried to just plot the sensor locations using this blog of code from one of the tutorials:
import matplotlib.pyplot as plt fig = plt.figure() ax2d = fig.add_subplot(121) ax3d = fig.add_subplot(122, projection='3d') raw.plot_sensors(ch_type='mag', axes=ax2d) raw.plot_sensors(ch_type='mag', axes=ax3d, kind='3d') ax3d.view_init(azim=70, elev=15)
It gives me this:
My guess is that there is some information missing from HCP that MNE-HCP is not able to correctly place the location of the sensors. Any thoughts about what the issue could be? I am afraid that if I just run any analysis without doing this type of sanity check, non of the result will make sense.
I will come to the office hours on discord tomorrow (2/18/2022) and maybe get a more direct answer to this from the core developers. This MNE-HCP package seems quite important and I am not sure why it is not maintained anymore. I am also a programmer myself (although not as experienced as a lot of the developers here), but I can help contributing if necessary as it is also very crucial for my research. Let me know if there is anything I can do to fix this.