0

I must read a binary file in Python. I use this code:

import struct
import numpy as np

fileName = "continuous.dat"
with open(fileName, mode='rb') as file:
    fileContent = file.read()
    a = struct.unpack("H" * ((len(fileContent)) // 2), fileContent)
    print(a)

but print(a) displays an unordered list of the data, as I can see a in table form.

I want to get the table of 16 channels that should get.

File is: https://drive.google.com/drive/folders/1R84CxTU1VgrBhMN3KFl63pO_Ml6VScDV?usp=share_link

print(a) displays an unordered list of the data, as I can see a in table form.

I want to get the table of 16 channels that should get.

File is: https://drive.google.com/drive/folders/1R84CxTU1VgrBhMN3KFl63pO_Ml6VScDV?usp=share_link

snakecharmerb
  • 47,570
  • 11
  • 100
  • 153

0 Answers0