Suggestion in code for setting up .fif file

,

Hi everyone,
I was having a hard time importing .fif files which were preprocessed in MNE. I use MNE-Python for preprocessing MEG recordings as we have an established pipeline. I have added two lines of code in function fif_setup_raw:

switch ent.type
case FIFFT_DAU_PACK16
nsamp = ent.size/(2info.nchan);
case FIFFT_SHORT
nsamp = ent.size/(2
info.nchan);
case FIFFT_FLOAT
nsamp = ent.size/(4info.nchan);
case FIFFT_INT
nsamp = ent.size/(4
info.nchan);
otherwise
nsamp = (ent.size/(4*info.nchan))/2;
%fclose(fid);
%error(me,'Cannot handle data buffers of type %d',ent.type);

I added the line mentioned in bold and commented out the next two lines.

l have to change the code every time I update Brainstorm. Just thought it might be helpful if the source code can be modified.

Thanks.

Hi @SrijitaD, thanks you pointer. We have improved the setting up of `fif, for the case of your data and other data precision formats. Commit: fdd0cb1c
Update your Brainstorm instance to get the fix.


Details: you data is stored as 8-byte samples, either DOUBLE or COMPLEX FLOAT. We have now updated Brainstorm source code to handle those two cases and the COMPLEX DOUBLE case.

1 Like

Hello @Raymundo.Cassani , thank you for the addition in the code. this will be really helpful.