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)
示例#2
0
    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)
示例#3
0
    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)
示例#4
0
    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)
示例#5
0
 def write_gateMode(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setGateMode(mode)
示例#6
0
 def write_continuousTrigger(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setContinuousTrigger(mode)
示例#7
0
 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)
示例#9
0
 def write_useRawReadout(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setUseRawReadout(mode)
示例#10
0
 def write_threshold_gain(self, attr):
     data = attr.get_write_value()
     gain = AttrHelper.getDictValue(self.__ThresholdGain,data)
     threshold = _PilatusCamera.threshold()
     _PilatusCamera.setThresholdGain(threshold,gain)
示例#11
0
 def write_dataSource(self, attr):
     data = attr.get_write_value()
     _Xspress3Camera.setDataSource(
         self.attr_channel, AttrHelper.getDictValue(self.PyDataSrc,
                                                    data[0]))
示例#12
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)
示例#13
0
 def write_fill_mode(self, attr):
     data = attr.get_write_value()
     gapfill = AttrHelper.getDictValue(self.__FillMode, data)
     _PilatusCamera.setGapfill(gapfill)
示例#14
0
 def write_threshold_gain(self, attr):
     data = attr.get_write_value()
     gain = AttrHelper.getDictValue(self.__ThresholdGain, data)
     threshold = _PilatusCamera.threshold()
     _PilatusCamera.setThresholdGain(threshold, gain)
示例#15
0
 def write_type(self, attr):
     data = attr.get_write_value()
     type = AttrHelper.getDictValue(self.__ProcessType, data)
     _HexitecCamera.setType(type)
示例#16
0
 def write_triggered(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setTriggered(mode)
示例#17
0
 def write_outputSignalPolarity(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Polarity, data)
     _Mythen3Camera.setOutputSignalPolarity(mode)
示例#18
0
 def write_fill_mode(self, attr):
     data = attr.get_write_value()
     gapfill = AttrHelper.getDictValue(self.__FillMode,data)
     _PilatusCamera.setGapfill(gapfill)
示例#19
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)
示例#20
0
 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)
示例#22
0
 def write_badChannelInterpolation(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setBadChannelInterpolation(mode)
示例#23
0
 def write_ComputingMode(self, attr):
     data = attr.get_write_value()
     t = AttrHelper.getDictValue(self.__ComputingMode, data)
     self.__peakFinderMgr.setComputingMode(t)
示例#24
0
 def write_clockmode(self,attr):
     data = attr.get_write_value()
     print (data)
     clockmode = AttrHelper.getDictValue(self.__clockmode,data)
     print (clockmode)
     _XhCam.setupClock(clockmode)