Merge EDF and annotations

1 post
Was this reply useful? Learn more...
   
[-]
Jeremy Orr +0 points · over 2 years ago

I'm attempting to merge the EDF files and XML annotations from HeartBeat into a single file. The most simple output file type for me would probably be EDF+ with events in a textmark channel, but other formats such as a .mat file might work, although depends on how it is structured. I've run the EDF_view package on MATLAB, but it doesn't seem to generate any sort of matrix. Any suggestions? Besides MATLAB, I have Spike2 available, although I'm not a programmer. Thanks

134 posts
Was this reply useful? Learn more...
   
[-]
mrueschman +0 points · over 2 years ago

Nothing comes to mind for me for your request, but I have reached out to some of our signal experts to see if they have any ideas. Thanks for checking out the NSRR!

8 posts
Was this reply useful? Learn more...
   
[-]
SaraMariani +1 point · over 2 years ago

Hi! A possible solution, if you are happy with having a single Matlab file, would be using the short function I wrote for you and saved here:

https://github.com/saramariani/mergeEDFXML/blob/master/mergeEDFXML.m

after adding the following two Matlab functions to your directory:

It will save a Matlab struct file with one field per channel, plus one field named PSGAnnotation, which contains all the annotation events in its subfields. Let us know if this works for you.