Exemplo n.º 1
0
 def __init__(self,
              info_header,
              parnames,
              parlist,
              psipos,
              phipos,
              monopos,
              cadpos,
              preset,
              detseq=1):
     detlist = [session.getDevice('det')]
     move = [[session.getDevice(devname), pos] for devname, pos in zip(
         ['psi', 'phi', 'mono', 'cad'], [psipos, phipos, monopos, cadpos])]
     Scan.__init__(self, [], [[]],
                   preset={'t': preset},
                   detlist=detlist,
                   scaninfo=info_header,
                   firstmoves=move)
     self._detseq = detseq
     self._parnames = [(v.split('/')[0:] or [''])[0] for v in parnames]
     self._parunits = [(v.split('/')[1:] or [''])[0] for v in parnames]
     self._paraValueinfo = tuple(Value(n, unit=u if u else 'rlu',
                                       fmtstr='%.2f') for n, u in
                                 zip(self._parnames, self._parunits)) + \
                           (Value('rd', unit='deg', fmtstr='%.2f'),
                            Value('rg', unit='deg', fmtstr='%.2f'))
     self._parlist = parlist
     self._point = None
     self._data = session.experiment.data
Exemplo n.º 2
0
 def valueInfo(self):
     return (Value('%s:min' % self.dev,
                   unit=self.dev.unit,
                   fmtstr=self.dev.fmtstr),
             Value('%s:max' % self.dev,
                   unit=self.dev.unit,
                   fmtstr=self.dev.fmtstr))
Exemplo n.º 3
0
 def valueInfo(self):
     resultlist = [Value('ch.sum', unit='cts', errors='sqrt',
                         type='counter', fmtstr='%d')]
     for ch in self.channels:
         resultlist.append(Value('ch%d' % ch, unit='cts', errors='sqrt',
                                 type='counter', fmtstr='%d'))
     return tuple(resultlist)
Exemplo n.º 4
0
 def valueInfo(self):
     return (
         Value(name=self.name + ' (total)',
               type='counter',
               fmtstr='%d',
               errors='sqrt',
               unit='cts'),
         Value(name=self.name + ' (rate)',
               type='monitor',
               fmtstr='%.1f',
               unit='cps'),
     )
Exemplo n.º 5
0
    def __init__(self,
                 header,
                 parnames,
                 parlist,
                 numpoints,
                 firstmoves=None,
                 multistep=None,
                 detlist=None,
                 envlist=None,
                 preset=None,
                 scaninfo=None,
                 subscan=False,
                 xindex=None):

        self._parlist = parlist
        self._parnames = [(v.split('/')[0:] or [''])[0] for v in parnames]
        self._parunits = [(v.split('/')[1:] or [''])[0] for v in parnames]
        self._valueInfo = tuple(
            Value(n, unit=u if u else 'rlu', fmtstr='%.2f')
            for n, u in zip(self._parnames, self._parunits))
        SweepScan.__init__(self, [], [], numpoints, firstmoves, multistep,
                           detlist, envlist, preset, scaninfo, subscan, xindex)
Exemplo n.º 6
0
 def valueInfo(self):
     return Value(name=self.name, type='counter', fmtstr='%.3f'),
Exemplo n.º 7
0
 def valueInfo(self):
     return Value('%s:avg' % self.dev, unit=self.dev.unit,
                  fmtstr=self.dev.fmtstr),
Exemplo n.º 8
0
 def valueInfo(self):
     if self.mode == 'tof':
         return (Value(self.name + '.roi',
                       unit='cts',
                       type='counter',
                       errors='sqrt',
                       fmtstr='%d'),
                 Value(self.name + '.total',
                       unit='cts',
                       type='counter',
                       errors='sqrt',
                       fmtstr='%d'),
                 Value('fit.contrast',
                       unit='',
                       type='other',
                       errors='next',
                       fmtstr='%.3f'),
                 Value('fit.contrastErr',
                       unit='',
                       type='error',
                       errors='none',
                       fmtstr='%.3f'),
                 Value('fit.avg',
                       unit='',
                       type='other',
                       errors='next',
                       fmtstr='%.1f'),
                 Value('fit.avgErr',
                       unit='',
                       type='error',
                       errors='none',
                       fmtstr='%.1f'),
                 Value('roi.contrast',
                       unit='',
                       type='other',
                       errors='next',
                       fmtstr='%.3f'),
                 Value('roi.contrastErr',
                       unit='',
                       type='error',
                       errors='none',
                       fmtstr='%.3f'),
                 Value('roi.avg',
                       unit='',
                       type='other',
                       errors='next',
                       fmtstr='%.1f'),
                 Value('roi.avgErr',
                       unit='',
                       type='error',
                       errors='none',
                       fmtstr='%.1f'))
     return (Value(self.name + '.roi',
                   unit='cts',
                   type='counter',
                   errors='sqrt',
                   fmtstr='%d'),
             Value(self.name + '.total',
                   unit='cts',
                   type='counter',
                   errors='sqrt',
                   fmtstr='%d'))
Exemplo n.º 9
0
 def valueInfo(self):
     return (Value('etime', unit='s', fmtstr='%.1f'),)
Exemplo n.º 10
0
 def detvalueinfo(self):
     return (Value('timer', unit='s', fmtstr='%.1f'),
             Value('monitor', unit='cts',
                   fmtstr='%d'), Value('ctr', unit='cts', fmtstr='%d'))
Exemplo n.º 11
0
 def valueInfo(self):
     return Value(name=self.name,
                  type='counter',
                  fmtstr='%d',
                  errors='sqrt',
                  unit='cts'),
Exemplo n.º 12
0
 def valueInfo(self):
     return Value(name=TOTAL, type="counter", fmtstr="%d", unit="cts"),