FIF-File 2x disk-size after first loading

Dear MNE-People,

when I first load Raw-Data into MNE-Python from a freshly generated FIF-File by our Neuromag122, the same unaltered Raw-Data takes 2x the space when saved to disk again.

Does somebody has similar experience with their freshly generated data?
I uploaded an example file with code here.

Maybe there are some old FIFF-Data-Types in our data which get converted into larger types by default.
Is this mandatory to work with MNE-Python or could one somehow avoid the doubling of disksize?
Before I try to understand the data-structure of FIFF I wanted to ask here if somebody could give me a hint on that.

I wonder if we might be changing the floating point precision … @agramfort?

See MRG: keep orig format on save by agramfort · Pull Request #610 · mne-tools/mne-bids · GitHub

And the raw.orig_format attribute

Alex

I tried with the script & file @marsipu supplied.

The original data format is short. Saving changes it to single.

What you want to do when saving is:

raw.save(fmt=raw.orig_format)

This should fix the issue.

2 Likes

I see, thanks a lot @richard and @agramfort. I haven’t seen the parameter in raw.save(). This will save us a lot of space for the analysis in the lab.
Is “single” still better though (because you recommend it in the docs) or does it make no difference if the data was generated with e.g. “short”?

1 Like

I doubt it makes any difference yes.

Alex

1 Like