I work in a lab where we acquire electrophysiological recordings (across 4 recording channels) using custom Labview VIs, which save the acquired data as a .DAT (binary) file. The analysis of these files can then be continued in more Labview VIs, however I would like to analyse all my recordings in Python. First, I need walk through all of my files and convert them out of binary!
I have tried numpy.fromfile (filename), but the numbers I get out make no sense to me:
array([ 3.44316221e-282, 1.58456331e+029, 1.73060724e-077, ..., 4.15038967e+262, -1.56447362e-090, 1.80454329e+070])
To try and get further I looked up the .DAT header format to understand how to grab the bytes and translate them - how many bytes the data is saved in etc: http://zone.ni.com/reference/en-XX/help/370859J-01/header/header/headerallghd_allgemein/
But I can't work out what to do. When I type "head filename" into terminal, below is what I see.
e.g. >> head 2014_04_10c1slice2_rest.DAT
DTL? 0???? @@???? empty array PF?c ƀ????l?N?"1'.+?K13:13:27;0.00010000-08??t???DY ??N?t?x???D? ?uv?tgD?~I?? ??N?t?x>?n?? ????t?x>?n?? ????t???D? ????t?x???D? ????t?x?~I?? ????tgD>?n?? ??N?tgD???D? ??N?t?x???D? ????t????DY ??N?t?x>?n?? ??N?t????DY ?Kn$?t?????DY ??N?t??>?n?? ??N?tgD>?n?? ????t?x?~I?? ????tgD>?n?? ??N?tgD>?n?? ??N?tgD???DY ????t?x???D? ????t???~I?? ??N?tgD???DY ??N?tgD???D? ??N?t?~I?? ??N?t?x???DY ??N?tF>?n?? ??N?t?x??%Y
Any help or suggestions on what to do next would be really appreciated.
Thanks.
P.s. There is an old (broken) matlab file that seems to have been intended to convert these files. I think this could probably be helpful, but having spent a couple of days trying to understand it I am still stuck. http://www.mathworks.co.uk/matlabcentral/fileexchange/27195-load-labview-binary-data