diff options
Diffstat (limited to 'examples/lock_eit.py')
-rw-r--r-- | examples/lock_eit.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/lock_eit.py b/examples/lock_eit.py index 0cdd86f..29cc7ea 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -4,6 +4,7 @@ import matplotlib as mpl import matplotlib.pyplot as plt import time +from qolab.hardware import BasicInstrument from qolab.hardware.scope import SDS1104X from qolab.hardware.rf_generator import AgilentE8257D from qolab.feedback import PID @@ -40,7 +41,7 @@ def adjustRF(pid, scope, rfgen): # while True: - for i in range(0,10000): + for i in range(0,10): timenow = time.time() ch1=scope.getTrace(1, decimate=False) @@ -65,6 +66,12 @@ def adjustRF(pid, scope, rfgen): if __name__ == '__main__': + apparatus = BasicInstrument() + apparatus.config['Device type'] = 'QOL VAMPIRE HighPower magnetometer' + apparatus.config['Device model'] = 'v0.1' + apparatus.config['FnamePrefix'] = 'locked_magnetometer' + apparatus.config['SavePath'] = './data' + print("testing") rm = pyvisa.ResourceManager() instr_scope=rm.open_resource('TCPIP::192.168.0.61::INSTR') @@ -88,7 +95,8 @@ if __name__ == '__main__': pid = PID(100,400,0, sign=-1) log=adjustRF(pid, scope, rfgen) - log.save('lock.dat', item_format='.15e') + fname = apparatus.getNextDataFile() + log.save(fname, item_format='.15e') |