Export to .fif File

Hello,

I have a question regarding .fif export. I have some preprocessing steps that I would like to do in Brainstorm before MaxFiltering. In order to do this, I need to export the file as .fif. Is there a working function that I can do this in Brainstorm? I've read in OPEN MEG to -trans.fif file that it is not yet possible. Is there any developments in this issue? I noticed that there is a function called 'out_fwrite_fif.m' but could not find any support on how to use it.

Thanks for any help in advance!
Levent

Unfortunately, Brainstorm doesn't support the output of .fif files.
This function out_fwrite_fif.m is a residual of a previous attempt to modify the values within a .fif file. This is not working well and not supported.

What you could maybe do:

  • Make a copy of the .fif file
  • Call in_fopen() to get a sFile structure pointing at this .fif file
  • Call out_fwrite() on this sFile to write the blocks of files you modified manually to the .fif file.

If you want to use this, this is at your own risk and we won't be able to provide support with it.

Note that MNE-Python is much better equipped to deal with .fif files.

Or, the other way around, if you want to bypass some of the obscure things MaxFilter do, you could try running the MNE-Python implentation of SSS/tSSS from within Brainstorm:
https://neuroimage.usc.edu/brainstorm/MnePython

Hi Francois,

Thank you for your help. I managed to get both options working.

Best regards,
Levent