Problems loading g.tec .hdf5 file

Hello,

I’m trying to load my .hdf5 data recorded by gtec HIamp, but following error is presented.

Review raw file gets this -->


** Error: Line 70: Dot indexing is not supported for variables of this type.
**
** Call stack:
** >in_fopen_gtec.m at 70
** >in_fopen.m at 102
** >import_raw.m at 126
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@import_raw) at 492
**


Could you please help me on how to fix this?

Regards,
Hisato

Hello,
Please send me an example file and I’ll see if I can adapt easily the existing code for your file.
Francois

Hi Francois

Here is the link of my data in firestorage:
http://firestorage.com/download/b51d78175934d46e2a7f6aa342c2032085913a9f

download password: e8k17wfu

Regards,
Hisato

Hello

Thank you for the example file.
Your file does not include channel names, and the Brainstorm gtec reader was not equipped for this. I added a test to replace the missing channel names with default labels.
Please update Brainstorm and try again.

Cheers,
Francois

Hello

Thank you for modifying the Brainstorm gtec reader.
Now I can read the gtec .hdf5 file, but I cannot find the external trigger information.How can I get it?

Regards,
Hisato

I don’t know, and I can’t check anymore because I deleted your file, and you deleted it too from filestorage…

Can you find your trigger info in the HFD5 structure?
You need to use the HDF5 reading functions from Matlab. Example:

h5disp(DataFile) 
info = hdf5info(DataFile);
s = hdf5read(DataFile, '/RawData/AcquisitionTaskDescription')
s = hdf5read(DataFile, '/RawData/SessionDescription')

Hello,

Thank you for your reply.
I can find trigger information by following function.
hdf5read(‘DataFile’,’/AsynchronData/Time’)

But I cannot find this information from imported gtec file in the Brainstrom.
Again, I want you to check my gtec file if you have time.

http://firestorage.com/download/2464c34cba7569a17fd2ac4836a8303d3018beca
download password qxrcng5y

Thanks again,
Hisato

I managed to find the timing of the events:
evtTime = hdf5read(DataFile, '/AsynchronData/Time')

And the description of various trigger types (“Trigger 1” to “Trigger 8”):
evtSignalType = hdf5read(DataFile, ‘/AsynchronData/AsynchronSignalTypes’);
sSignalTypeXml = in_xml(evtSignalType.Data);
sSignalTypeXml.ArrayOfAsynchronSignalDescription.AsynchronSignalDescription(1).Name

But I didn’t find how to link the two information:
How do I know which trigger occurs when?
What name should I give the events found in ‘/AsynchronData/Time’.

There are additional fields (’/AsynchronData/TypeID’ and ‘/AsynchronData/Value’) but they are the same for all the time points, so I don’t know if they are informative.
HDF5 dataset ‘/AsynchronData/Value’ is “1” everywhere, does it mean it is “Trigger 1” everywhere?
HDF5 dataset ‘/AsynchronData/TypeID’ is “32” everywhere, it could match the ID fields in the “AsynchronSignalTypes” field, because sSignalTypeXml.ArrayOfAsynchronSignalDescription.AsynchronSignalDescription(1).ID = 32. Is this correct?

I am sorry I didn’t explain it clearly enough.
I recorded EEG data during finger tapping task in response to beep sound.
And we used only “Trigger 1” in this preliminary recording.

I’m sorry but I’m new gtec user and not familiar with handling hdf5 file.
I can’t answer whether ID = 32 or not.

Could you please check another hdf5 file again?

Following another dataset includes two triggers, “Trigger 3” and “Trigger 4”.
http://firestorage.com/download/c669e1897d6d56ab5b6c5e72df0c3fb9c1e29f59
download password yewe7rx8

Here is mat version file
http://firestorage.com/download/ca9133d54b6cfc5399b34261d5411a255993aa71
download password rzzt0kum

Thanks again,
Hisato

Hello,

Thank you for the two files, it was very helpful to have both the .hdf5 and .mat versions side by side.
I fixed the reader, sorted the events by TypeID, and now get the same things for both files.
Please update Brainstorm and try again.

Hello,

I can get all trigger information from the .hdf5 by the latest version of Brainstorm.
I really appreciate all your help.
Thank you!

Cheers,
Hisato

Hello,

I have recorded EEG data with external trigger "Trigger1" using gtec.
However, I cannot obtain the trigger information again, although mat version file contains these informations.
Could you please help me on how to fix this again?

Cheers,
Hisato

Hello
Sorry for the response delay…
Can you send me this file as well? I’ll see if there is anything else I need to change in the code.
Thanks
Francois

Hello,

Thanks for your reply.
I have recorded EEG and EMG data in finger tapping task.

I can get the trigger information from the .mat file but not from .hdf5 file in the Brainstorm.

Following data includes EEG (ch1-61), EMG (ch 62,63) and “Trigger 1”.
http://firestorage.com/download/fe51c46284feac0888bbb47045b81e27ab66d3d6
download password xzj3ftfm

Here is mat version file
http://firestorage.com/download/b2ad803a5316d3ea18bffc95a823076dbc0df32a
download password xzj3ftfm

Many Thanks,
Hisato

Thank you for the files.
In these new examples, the event ID of Trigger1 is “0”, and this was not expected in the code I wrote previously.
I fixed it. Update Brainstorm again an you should now see your Trigger1 events.
Francois

I am having a similar problem to Hisato.
Can you tell me or point me in direction how to make channel names, and if possible how to do this for all the hdf5 because all the data is stored that way and I will probably have to do the same thing for each file. I tried to have the file converted to .mat format, but that still does not load to brainstorm with a different error. The HDF5 error is copied below:
I think the [] brackets are blank to de-identify subject, but is causing error, did you just fill w a character so has any item to load/import.

Thanks!

Error in in_fopen_gtec

Line 59: in_fopen_gtec
Invalid g.tec HDF5 file: Missing dataset "RawData/AcquisitionTaskDescription".


Call stack:

in_fopen_gtec.m at 59
in_fopen.m at 115
in_data.m at 106
import_data.m at 200
bst_call.m at 28
tree_callbacks.m>@(h,ev)bst_call(@import_data,[],[],[],iStudy,iSubject) at 700

Thanks!

I tried simply putting in ['a'] to not leave empty channel names or channel types and still getting another error, I thought may be related to where the file was stored separate from brainstorm, but not helping. Any input, thanks.:


** Error: Line 229: in_fopen
** Cannot open data file:
** C: ... brainstorm3\11CCf2.mat
**
** Call stack:
** >in_fopen.m at 229
** >in_data.m at 518
** >import_data.m at 200
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@import_data,[],[],[],iStudy,iSubject) at 700
**


Hi,

These three [] are used to indicate that the user will use a [File Chooser] to indicate the file. They are not related to the error you're seeing. Do not modify these, as it will seriously damage the way Braisntorm operates.

Was your file created with the g.Recorder software?
Could you send an example data file so we can have a look at it?
Upload the file somewhere and post the download link here. Thanks

Regarding your data location, put them anywhere you want but not in any of the Brainstorm folders.
This will cause many troubles, as indicated in the Tutorial 1 Create a new protocol of the Get started tutorials

https://duke.box.com/s/q6ucobtkfs224501sbt3jg8y30elxwcy the file is close to 1GB. This is .mat file exported or converted from hdf5 file. this was recorded on g.HIamp 256-channel amplifier device; so I think it is g.recorder, but not sure. I did not aquire the data.
Let me know if box link does not work. Thanks for the help. I only manipulated a copy of the original file, so it is not ruined, this file should be unaltered from recording besides that it is matlab format.

I will try to share next the HDFD5 file and decryption file for hdf5, ghdf5import.m, but the hdf5 is even larger than exported .mat file.

I am a clinical neurophys fellow, but know nearly nothing for Matlab I'm mostly interested to use Matlab to open brainstorm to analyze SEEG data in a GUI compatible with these odd formats.
I put a screenshot of the file channel name area that seemed to be a problem for the other user in the past, but I see your comments not to touch it.

https://duke.box.com/s/w5icafjfvemvb2kijp3im1cwstkevh9c this is an hdf5 file of same or similar data from before.
https://duke.box.com/s/448r08pp901lxumgkexib7rv90k7cm6s is the hdf5 read.m file
again all was recorded on g.HIamp 256-channel amplifier device
Any help, much obliged.