diff 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
line wrap: on
line diff
--- a/rs_fsp7_noisetest.py	Thu Mar 21 12:08:15 2013 +1030
+++ b/rs_fsp7_noisetest.py	Thu May 02 17:55:20 2013 +0930
@@ -128,12 +128,14 @@
     return off, on, calcnf(enr, off, on)
 
 if __name__ == '__main__':
-    parser = optparse.OptionParser(usage = '%prog [options] address frequency')
-    parser.add_option('-s', '--span', dest = 'span', default = 1e6, help = 'Span frequency (Hz)', type = float)
-    parser.add_option('-i', '--input', dest = 'input', default = None, help = 'Input frequency (Hz) for down converters', type = float)
-    parser.add_option('-w', '--sweeps', dest = 'sweeps', default = 20, help = 'Number of sweeps', type = int)
-    parser.add_option('-b', '--bw', dest = 'bw', default = 1000, help = 'Bandwidth (Hz)', type = float)
-    parser.add_option('-r', '--repeat', dest = 'repeat', help = 'Repetitions (otherwise do one and ask to continue)', type = int)
+    parser = optparse.OptionParser(usage = '%prog [options] address frequency', 
+                                   description = 'Configures a Rhode Schwartz FSP7 spectrum analyser to do a noise figure test',
+                                   epilog = 'video bandwidth is set to 10 times the resolution bandwidth')
+    parser.add_option('-s', '--span', dest = 'span', default = 1e6, help = 'Span frequency in Hz (default: %default)', type = float)
+    parser.add_option('-i', '--input', dest = 'input', default = None, help = 'Frequency used to compute ENR (defaults to frequency)', type = float)
+    parser.add_option('-w', '--sweeps', dest = 'sweeps', default = 20, help = 'Number of sweeps (default: %default)', type = int)
+    parser.add_option('-b', '--bw', dest = 'bw', default = 1000, help = 'Resolution bandwidth in Hz (default: %default)', type = float)
+    parser.add_option('-r', '--repeat', dest = 'repeat', help = 'Number of repetitions, if not specified do one and ask to continue', type = int)
 
     (options, args) = parser.parse_args()