diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-14 09:45:35 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-14 09:45:35 -0500 |
commit | b490617894a5259653d466c2a1a3f88f91dec55d (patch) | |
tree | 4d28290847d3363a7a9760211a19560d08bc6318 /examples | |
parent | 2d34ba0487f814e4452a34338d68883ab12ae85c (diff) | |
download | pyExpControl-b490617894a5259653d466c2a1a3f88f91dec55d.tar.gz pyExpControl-b490617894a5259653d466c2a1a3f88f91dec55d.zip |
saving to a proper filename
Diffstat (limited to 'examples')
-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') |