change requests: SFELPHOTON-640

This commit is contained in:
2022-11-23 13:19:53 +01:00
parent c75c2c1d33
commit 816d06f7c4
3 changed files with 22 additions and 9 deletions

View File

@@ -439,6 +439,13 @@ verbose bits:
parent=param.parent()
par_nm=parent.name()
nm=param.name()
if par_nm in (AppCfg.DAQ_BS_CH, AppCfg.DAQ_PV_CH, AppCfg.DAQ_DET, AppCfg.DAQ_LOC):
# this hack must be doneto force a new allocation of a jungfrau object
_log.info('delete jungfrau object if existing')
try:
del app._jungfrau
except AttributeError:
pass
if par_nm==AppCfg.GEO_BEAM_SZ:
v = np.array(tuple(map(lambda x: x.value(),parent.children())))
cfg.setValue(par_nm,v)
@@ -459,7 +466,7 @@ verbose bits:
except TypeError:
_log.warning(f'failed to parse {AppCfg.GEO_CAM_PARAM}:{d}')
cfg.setValue(par_nm, d)
elif nm in(AppCfg.GEO_CAM_TRF):
elif nm == AppCfg.GEO_CAM_TRF:
s=param.value()
#https://docs.python.org/3/library/re.html#simulating-scanf + no grouping
trf=np.array(tuple(map(float,re.findall('[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?',s)))).reshape(3,3)