def applyNewPropery(self, prop_name, extra=None): if extra is not None: name = self.__OtherAttribute2FunctionBase[prop_name] else: name = self.__Attribute2FunctionBase[prop_name] dict = getattr(self, '_'+self.__class__.__name__+'__'+name) func = getattr(_RayonixHsInterface, 'set'+name) key = getattr(self, prop_name) val = AttrHelper.getDictValue(dict, key.upper()) if val is None: deb.Error('Wrong value for property %s :%s' % (prop_name, val)) else: if extra is not None: func(extra,val) else: func(val)
def applyNewPropery(self, prop_name, extra=None): if extra is not None: name = self.__OtherAttribute2FunctionBase[prop_name] else: name = self.__Attribute2FunctionBase[prop_name] key = getattr(self, prop_name) if not key: return # property is not set dict = getattr(self, '_' + self.__class__.__name__ + '__' + name) func = getattr(self.__MetaMpx, 'set' + name) deb.Always('Setting property ' + prop_name) val = AttrHelper.getDictValue(dict, key.upper()) if val is None: deb.Error('Wrong value for property %s :%s' % (prop_name, val)) else: if extra is not None: func(extra, val) else: func(val)
def applyNewPropery(self, prop_name, extra=None): if extra is not None: name = self.__OtherAttribute2FunctionBase[prop_name] else: name = self.__Attribute2FunctionBase[prop_name] key = getattr(self, prop_name) if not key: return # property is not set dict = getattr(self, '_'+self.__class__.__name__+'__'+name) _PriamAcq = _MaxipixInterface.priamAcq() if prop_name.count('fill_mode'): func = getattr(_MaxipixInterface, 'set'+name) else: func = getattr(_PriamAcq, 'set'+name) deb.Always('Setting property '+prop_name) val = AttrHelper.getDictValue(dict, key.upper()) if val is None: deb.Error('Wrong value for property %s :%s' % (prop_name, val)) else: if extra is not None: func(extra,val) else: func(val)
def applyNewPropery(self, prop_name, extra=None): if extra is not None: name = self.__OtherAttribute2FunctionBase[prop_name] else: name = self.__Attribute2FunctionBase[prop_name] key = getattr(self, prop_name) if not key: return # property is not set dict = getattr(self, '_' + self.__class__.__name__ + '__' + name) _PriamAcq = _MaxipixInterface.priamAcq() if prop_name.count('fill_mode'): func = getattr(_MaxipixInterface, 'set' + name) else: func = getattr(_PriamAcq, 'set' + name) deb.Always('Setting property ' + prop_name) val = AttrHelper.getDictValue(dict, key.upper()) if val is None: deb.Error('Wrong value for property %s :%s' % (prop_name, val)) else: if extra is not None: func(extra, val) else: func(val)
def write_gateMode(self, attr): data = attr.get_write_value() mode = AttrHelper.getDictValue(self.__Switch, data) _Mythen3Camera.setGateMode(mode)
def write_continuousTrigger(self, attr): data = attr.get_write_value() mode = AttrHelper.getDictValue(self.__Switch, data) _Mythen3Camera.setContinuousTrigger(mode)
def write_rateCorrection(self, attr): data = attr.get_write_value() mode = AttrHelper.getDictValue(self.__Switch, data) _Mythen3Camera.setRateCorrection(mode)
def write_output2_signal_type(self, attr): sig_type = attr.get_write_value() val = AttrHelper.getDictValue(self.__OutputSignalType, sig_type) _RayonixHsInterface.setOutputSignalType(RayonixHsAcq.CHANNEL_2, val)
def write_useRawReadout(self, attr): data = attr.get_write_value() mode = AttrHelper.getDictValue(self.__Switch, data) _Mythen3Camera.setUseRawReadout(mode)
def write_threshold_gain(self, attr): data = attr.get_write_value() gain = AttrHelper.getDictValue(self.__ThresholdGain,data) threshold = _PilatusCamera.threshold() _PilatusCamera.setThresholdGain(threshold,gain)
def write_dataSource(self, attr): data = attr.get_write_value() _Xspress3Camera.setDataSource( self.attr_channel, AttrHelper.getDictValue(self.PyDataSrc, data[0]))
def write_readout_geometry(self, attr): if _PilatusCamera.hasRoiCapability(): data = attr.get_write_value() image = _CtControl.image() roi = AttrHelper.getDictValue(self.__ReadoutRoi, data) image.setRoi(roi)
def write_fill_mode(self, attr): data = attr.get_write_value() gapfill = AttrHelper.getDictValue(self.__FillMode, data) _PilatusCamera.setGapfill(gapfill)
def write_threshold_gain(self, attr): data = attr.get_write_value() gain = AttrHelper.getDictValue(self.__ThresholdGain, data) threshold = _PilatusCamera.threshold() _PilatusCamera.setThresholdGain(threshold, gain)
def write_type(self, attr): data = attr.get_write_value() type = AttrHelper.getDictValue(self.__ProcessType, data) _HexitecCamera.setType(type)
def write_triggered(self, attr): data = attr.get_write_value() mode = AttrHelper.getDictValue(self.__Switch, data) _Mythen3Camera.setTriggered(mode)
def write_outputSignalPolarity(self, attr): data = attr.get_write_value() mode = AttrHelper.getDictValue(self.__Polarity, data) _Mythen3Camera.setOutputSignalPolarity(mode)
def write_fill_mode(self, attr): data = attr.get_write_value() gapfill = AttrHelper.getDictValue(self.__FillMode,data) _PilatusCamera.setGapfill(gapfill)
def write_readout_geometry(self, attr): if _PilatusCamera.hasRoiCapability(): data = attr.get_write_value() image = _CtControl.image() roi = AttrHelper.getDictValue(self.__ReadoutRoi, data) image.setRoi(roi)
def write_nbits(self, attr): data = attr.get_write_value() nbits = AttrHelper.getDictValue(self.__Nbits, data) _Mythen3Camera.setNbits(nbits)
def write_output2_id(self, attr): id = attr.get_write_value() val = AttrHelper.getDictValue(self.__OutputSignalID, id) _RayonixHsInterface.setOutputSignalID(RayonixHsAcq.CHANNEL_2, val)
def write_badChannelInterpolation(self, attr): data = attr.get_write_value() mode = AttrHelper.getDictValue(self.__Switch, data) _Mythen3Camera.setBadChannelInterpolation(mode)
def write_ComputingMode(self, attr): data = attr.get_write_value() t = AttrHelper.getDictValue(self.__ComputingMode, data) self.__peakFinderMgr.setComputingMode(t)
def write_clockmode(self,attr): data = attr.get_write_value() print (data) clockmode = AttrHelper.getDictValue(self.__clockmode,data) print (clockmode) _XhCam.setupClock(clockmode)