From 94f6fbc54a4d7df51cb352b7d942037e9e539c0b Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 6 Jan 2022 11:04:22 -0500 Subject: now we track cell temperature --- examples/lock_eit.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'examples') diff --git a/examples/lock_eit.py b/examples/lock_eit.py index a5c8c7b..e4fedad 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -19,6 +19,7 @@ from qolab.hardware.rf_generator import AgilentE8257D 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 l = logging.getLogger('qolab.gui.web') l.setLevel(logging.INFO) @@ -68,6 +69,11 @@ def initLog(extra_tags={}): rfPoutLog.x = timeTrace rfPoutLog.y = rfPoutTrace + + cellTemperatureLog = TraceXY("cellTemperature") + cellTemperatureLog.x = timeTrace + cellTemperatureLog.y = Trace("cellTemperature") + cellTemperatureLog.y.config['unit'] = 'C' log = TraceSetSameX("timelog") log.addTrace(errorLog) @@ -75,6 +81,7 @@ def initLog(extra_tags={}): log.addTrace(feedbackLog) log.addTrace(eitLog) log.addTrace(rfPoutLog) + log.addTrace(cellTemperatureLog) log.config['tags']['apparatus']=getConfig(apparatus) log.config['tags'].update(extra_tags) return log @@ -104,12 +111,15 @@ def adjustRFandLog(apparatus): apparatus.getBCurrent(); # this automatically logs value to TSDB + tCell = ai['cellTemperatureController'].getTemperature() + log.addPointToTrace(timenow) log.addPointToTrace(err, "error") log.addPointToTrace(freq0, "frequency") log.addPointToTrace(fdbck, "feedback") log.addPointToTrace(rfPout, "rfPout") log.addPointToTrace(eit, "eit") + log.addPointToTrace(tCell, "cellTemperature") async def initial_lock_to_eit(apparatus, extra_tags={}): rfPout = apparatus.getRFAmplitude() @@ -321,6 +331,7 @@ async def main(): ai['rfgen'] = rfgen ai['lockin'] = lockin ai['pid'] = pid + ai['cellTemperatureController'] = I800() ai['scope.feedback'] = scope_fdbk scope_fdbk.setRoll(False) scope_fdbk.setRun(True) -- cgit v1.2.3