Mercurial > ~darius > hgwebdir.cgi > pyinst
comparison rs_fsp7_noisetest.py @ 54:42621291eb9b
Improve usage message.
author | Daniel O'Connor <doconnor@gsoft.com.au> |
---|---|
date | Thu, 02 May 2013 17:55:20 +0930 |
parents | d90acb55ce31 |
children | 91b476ebc0f2 |
comparison
equal
deleted
inserted
replaced
53:d90acb55ce31 | 54:42621291eb9b |
---|---|
126 setnoise(r, True) | 126 setnoise(r, True) |
127 on = getnoise(r) | 127 on = getnoise(r) |
128 return off, on, calcnf(enr, off, on) | 128 return off, on, calcnf(enr, off, on) |
129 | 129 |
130 if __name__ == '__main__': | 130 if __name__ == '__main__': |
131 parser = optparse.OptionParser(usage = '%prog [options] address frequency') | 131 parser = optparse.OptionParser(usage = '%prog [options] address frequency', |
132 parser.add_option('-s', '--span', dest = 'span', default = 1e6, help = 'Span frequency (Hz)', type = float) | 132 description = 'Configures a Rhode Schwartz FSP7 spectrum analyser to do a noise figure test', |
133 parser.add_option('-i', '--input', dest = 'input', default = None, help = 'Input frequency (Hz) for down converters', type = float) | 133 epilog = 'video bandwidth is set to 10 times the resolution bandwidth') |
134 parser.add_option('-w', '--sweeps', dest = 'sweeps', default = 20, help = 'Number of sweeps', type = int) | 134 parser.add_option('-s', '--span', dest = 'span', default = 1e6, help = 'Span frequency in Hz (default: %default)', type = float) |
135 parser.add_option('-b', '--bw', dest = 'bw', default = 1000, help = 'Bandwidth (Hz)', type = float) | 135 parser.add_option('-i', '--input', dest = 'input', default = None, help = 'Frequency used to compute ENR (defaults to frequency)', type = float) |
136 parser.add_option('-r', '--repeat', dest = 'repeat', help = 'Repetitions (otherwise do one and ask to continue)', type = int) | 136 parser.add_option('-w', '--sweeps', dest = 'sweeps', default = 20, help = 'Number of sweeps (default: %default)', type = int) |
137 parser.add_option('-b', '--bw', dest = 'bw', default = 1000, help = 'Resolution bandwidth in Hz (default: %default)', type = float) | |
138 parser.add_option('-r', '--repeat', dest = 'repeat', help = 'Number of repetitions, if not specified do one and ask to continue', type = int) | |
137 | 139 |
138 (options, args) = parser.parse_args() | 140 (options, args) = parser.parse_args() |
139 | 141 |
140 if len(args) != 2: | 142 if len(args) != 2: |
141 parser.error('Must supply the specan address and centre frequency') | 143 parser.error('Must supply the specan address and centre frequency') |