From 691cbf8e86beacf5f55e2ceb6e9a79bbaba4f4eb Mon Sep 17 00:00:00 2001 From: lemke_h Date: Tue, 30 Apr 2019 21:02:32 +0200 Subject: [PATCH] little fixes, attenuator --- eco/acquisition/dia.py | 4 ++-- eco/bernina/config.py | 4 ++-- eco/xoptics/pp.py | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/eco/acquisition/dia.py b/eco/acquisition/dia.py index 93a2685..a32c8a6 100644 --- a/eco/acquisition/dia.py +++ b/eco/acquisition/dia.py @@ -211,8 +211,8 @@ class DIAClient: except: pass if len(completepedestals)>0: - f = max(*completepedestals)[1][0] - #dtim,f = max((datetime.strptime(f.stem.split('pedestal_')[1].split('.')[0],"%Y%m%d_%H%M"),f) for f in p.glob('*.h5')) + #f = max(*completepedestals)[1][0] + dtim,f = max((datetime.strptime(f.stem.split('pedestal_')[1].split('.')[0],"%Y%m%d_%H%M"),f) for f in p.glob('*.h5')) self.pede_file = (f.parent / Path(f.stem.split('.')[0])).as_posix() def start(self): diff --git a/eco/bernina/config.py b/eco/bernina/config.py index 8ec5dd4..78968c3 100755 --- a/eco/bernina/config.py +++ b/eco/bernina/config.py @@ -22,7 +22,7 @@ from ..utilities.config import ( _eco_lazy_init = False config = ExperimentConfiguration( - "/sf/bernina/config/exp/bernina_config_eco.json", name="bernina_config" + "/sf/bernina/config/eco/bernina_config_eco.json", name="bernina_config" ) components = [ @@ -131,7 +131,7 @@ components = [ { "name": "xp", "args": [], - "kwargs": {"Id": "SAROP21-OPPI103", "evrout": "SGE-CPCW-72-EVR0:FrontUnivOut15-Ena-SP"}, + "kwargs": {"Id": "SAROP21-OPPI103", "IdCTA": "SAR-CCTA-ESB", "evrout": "SGE-CPCW-72-EVR0:FrontUnivOut15-Ena-SP"}, "z_und": 103, "desc": "X-ray pulse picker", "type": "eco.xoptics.pp:Pulsepick" diff --git a/eco/xoptics/pp.py b/eco/xoptics/pp.py index 2430a30..399d150 100755 --- a/eco/xoptics/pp.py +++ b/eco/xoptics/pp.py @@ -15,15 +15,16 @@ def addMotorRecordToSelf(self, name=None, Id=None): print("Warning! Could not find motor {name} (Id:{Id})") class Pulsepick: - def __init__(self, Id=None, evrout=None, name=None): + def __init__(self, Id=None, IdCTA = None, evrout=None, name=None): self.name = name self.alias = Alias(name) self.evrout = evrout self.Id = Id - self._start = PV(Id + ":seq0Ctrl-Start-I") - self._stop = PV(Id + ":seq0Ctrl-Stop-I") - self._cycles = PV(Id + ":seq0Ctrl-Cycles-I") + self.IdCTA = IdCTA + self._start = PV(self.IdCTA + ":seq0Ctrl-Start-I") + self._stop = PV(self.IdCTA + ":seq0Ctrl-Stop-I") + self._cycles = PV(self.IdCTA + ":seq0Ctrl-Cycles-I") self._openclose = PV(self.evrout) addMotorRecordToSelf(self, Id=self.Id + ":MOTOR_X1", name="x") addMotorRecordToSelf(self, Id=self.Id + ":MOTOR_Y1", name="y")