# HG changeset patch # User Daniel O'Connor # Date 1729482170 -37800 # Node ID 60ad91b4c67cb35cb022b4db0901c8b77f4485fb # Parent 4b4ae555067b60db896baccb5e7675a8b9331e98 Add 'quick' option to use a faster sweep time with no averaging. Useful for testing the hardware is setup correctly without having to wait 3 minutes. diff -r 4b4ae555067b -r 60ad91b4c67c rs_fsp7_noisetest.py --- a/rs_fsp7_noisetest.py Thu Oct 03 08:57:10 2024 +0930 +++ b/rs_fsp7_noisetest.py Mon Oct 21 14:12:50 2024 +1030 @@ -156,6 +156,7 @@ parser.add_argument('-s', '--span', default = 1e6, help = 'Span frequency in Hz (default: %(default).0f Hz)', type = float) parser.add_argument('-t', '--time', default = 30, help = 'Sweep time (default: %(default)f sec)', type = float) parser.add_argument('-w', '--sweeps', default = 3, help = 'Number of sweeps to average (default: %(default)d)', type = int) + parser.add_argument('-q', '--quick', action = 'store_true', help = 'Use presets for a quick test to check hardware is setup correctly') parser.add_argument('address', help = 'Spectrum analyser address', type = str) parser.add_argument('centre', help = 'Centre frequency (Hz)', type = float) @@ -167,6 +168,10 @@ if args.time is not None and args.time <= 0: parser.error('Sweep time must be >0') + if args.quick: + args.time = 5 + args.sweeps = 1 + # Compute ENR at frequency of interest enr = findenr(args.input)