diff options
-rw-r--r-- | examples/lock_eit.py | 11 |
1 files changed, 11 insertions, 0 deletions
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) |