Export preprocessed data with markers to SPM12 (not just volume/surface)

I am trying to export my preprocessed MEG data to SPM12. I used Brainstorm to preprocess my data and had to correct some spurious markers. Whenever I try to export to file (mat/dat) I get the following error message:

Error using export_data (line 252)
Error using out_fopen_spm (line 81)
MEG sensors are currently not supported by this function.
Please contact us through the Brainstorm user forum to request this feature.
Error in export_data (line 58)
        AllOutputs{1} = export_data(DataFile{1}, ChannelMat, ExportFile);

Error in tree_callbacks>@(h,ev)export_data(GetAllFilenames(bstNodes,'data')) (line 1653)
                    jMenuExport = gui_component('MenuItem', [], [], 'Export to file', IconLoader.ICON_SAVE, [],
                    @(h,ev)export_data(GetAllFilenames(bstNodes, 'data')));

Is there any way I can work around this and still export the continous data, rather than just surface or volume?

Many thanks


I didn't spend the time to write an export function to SPM for MEG recordings, since I was not sure in what context that would ever be used. Also, FieldTrip structures felt like a more natural way to exchange signals between Brainstorm and SPM.

From Brainstorm, you should be able to export the MEG signals to a FieldTrip structure, and use them directly in SPM.

Thank you. This works but quite a bit of information is missing, e.g., event markers and sensor locations etc.
I think I will have to just add this manually?
Thanks for the help!

Events are not imported or exported between FieldTrip and Brainstorm, indeed.
Export to SPM12 or FieldTrip is currently not designed to export continuous recordings.

The sensors locations should be included in the FieldTrip structures when calling out_fieldtrip_data.m or out_fieldtrip_channel.m.