diff --git a/aliases/bernina.py b/aliases/bernina.py index aaf4cf5..ac3afee 100755 --- a/aliases/bernina.py +++ b/aliases/bernina.py @@ -181,6 +181,11 @@ aliases = { 'z_und' : 142, 'desc' : 'Streaking arrival time monitor', 'eco_type' : 'timing.palm.Palm'}, + 'SLAAR21-LMOT' : { + 'alias' : 'Psen', + 'z_und' : 142, + 'desc' : 'Streaking arrival time monitor', + 'eco_type' : 'timing.psen.Psen'} # = dict( # alias = '' # z_und = diff --git a/timing/psen.py b/timing/psen.py new file mode 100755 index 0000000..e9b3ba9 --- /dev/null +++ b/timing/psen.py @@ -0,0 +1,26 @@ +from ..devices_general.motors import MotorRecord +from ..devices_general.smaract import SmarActRecord +from epics import PV +from ..devices_general.delay_stage import DelayStage + +class Psen: + def __init__(self,Id): + self.Id = Id + + self._delayStg = MotorRecord(self.Id+'-M561:MOT') + self.delay = DelayStage(self._delayStg) + + + def get_adjustable_positions_str(self): + ostr = '*****PSEN motor positions******\n' + + for tkey,item in self.__dict__.items(): + if hasattr(item,'get_current_value'): + pos = item.get_current_value() + ostr += ' ' + tkey.ljust(10) + ' : % 14g\n'%pos + return ostr + + + def __repr__(self): + return self.get_adjustable_positions_str() +