Error exporting MEG sensor data to .mat using export_data function

Hello,

I am encountering an issue when trying to export MEG sensor data to a .mat file using the export_data function in Brainstorm. The error message I receive is the following:

** Error: Line 252: export_data
** out_fopen_spm
** MEG sensors are currently not supported by this function.
** Please contact us through the Brainstorm user forum to request this feature.
**
** Call stack:
** >export_data.m at 252
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@export_data,GetAllFilenames(bstNodes)) at 1582

I need to export the MEG data to a .mat file for further processing in Python. However, the function does not seem to support MEG sensors at the moment.

Could you please guide me on how to export MEG sensor data to a .mat file? Are there any alternative functions or workarounds available in Brainstorm?

Thank you in advance for your help!

Keep in mind that a .mat file in MATLAB is not strictly a "file format" in the traditional sense (like CSV or JSON) because it does not enforce a specific data structure. Instead, it is only a container for storing MATLAB variables.

The option that you are using is a .mat with the structure expected by SPM, which is not currently supported in Brainstorm.

You could export this raw data with .edf as file format and read that file in Python.

If you really want to export the data as a .mat file. First import the raw data in Brainstorm, then copy the imported data (which is already a .mat file).

https://neuroimage.usc.edu/brainstorm/Tutorials/Epoching#On_the_hard_drive