2022-09-02 华科仪器读取的函数

file = np.fromfile("2020-08-14-21-31-39-out.dat", dtype="f4")
header = file[:10]
year = int(header[0])
month = int(header[1])
day = int(header[2])
hour = int(header[3])
min = int(header[4])
sec = header[5]
fs = int(header[6])
npts = int(header[7])
dt = 1/fs
nch = int(header[9])
data = file[10:].reshape((nch,npts))

你可能感兴趣的:(2022-09-02 华科仪器读取的函数)