The details of what I'm trying to do are as follow. I have a Biosemi
BDF file that I read with `https://ohbm-openscience.org/`. I then
modify the trigger signal of this raw object:
(I think that how and why I need to change the trigger is not
relevant, but I can give details if that is useful)
Now I want to save the raw object as a BDF file, but I haven't find
how. I can do raw.save, but that save the raw object as a FIF file.
The reason I need a BDF file back is that the file will be processed
by another person using Brainvision, and it seems this software is not
able to open FIF files.
I have also search for tools outside MNE to convert from FIF to BDF
with out succes.
In my preliminary tests, the triggers and raw data match when reading in
a BV file, writing it out, and then reading it back in, but I haven't
yet tested everything extensively. If you find a bug, please report it!
I tried saving to a BV file using your function, but my laptop
completely freeze. I had to hard reset the laptop to bring it back.
The raw object is big (around 900 MB), and after calling
philistine.mne.write_raw_brainvision, the laptop run out of RAM and
starts using the swap. I would expect that to be slow, but not to
freeze the machine. I don't know if there is something odd with my
machine or if it's the function that misbehave. I'll try tomorrow with
another machine and see how it goes.
I tried again and waited for a long time. The laptop come back to life
and now I have three files that looks like what BV wants. I'll let you
know if BV is able to open the file.