aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQol Group Shared Data <qol@squeezer.physics.wm.edu>2022-01-28 16:21:34 -0500
committerQol Group Shared Data <qol@squeezer.physics.wm.edu>2022-01-28 16:21:34 -0500
commit0e31465749b18889a6140646b2e5cc4c2334bb7c (patch)
treef56542e9b07e2e09a3138ce7890750fe6a5ebd95
parent900b61306f631e140a4280241036698aaec84b67 (diff)
downloadpyExpControl-0e31465749b18889a6140646b2e5cc4c2334bb7c.tar.gz
pyExpControl-0e31465749b18889a6140646b2e5cc4c2334bb7c.zip
magnetometer noise record improvements
-rw-r--r--examples/lock_eit.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/examples/lock_eit.py b/examples/lock_eit.py
index cc4c9b0..afb73f6 100644
--- a/examples/lock_eit.py
+++ b/examples/lock_eit.py
@@ -20,6 +20,7 @@ from qolab.hardware.lockin import SRS_SR865A
from qolab.feedback import PID
from qolab.data import TraceSetSameX, TraceXY, Trace
from qolab.hardware.i_server import I800
+from qolab.file_utils import get_next_data_file
l = logging.getLogger('qolab.gui.web')
l.setLevel(logging.INFO)
@@ -249,6 +250,13 @@ async def record_magnetometer_noise(apparatus):
errorTr.y.config['label'] = 'error'
log = errorTr
log.config['tags']['apparatus']=getConfig(apparatus)
+ magNoise = BasicInstrument(device_nickname='.'.join(['magnetometer', 'noise']))
+ magNoise.config['FnamePrefix'] = 'magnetometer_noise'
+ magNoise.config['SavePath']=apparatus.config['SavePath']
+ fname = magNoise.getNextDataFile()
+ log.save(fname)
+ breakpoint()
+
apparatus.gui_log.setTraces( log )
update_webpage(apparatus=apparatus)
@@ -295,7 +303,8 @@ async def sweepRFPower(apparatus, extra_tags={}, rfPowerList=[]):
freqZero = 6_834_686_400
-freqDeltaMp2 = 6_835_385_570; # T=83.7C
+#freqDeltaMp2 = 6_835_385_570; # T=83.7C
+freqDeltaMp2 = 6_835_392_900; # T=83.7C
# freqDeltaMp2 = 6_835_396_000; # T=44.6C
dfB = freqDeltaMp2 - freqZero
freqDeltaMm2 = freqZero - dfB;
@@ -325,7 +334,8 @@ async def main():
# ch1 = scope.getTrace(1)
# traces = scope.getAllTraces()
# pid = PID(100,400,0, sign=-1); # good for dm=-2 resonance
- pid = PID(50,200,0, sign=-1, device_nickname='.'.join([app_nickname, 'pid']), tsdb_ingester=tsdb_ingester)
+ # pid = PID(50,200,0, sign=-1, device_nickname='.'.join([app_nickname, 'pid']), tsdb_ingester=tsdb_ingester)
+ pid = PID(10,40,0, sign=-1, device_nickname='.'.join([app_nickname, 'pid']), tsdb_ingester=tsdb_ingester)
apparatus.instruments={}
ai = apparatus.instruments
@@ -372,7 +382,7 @@ async def main():
rfPstop = 10
rfPowerList = np.linspace(rfPstart, rfPstop, 11)
rfPower0 = rfPstart
- rfPower0 = 3.4
+ rfPower0 = 4
apparatus.setRFAmplitude(rfPower0)
d=getConfig(apparatus)
@@ -391,7 +401,7 @@ async def main():
# await sweepRFPower(apparatus, extra_tags=extra_tags, rfPowerList=rfPowerList)
- # await record_magnetometer_noise(apparatus)
+ await record_magnetometer_noise(apparatus)
await longTermLock(apparatus, extra_tags=extra_tags)