Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time, struct
- import numpy as np
- import matplotlib.pyplot as plt
- path = 'E:/big_ass.rdd'
- ptr = 0
- np_ptr = 0
- buff = np.zeros([2,2000000], np.float64)
- t = time.time()
- with open(path, 'rb') as f:
- f.seek(1024)
- while True:
- b = f.read(16)
- if b:
- buff[:, np_ptr] = struct.unpack('dd', b)
- np_ptr+=1
- ptr += 16*9999
- f.seek(ptr)
- else:
- break
- plt.plot(buff[0, :np_ptr], buff[1, :np_ptr])
- plt.show()
- print(buff[:, :np_ptr])
Add Comment
Please, Sign In to add comment