3
# Copyright 2007,2008 Free Software Foundation, Inc.
5
# This file is part of GNU Radio
7
# GNU Radio is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3, or (at your option)
12
# GNU Radio is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with GNU Radio; see the file COPYING. If not, write to
19
# the Free Software Foundation, Inc., 51 Franklin Street,
20
# Boston, MA 02110-1301, USA.
26
print "Please install SciPy to run this script (http://www.scipy.org/)"
29
from optparse import OptionParser
30
from gnuradio.plot_data import plot_data
33
usage="%prog: [options] input_filenames"
34
description = "Takes a GNU Radio short integer binary file and displays the samples versus time. You can set the block size to specify how many points to read in at a time and the start position in the file. By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples."
36
parser = OptionParser(conflict_handler="resolve", usage=usage, description=description)
37
parser.add_option("-B", "--block", type="int", default=1000,
38
help="Specify the block size [default=%default]")
39
parser.add_option("-s", "--start", type="int", default=0,
40
help="Specify where to start in the file [default=%default]")
41
parser.add_option("-R", "--sample-rate", type="float", default=1.0,
42
help="Set the sampler rate of the data [default=%default]")
44
(options, args) = parser.parse_args ()
51
dc = plot_data(datatype, filenames, options)
53
if __name__ == "__main__":
56
except KeyboardInterrupt: