def __init__(self, dev, cmd, parentTask): ## make a few changes for compatibility with multiclamp if 'daqProtocol' not in cmd: cmd['daqProtocol'] = {} daqP = cmd['daqProtocol'] if 'command' in cmd: if 'holding' in cmd: daqP['command'] = { 'command': cmd['command'], 'holding': cmd['holding'] } else: daqP['command'] = {'command': cmd['command']} daqP['command']['lowLevelConf'] = {'mockFunc': self.write} cmd['daqProtocol']['primary'] = { 'record': True, 'lowLevelConf': { 'mockFunc': self.read } } DAQGenericTask.__init__(self, dev, cmd['daqProtocol'], parentTask) self.cmd = cmd modPath = os.path.abspath(os.path.split(__file__)[0])
def __init__(self, dev, cmd, parentTask): self.cmd = cmd self.dev = dev ## this happens in DAQGeneric initialization, but we need it here too since it is used in making the waveforms that go into DaqGeneric.__init__ if 'shutterMode' not in cmd: cmd['shutterMode'] = 'auto' ## create task structure to pass to daqGeneric, and retain a pointer to it here; DAQGeneric tasks will get filled in from LaserTask when self.configure() gets called cmd['daqProtocol'] = {} if 'shutter' in dev.config: cmd['daqProtocol']['shutter'] = {} if 'qSwitch' in dev.config: cmd['daqProtocol']['qSwitch'] = {} if 'pCell' in dev.config: cmd['daqProtocol']['pCell'] = {} #cmd['daqProtocol']['power'] = {} if cmd.get('alignMode', False): alignConfig = self.dev.config.get('alignmentMode', None) #if alignConfig is None: # raise Exception("Laser alignment mode requested, but this laser has no 'alignmentMode' in its configuration.") if alignConfig is not None: if 'shutter' in alignConfig: cmd['daqProtocol']['shutter']['preset'] = 1 if alignConfig['shutter'] else 0 if 'qSwitch' in alignConfig: cmd['daqProtocol']['qSwitch']['preset'] = 1 if alignConfig['qSwitch'] else 0 if 'pCell' in alignConfig: cmd['daqProtocol']['pCell']['preset'] = alignConfig['pCell'] elif 'power' in alignConfig: raise Exception("Alignment mode by power not implemented yet.") DAQGenericTask.__init__(self, dev, cmd['daqProtocol'], parentTask)
def __init__(self, dev, cmd, parentTask): #print "Camera task:", cmd daqCmd = {} if 'channels' in cmd: daqCmd = cmd['channels'] DAQGenericTask.__init__(self, dev, daqCmd, parentTask) self.__startOrder = [], [] self.camCmd = cmd self.lock = Mutex() self.recordHandle = None self.stopAfter = False self.stoppedCam = False self.returnState = {} self.frames = [] self.recording = False self.stopRecording = False self.resultObj = None
def __init__(self, dev, cmd, parentTask): ## make a few changes for compatibility with multiclamp if 'daqProtocol' not in cmd: cmd['daqProtocol'] = {} daqP = cmd['daqProtocol'] if 'command' in cmd: if 'holding' in cmd: daqP['command'] = {'command': cmd['command'], 'holding': cmd['holding']} else: daqP['command'] = {'command': cmd['command']} daqP['command']['lowLevelConf'] = {'mockFunc': self.write} cmd['daqProtocol']['primary'] = {'record': True, 'lowLevelConf': {'mockFunc': self.read}} DAQGenericTask.__init__(self, dev, cmd['daqProtocol'], parentTask) self.cmd = cmd modPath = os.path.abspath(os.path.split(__file__)[0])
def __init__(self, dev, cmd, parentTask): ## make a few changes for compatibility with multiclamp if "daqProtocol" not in cmd: cmd["daqProtocol"] = {} if "command" in cmd: if "holding" in cmd: cmd["daqProtocol"]["command"] = {"command": cmd["command"], "holding": cmd["holding"]} else: cmd["daqProtocol"]["command"] = {"command": cmd["command"]} ## Make sure we're recording from the correct secondary channel if dev.hasSecondaryChannel: if "mode" in cmd: mode = cmd["mode"] else: mode = dev.getMode() dev.reconfigureSecondaryChannel(mode) cmd["daqProtocol"]["secondary"] = {"record": True} cmd["daqProtocol"]["primary"] = {"record": True} DAQGenericTask.__init__(self, dev, cmd["daqProtocol"], parentTask) self.cmd = cmd
def __init__(self, dev, cmd, parentTask): ## make a few changes for compatibility with multiclamp if 'daqProtocol' not in cmd: cmd['daqProtocol'] = {} if 'command' in cmd: if 'holding' in cmd: cmd['daqProtocol']['command'] = {'command': cmd['command'], 'holding': cmd['holding']} else: cmd['daqProtocol']['command'] = {'command': cmd['command']} ## Make sure we're recording from the correct secondary channel if dev.hasSecondaryChannel: if 'mode' in cmd: mode = cmd['mode'] else: mode = dev.getMode() dev.reconfigureSecondaryChannel(mode) cmd['daqProtocol']['secondary'] = {'record': True} cmd['daqProtocol']['primary'] = {'record': True} DAQGenericTask.__init__(self, dev, cmd['daqProtocol'], parentTask) self.cmd = cmd
def __init__(self, dev, cmd, parentTask): self.cmd = cmd self.dev = dev ## this happens in DAQGeneric initialization, but we need it here too since it is used in making the waveforms that go into DaqGeneric.__init__ if 'shutterMode' not in cmd: cmd['shutterMode'] = 'auto' ## create task structure to pass to daqGeneric, and retain a pointer to it here; DAQGeneric tasks will get filled in from LaserTask when self.configure() gets called cmd['daqProtocol'] = {} if 'shutter' in dev.config: cmd['daqProtocol']['shutter'] = {} if 'qSwitch' in dev.config: cmd['daqProtocol']['qSwitch'] = {} if 'pCell' in dev.config: cmd['daqProtocol']['pCell'] = {} #cmd['daqProtocol']['power'] = {} if cmd.get('alignMode', False): alignConfig = self.dev.config.get('alignmentMode', None) #if alignConfig is None: # raise Exception("Laser alignment mode requested, but this laser has no 'alignmentMode' in its configuration.") if alignConfig is not None: if 'shutter' in alignConfig: cmd['daqProtocol']['shutter'][ 'preset'] = 1 if alignConfig['shutter'] else 0 if 'qSwitch' in alignConfig: cmd['daqProtocol']['qSwitch'][ 'preset'] = 1 if alignConfig['qSwitch'] else 0 if 'pCell' in alignConfig: cmd['daqProtocol']['pCell']['preset'] = alignConfig[ 'pCell'] elif 'power' in alignConfig: raise Exception( "Alignment mode by power not implemented yet.") DAQGenericTask.__init__(self, dev, cmd['daqProtocol'], parentTask)