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