added smar_config to config file. smaract stages are added to las by looping through the smar_config dict (smar_name,smar_address),e.g. {'thz_z':'-ESB1'}

This commit is contained in:
“Roman
2019-05-24 09:53:52 +02:00
parent caee42e77d
commit 950bdc3381
2 changed files with 9 additions and 66 deletions
+1 -1
View File
@@ -298,7 +298,7 @@ components = [
"z_und": 142,
"desc": "Experiment laser optics",
"type": "eco.loptics.bernina_experiment:Laser_Exp",
"kwargs": {"Id": "SLAAR21-LMOT"},
"kwargs": {"Id": "SLAAR21-LMOT", "smar_config": config["las_smar_config"]},
},
{
"args": ["SLAAR21-LTIM01-EVR0"],
+8 -65
View File
@@ -23,12 +23,13 @@ def addDelayStageToSelf(self, stage=None, name=None):
class Laser_Exp:
def __init__(self, Id=None, name=None):
def __init__(self, Id=None, name=None, smar_config=None):
self.Id = Id
self.IdExp1 = "SARES20-EXP"
self.IdSA = "SARES23"
self.name = name
self.alias = Alias(name)
self.smar_config = smar_config
# Waveplate and Delay stage
try:
@@ -97,71 +98,13 @@ class Laser_Exp:
# SmarAct ID
### Mirrors used in the experiment ###
try:
addSmarActRecordToSelf(self, Id=self.IdSA + "-ESB18", name="tt_rot")
# self._eos_rot = SmarActRecord(self.IdSA+'-ESB18')
# self.eos_rot = User_to_motor(self._eos_rot,180./35.7,0.)
except:
print("No Smaract EOSrot")
pass
try:
addSmarActRecordToSelf(self, Id=self.IdSA + "-ESB2", name="pump_x")
except:
print("No Smaract EOSGonio")
pass
try:
addSmarActRecordToSelf(self, Id=self.IdSA + "-ESB1", name="pump_gonio")
except:
print("No Smaract EOSx")
pass
try:
addSmarActRecordToSelf(self, Id=self.IdSA + "-ESB16", name="pump_rot")
# self.thz_rot = User_to_motor(self._thz_rot,180./35.7,0.)
except:
print("No Smaract THzrot")
pass
try:
addSmarActRecordToSelf(self, Id=self.IdSA + "-ESB5", name="thz_gonio")
except:
print("No Smaract THzGonio")
pass
try:
addSmarActRecordToSelf(self, Id=self.IdSA + "-ESB4", name="tar_focus")
# self.thz_z = SmarActRecord(self.IdSA+'-ESB4')
except:
print("No Smaract THzZ")
pass
try:
addSmarActRecordToSelf(self, Id=self.IdSA + "-ESB6", name="tt_gon")
# self.par_x = SmarActRecord(self.IdSA+'-ESB6')
except:
print("No Smaract ParX")
pass
try:
addSmarActRecordToSelf(self, Id=self.IdSA + "-ESB3", name="spatialenc_df_lens")
except:
print("No Smaract ParZ")
pass
### Motors on EXP1 deltatau
try:
addMotorRecordToSelf(self, Id=self.IdExp1 + ":MOT_VT80", name="tar_y")
# self.par_y = MotorRecord(self.IdExp1+':MOT_VT80')
except:
print("No Smaract ParY")
pass
try:
addMotorRecordToSelf(self, Id=self.IdExp1 + ":MOT_TX", name="tar_transl")
# self.par_y = MotorRecord(self.IdExp1+':MOT_VT80')
except:
print("No target translation")
pass
for smar_name, smar_address in self.smar_config.items():
try:
addSmarActRecordToSelf(self, Id=(self.IdSA + smar_address), name=smar_name)
except:
print("Loading %s SmarAct motor in bernina laser conifg failed")%(smar_name)
pass
def get_adjustable_positions_str(self):
ostr = "*****Laser motor positions******\n"