Create raw-object using mat-file

:question: If you have a question or issue with MNE-Python, please include the following info:

  • MNE version: 1.6.1
  • operating system: Windows 10

Hi, I’m new to BCI and currently I’m dealing with a motor imagery task. Unfortunatly the data set is a mat-file. The structure has 3 fields: ‘signal’, ‘timeVector’ and ‘labels’. I already created the info and I know the labels. I tried following some mne tutorials but I have a huge problem dealing with the data format. Can anybody help me?

Best regards. :upside_down_face:

Hello @lily, can you you try reading the mat file into Python using pymatreader ?

1 Like

Ok Awesome:

  1. For the Signal you refer to of shape (501760, 26), I assume
    this is (n_samples, n_channels). Does that sound right to you?
  2. Have you looked at this tutorial? Specifically, you’ll need to pass your data into the RawArray constructor. RawArray expects the data shape to be (n_channels, n_samples), so If my assumption about #1 is right, then you need to do something like my_signal_array.T first.
2 Likes

Yes that works. “Creating RawArray with float64 data, n_channels=26, n_times=501760
Range : 0 … 501759 = 0.000 … 1959.996 secs” . But my raw.plot() is blank. :frowning:

Can you try raw.plot(scalings="auto")?

1 Like