I try to read a dat file with the structure given below. It is a video from an IR camera. I tried different methods, but I always get errors along the way. I would like to convert it in a different file format and load it in python, so I can do some analysis with it.
import csv
datContent = [i.strip().split() for i in open("./Test_s.dat",'rb').readlines()]
# write it as a new CSV file
with open("./Test_s.csv", "wb") as f:
writer = csv.writer(f)
writer.writerows(datContent)

Example to read the header fields excluding the data log, since no definition was provided:
I assumed little endian, change the first symbol in the pattern to '>' if the dat file used big endian.
I hope this is enough to get you going, keep in mind you need calculate the image data size from some header values.
I cannot see a header for image count, so you probably have to read until the file ends.