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 __init__(self,
              settings,
              devices,
              positions,
              firstmoves=None,
              multistep=None,
              detlist=None,
              envlist=None,
              preset=None,
              scaninfo=None,
              scantype=None):
     miezedev = session.getDevice('mieze', MiezeMaster)
     self._nsettings = 1
     self._notherdevs = len(devices)
     if settings is not None:
         if settings == '*' or settings == -1:
             settings = [sett['_name_'] for sett in miezedev.curtable]
         elif isinstance(settings, (str, int)):
             settings = [settings]
         self._nsettings = len(settings)
         new_devices = devices + [miezedev]
         new_positions = []
         if not positions:
             # the msingle case
             new_positions.extend([sett] for sett in settings)
         for poslist in positions:
             new_positions.extend(poslist + [sett] for sett in settings)
         devices = new_devices
         positions = new_positions
     Scan.__init__(self, devices, positions, firstmoves, multistep, detlist,
                   envlist, preset, scaninfo, scantype)
Exemplo n.º 3
0
 def __init__(self,
              devices,
              startpositions,
              endpositions,
              speed=None,
              firstmoves=None,
              multistep=None,
              detlist=None,
              envlist=None,
              scaninfo=None,
              subscan=False):
     self._speed = speed if speed is not None else devices[0].speed
     preset = {'live': True}
     Scan.__init__(self, devices, startpositions, endpositions, firstmoves,
                   multistep, detlist, envlist, preset, scaninfo, subscan)
Exemplo n.º 4
0
 def __init__(self,
              positions,
              firstmoves=None,
              multistep=None,
              detlist=None,
              envlist=None,
              preset=None,
              scaninfo=None,
              subscan=False):
     inst = session.instrument
     if not isinstance(inst, SXTalBase):
         raise NicosError('cannot do a Q scan, your instrument device '
                          'is not a sxtal device')
     Scan.__init__(self, [inst], positions, [], firstmoves, multistep,
                   detlist, envlist, preset, scaninfo, subscan)
     self._envlist[0:0] = [
         inst._attached_gamma, inst._attached_omega, inst._attached_nu
     ]
     if inst in self._envlist:
         self._envlist.remove(inst)