Created
August 11, 2018 09:16
-
-
Save cbassa/5b015497d20dd9847d3e4fa03b5d97e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open file | |
f=open(fname) | |
# Read number of channels | |
nchan=int(np.fromfile(f,dtype='float32',count=1)[0]) | |
# Read channel frequencies | |
freq=np.fromfile(f,dtype='float32',count=nchan)/1000.0 | |
# Read entire file | |
data=np.fromfile(f,dtype='float32').reshape(-1,nchan+1) | |
# Close file | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment