# HG changeset patch # User Daniel O'Connor # Date 1363829895 -37800 # Node ID d90acb55ce31c5950f753c568921fff61a5bebca # Parent c1891d9074c1ab199285532b9abe54b8f36a1cce Log some stats after multiple runs. diff -r c1891d9074c1 -r d90acb55ce31 rs_fsp7_noisetest.py --- a/rs_fsp7_noisetest.py Thu Mar 21 11:48:42 2013 +1030 +++ b/rs_fsp7_noisetest.py Thu Mar 21 12:08:15 2013 +1030 @@ -164,12 +164,19 @@ r.write("INIT:CONT OFF") + nfs = [] print "Centre: %.1f Mhz, Span %.1f Mhz, Input %.1f MHz, BW %.1f kHz, %d sweeps, ENR %.2f dB" % (freq / 1e6, options.span / 1e6, options.input / 1e6, options.bw / 1e3, options.sweeps, enr) while options.repeat == None or options.repeat > 0: off, on, nf = donoisetest(r, enr) print "Off %.3f dBm/Hz, on %.3f dBm/Hz, NF %.2f dB" % (off, on, nf) + nfs.append(nf) if options.repeat == None: print "Press enter to perform a new measurement" sys.stdin.readline() else: options.repeat -= 1 + + if len(nfs) > 1: + nfs = numpy.array(nfs) + print "NF min: %.1f dBm/Hz, max: %.1f dBm/Hz, avg: %.1f dBm/hz, stddev: %.1f" % ( + nfs.min(), nfs.max(), nfs.sum() / len(nfs), numpy.std(nfs))