-
Notifications
You must be signed in to change notification settings - Fork 22
Description
I have been used some modified version of the ptu demo code for a number of years and did not encounter issues with reading/decoding ptu files that were provided to me by collaborators.
However, recent files I was provided failed to load properly by the ReadTag.vi, throwing an error 5 (End of file). While debugging, it turns out that the offset at which to read the Auxiliary Data Tag is wrong (i.e. very very large, when the file itself is only a few MB).
A similar error occurs when using the python demo script (Read_PTU.py): "ERROR: Magic invalid, this is not a PTU file."
I can't share the data files here as they are not mine, and the only thing I know is that they originate from a HydraHarp 400 device.
The old demo code I am using is identical to the current repo as far as the ReadTag,vi code is concerned (which is where the error occurs), so I suspect that something was changed in the way the offset to the Auxiliary Data Tag is encoded.
It used to be (according to the code) in the 8 bytes starting at byte 40 and used to be encoded in little-endian. Trying to read this as big endian doesn't fix the problem, so maybe something changed in the header. That would be obviously a terrible idea to change that, especially without proper documentation.
But maybe the files themselves are corrupt?
Anyway, help would be appreciated.