Ejemplo n.º 1
0
    def __init__(self, name, **config):
        BaseImageChannel.__init__(self, name, **config)

        self._block = []
        self._reason = ''

        self.clearAccumulated()
Ejemplo n.º 2
0
 def doPreinit(self, mode):
     BaseImageChannel.doPreinit(self, mode)
     if mode != SIMULATION:
         if self._getProperty('compact_readout') != 'True':
             raise ConfigurationError(self, 'server must be set to '
                                      'compact readout mode')
         if len(eval(self._getProperty('compact_foil_start'))) != \
            len(self.foilsorder):
             raise ConfigurationError(self, 'number of foils to read '
                                      'out from server does not match '
                                      'with "foilsorder" parameter')
         self._perfoil = int(self._getProperty('compact_per_foil'))
Ejemplo n.º 3
0
 def doReadArray(self, quality):
     narray = BaseImageChannel.doReadArray(self, quality)
     seconds = self._attached_timer.read(0)[0]
     cts = narray.sum()
     rate = calculateRate(self._rate_data, quality, cts, seconds)
     self.readresult = [cts, rate]
     return narray
Ejemplo n.º 4
0
    def doReadArray(self, quality):
        narray = BaseImageChannel.doReadArray(self, quality)
        seconds = self._attached_timer.read(0)[0]
        cts = narray.sum()
        cts_per_second = 0

        if seconds > 1e-8:
            if quality in (FINAL, INTERRUPTED) or seconds <= \
                    self._cts_seconds[1]:  # rate for full detector / time
                cts_per_second = cts / seconds
            else:  # live rate on detector (using deltas)
                cts_per_second = (cts - self._cts_seconds[0]) / (
                    seconds - self._cts_seconds[1])
        self._cts_seconds = [cts, seconds]

        self.readresult = [cts, cts_per_second]
        return narray
Ejemplo n.º 5
0
 def doInit(self, mode):
     BaseImageChannel.doInit(self, mode)
     self._rate_data = [0, 0]
Ejemplo n.º 6
0
 def doReadArray(self, quality):
     # need to wait for readout of the CCD
     self._hw_wait()
     return BaseImageChannel.doReadArray(self, quality)