Extracting and saving data from epochs into seperate files

So I have understood how to annotate the raw data using epochs…
The next step is that, I want to extract data of each epoch and save them in seperate files in order to apply further analysis. How should I do that?

Mainly, I want to extract after applying source localization method and also get the data from each brain region and then save them. What is the appropriate method for that?

When working with MEG data, there are many channels… how to handle that as well?

Thanks in advance

  • MNE-Python version: 0.23.0
  • operating system: MacOS

If I understand correctly, you have Epochs and you want to do source localization on the epochs and then extract the activation in a specific brain region, and then save the data.

  1. mne.minimum_norm.apply_inverse_epochs — MNE 0.23.0 documentation
  2. get data from brain region and save it:
    a. mne.SourceEstimate.in_label() plus mne.SourceEstimate.save(), or
    b. mne.extract_label_time_course — MNE 0.23.0 documentation plus numpy.save

I don’t understand this part of your question… are you running out of memory?

1 Like

Thank you very much!! I understood!