I had to convert EEG files .sig and .sts (recorded with Harmony) in order to use brainstorm into. edf . The problem is by converting I lose my markers, but fortunately an edf.xml is created separately. Is there a way to automatically enter those xml files on brainstorm to gain time ?
When reviewing a file, you can select the menu File > Add events from file from the Record tab.
Or from the Process1 tab, you can select the process “Events > Import from file”.
However, the list of supported file formats does not include these .xml files from Harmony.
If you could export your list of events into something that Brainstorm can read, it would be easy to read them. The easier option would be to save text files with only the latency of the events (one value per line), one file per event, and Brainstorm would ask you the event name when importing it.
Or maybe you can export to one of the formats that are readily available.
In fact, if in the futur you plan to add .sig (harmony format) in the supported files format i know a lot of people who will be happy about it! (including myself)!
If you are OK with having one file per event type, then for each event type:
save the latencies of all the occurrences in a text file, one time value per line
load the file in Brainstorm using the file format “Array of times” (using the menu File > Add events from file from the Record tab)
If you want all the event types in the same file, you can use for instance the ANT EEProbe .trg file format, probably the simplest format available in this list. It consists in one line of header (put anything in it, not used by Brainstorm), followed by one line per event, with the following format: “latency sample name”. For “sample”, you can set it to 0 everywhere, Brainstorm doesn’t use this value. The “name” is a string with no space.
Example:
To address the other suggestion: unfortunately it is not possible to add the support for the Stellate Harmonie .sig files in Brainstorm because this is a proprietary file format. Programs that can read .sig files (BESA, ANT, …) have signed an agreement with the company, and use an old windows 32bits .dll library. To my knowledge, the company didn’t want any open source software to be able to read the .sig files.
Hi! i tried to create an automatic converter based on your example with .trg format (xml to .txt) Actually it work really nice. i now try to make the same things but with .xml to .trg but i dont know actually how to create .trg, do you have any hint on how to convert my .txt in .trg? Thank you very much again, your help is always precious!
Ho!
Thank you… sorry I found the problem… my file was saved with the extension .trg.txt … everything work perfectly! One last question, if I want too make extended events, by example :
0.0019531250000000 136
12.229167 to 14.67483 9999 EV
20.921667 9999 START
128.444167 9999 KO
Not with this file format.
If you are writing your conversion script with Matlab, maybe it’s easier to write directly a Brainstorm events structure. For an example file, save some events you already have using the file format “Brainstorm (events*.mat)” - in tab Record, menu File > Export selected events.
So I tried with the file format .trg following your suggested steps, but i still get an error message naming the header latency as the problem…so i took out the header, kept only the values and got another error message naming the second line YEUX_OUVERTS as the problem…
The first line is completely ignored, it could even be empty. The rest of the file looks OK to me.
Make sure that in the import window, the file format selected is “ANT EEProbe .trg”.
If you have an error, it should come from function in_events_ant.
If you don’t understand where your error comes from, please post the full error message here.
ok! i got one last last question about this, with a friend we still try to create a converter. now we decide to go with the brainstorm event format. The only problem is than we dont have the sample in our input file, is this possible to bypass the sample rate input in the event*.mat file if yes how?
Thank you very much again Francois your help is always precious!
If you are with mac, make yourself sure your .trg is really a .trg, i am not sure why but i have to change my name extension file in the terminal wnidow. just drag and drop your event marker file in a terminal window and double check the extension (maybe you got something lie event.trg.txt