Exemplo n.º 1
0
 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
 def write_gateMode(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setGateMode(mode)
Exemplo n.º 6
0
 def write_continuousTrigger(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setContinuousTrigger(mode)
Exemplo n.º 7
0
 def write_rateCorrection(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setRateCorrection(mode)
Exemplo n.º 8
0
 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)
Exemplo n.º 9
0
 def write_useRawReadout(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setUseRawReadout(mode)
Exemplo n.º 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)
Exemplo n.º 11
0
 def write_dataSource(self, attr):
     data = attr.get_write_value()
     _Xspress3Camera.setDataSource(
         self.attr_channel, AttrHelper.getDictValue(self.PyDataSrc,
                                                    data[0]))
Exemplo n.º 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)
Exemplo n.º 13
0
 def write_fill_mode(self, attr):
     data = attr.get_write_value()
     gapfill = AttrHelper.getDictValue(self.__FillMode, data)
     _PilatusCamera.setGapfill(gapfill)
Exemplo n.º 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)
Exemplo n.º 15
0
 def write_type(self, attr):
     data = attr.get_write_value()
     type = AttrHelper.getDictValue(self.__ProcessType, data)
     _HexitecCamera.setType(type)
Exemplo n.º 16
0
 def write_triggered(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setTriggered(mode)
Exemplo n.º 17
0
 def write_outputSignalPolarity(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Polarity, data)
     _Mythen3Camera.setOutputSignalPolarity(mode)
Exemplo n.º 18
0
 def write_fill_mode(self, attr):
     data = attr.get_write_value()
     gapfill = AttrHelper.getDictValue(self.__FillMode,data)
     _PilatusCamera.setGapfill(gapfill)
Exemplo n.º 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)
Exemplo n.º 20
0
 def write_nbits(self, attr):
     data = attr.get_write_value()
     nbits = AttrHelper.getDictValue(self.__Nbits, data)
     _Mythen3Camera.setNbits(nbits)
Exemplo n.º 21
0
 def write_output2_id(self, attr):
     id = attr.get_write_value()
     val = AttrHelper.getDictValue(self.__OutputSignalID, id)
     _RayonixHsInterface.setOutputSignalID(RayonixHsAcq.CHANNEL_2, val)
Exemplo n.º 22
0
 def write_badChannelInterpolation(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper.getDictValue(self.__Switch, data)
     _Mythen3Camera.setBadChannelInterpolation(mode)
Exemplo n.º 23
0
 def write_ComputingMode(self, attr):
     data = attr.get_write_value()
     t = AttrHelper.getDictValue(self.__ComputingMode, data)
     self.__peakFinderMgr.setComputingMode(t)
Exemplo n.º 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)