Hi All,
I have a spontaneous recording (~ 25 minutes) of epilepsy patient, with head digitization and other parameters in a fiff file, generated by MEGIN system. Because of some distortions during digitization ~ 11% of the points have been digitized erroneously (inside the brain), and I would like to eliminate them and generate a new file with the reduced point set for the digitized data, keeping everything else the same.
I have read the file using the fiff_startup_read_raw function, and can see all the points indexed in the data.info.dig(:).r structure. I have already identified the points that I want to eliminate, and can easily remove them from this structure.
My question is, how do I re-write the file back as a new file with the modified “dig” structure, but with everything else remaining the same (including the format). I looked that the documentation and there is a function called fiff_write_dig_point, but this is documented to work for one point at a time. Is there is a way I can write this as a block?
Thanks.
Sid.