blob: c17a25580c448eb304a90987f0cfb5a173eaa8da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/python2
#
# Print sample histograms from dabmod I/Q file
import sys
import pylab as P
import numpy
fd = open('test.iq', 'rb')
read_data = numpy.fromfile(file=fd, dtype=numpy.float32, count=-1)
print("MAX absolute value: {}".format(numpy.max(numpy.abs(read_data))))
if 0:
P.plot(read_data)
if 1:
P.figure()
# the histogram of the data with histtype='step'
n, bins, patches = P.hist(read_data, 50, normed=1, histtype='stepfilled')
P.setp(patches, 'facecolor', 'g', 'alpha', 0.75)
P.show()
|