I have time series data processed in Matlab/Brainstorm and source reconstructed and projected into ROIs. I would like to import this data into a simple structure in MNE v1.5 on MacOS.
I created a minimal code example to demonstrate the issue I’m running into:
import numpy as np
import mne
sfreq = 1000
times = np.arange(0, 10, 0.001)
sin = np.sin(times * 10)
cos = np.cos(times * 10)
sinX2 = sin * 2
cosX2 = cos * 2
data = np.array([sin, cos, sinX2, cosX2])
ch_types = ['misc', 'misc', 'misc', 'misc']
ch_names = ['ROI1', 'ROI2', 'ROI3', 'ROI4']
info = mne.create_info(ch_names=ch_names, sfreq=sfreq, ch_types=ch_types)
raw = mne.io.RawArray(data, info)
spectrum = raw.compute_psd(picks="misc")
spectrum.plot(picks="misc")
When I try to plot the spectrum, it does not seem to work. I try to explicitly specify the names picks=ch_names
as well (it didn’t work).
How can I better specify the channel types in the info structure to represent reconstructed ROI time series data? Any suggestions on how to properly import and plot this type of data in MNE would be appreciated.
EDIT: The code is working now.