changeset 45:6bd941d96c03

Commit final version that went to Norway
author Daniel O'Connor <darius@dons.net.au>
date Thu, 20 Dec 2012 10:59:18 +1030
parents c93d6d4cb04b
children a6e5c97b4767
files agilent_r5071.py sitesurvey.ini
diffstat 2 files changed, 25 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/agilent_r5071.py	Wed Sep 28 17:15:23 2011 +0930
+++ b/agilent_r5071.py	Thu Dec 20 10:59:18 2012 +1030
@@ -1,8 +1,11 @@
 # Docs are at http://ena.tm.agilent.com/e5071c/manuals/webhelp/eng/
 
+import numpy
 import scpi
 import pylab
 
+fname = 'data'
+
 # Connect
 inst = scpi.instURL('vxi://203.31.81.47')
 
@@ -28,12 +31,22 @@
 # We only want the real part (no imag for this measurement)
 dat = dat[::2]
 
+# Plot
+pylab.plot(freqs, dat)
+pylab.show()
+
 # Save for later
-numpy.savez('GS_preamp_20110929', freqs, dat)
+numpy.savez('data.npz', freqs, dat)
 
 # Load..
-f = numpy.load('GS_preamp_20110929.npz')
+f = numpy.load(fname + '.npz')
 freqs = f['arr_0']
 dat = f['arr_1']
 
-pylab.plot(freqs.dat)
+f = file(fname + '.csv', 'wb')
+f.write("Frequencies\n")
+numpy.savetxt(f, [freqs], delimiter = ',')
+f.write("Gain\n")
+numpy.savetxt(f, [dat], delimiter = ',')
+del f
+
--- a/sitesurvey.ini	Wed Sep 28 17:15:23 2011 +0930
+++ b/sitesurvey.ini	Thu Dec 20 10:59:18 2012 +1030
@@ -1,51 +1,16 @@
 [general]
-sequence = fm foo bar
-#url = rsib://analyzer
-#type = RSSPA
+sequence = exp1
 url = vxi://129.241.72.183
 type = AnSPA
 fname = Trondheim_%%(timestamp_dec)s_%%(tag)s_%%(fstart_mhz)sMHz_%%(fstop_mhz)sMHz.dat
-ampcal = GS_preamp_20110919.csv
-
-[foo]
-fstart = 20e6
-fstop = 30e6
-atten = 0
-reflev = -30
-resbw = 10e3
-vidbw = 30e3
-sweept = 1
-recurrence = 180
-
-[bar]
-fstart = 25e6
-fstop = 37e6
-atten = 0
-reflev = -30
-resbw = 10e3
-vidbw = 30e3
-sweept = 1
-recurrence = 60
+ampcal = GS_preamp_20110929.csv
 
-[rs]
-fstart = 1e6
-fstop = 10e6
-atten = 0
-reflev = -30
-resbw = 10e3
-vidbw = 30e3
+[exp1]
+fstart = 10e6
+fstop = 20e6
+atten = 20
+reflev = 0
+resbw = 300e3
+vidbw = 900e3
 sweept = 1
-sweeppts = 8001
-sweepcnt = 4
-detector = RMS
 recurrence = 600
-
-[fm]
-fstart = 95e6
-fstop = 110e6
-atten = 0
-reflev = -30
-resbw = 10e3
-vidbw = 30e3
-sweept = 1
-recurrence = 60