def __init__(self, *args): AnalysisModule.__init__(self, *args) self.ui = Ui_Form() self.ui.setupUi(self) self.postGuiInit() self.man = getManager() self.ui.scannerDevCombo.setTypes('scanner') self.ui.clampDevCombo.setTypes('clamp') self.ui.cameraModCombo.setTypes('cameraModule') self.ui.clampBaseStartSpin.setOpts(suffix='s', siPrefix=True, bounds=[0, None], step=1e-3) self.ui.clampBaseStopSpin.setOpts(suffix='s', siPrefix=True, bounds=[0, None], step=1e-3) self.ui.clampTestStartSpin.setOpts(suffix='s', siPrefix=True, bounds=[0, None], step=1e-3) self.ui.clampTestStopSpin.setOpts(suffix='s', siPrefix=True, bounds=[0, None], step=1e-3) self.ui.spikeThresholdSpin.setOpts(suffix='V', siPrefix=True, bounds=[None, None], dec=True, minStep=0.05) self.ui.colorMapper.setFields([('maxPeak', {'mode': 'range', 'units': 'V'}), ('minPeak', {'mode': 'range', 'units': 'V'}), ('maxZScore', {'mode': 'range'}), ('minZScore', {'mode': 'range'}), ('nSpikes', {'mode': 'range'}), ]) self.tasks = {} self.currentTask = None self.ui.deleteBtn.clicked.connect(self.deleteSelected) self.stateGroup.sigChanged.connect(self.stateChanged) self.ui.taskList.currentItemChanged.connect(self.itemSelected) self.ui.taskList.itemClicked.connect(self.itemClicked) self.ui.recomputeBtn.clicked.connect(self.recompute)
def saveState(self): state = AnalysisModule.saveState(self) # remove some unnecessary information state['colorMapper'].pop('fields', None) return state
def __init__(self, *args): AnalysisModule.__init__(self, *args) self.ui = Ui_Form() self.ui.setupUi(self) self.postGuiInit() self.man = getManager() #self.image=pg.ImageView() #self.ui.histogram.setImageItem(self.image) #self.ui.histogram.autoHistogramRange() #self.ui.plotWidget.addItem(self.image) #self.ui.plotWidget.setLabel('bottom', 'Time', 's') #self.ui.plotWidget.setLabel('left', 'Distance', 'm') #self.ui.plotWidget.register('ImagingPlot') self.ui.alphaSlider.valueChanged.connect(self.imageAlphaAdjust) self.img = None ## image shown in camera module self.ui.scannerComboBox.setTypes('scanner') self.ui.detectorComboBox.setTypes('daqChannelGroup')
def __init__(self, *args): AnalysisModule.__init__(self, *args) self.layout = Qt.QGridLayout() self.setLayout(self.layout) self.splitter = Qt.QSplitter() self.layout.addWidget(self.splitter) self.ptree = ParameterTree() self.splitter.addWidget(self.ptree) self.imageView = pg.ImageView() self.splitter.addWidget(self.imageView) self.params = Parameter(name='imager', children=[ dict(name='scanner', type='interface', interfaceTypes=['scanner']), dict(name='detectors', type='group', addText="Add detector.."), dict(name='decomb', type='float', readonly=False, value=20e-6, suffix='s', siPrefix=True, bounds=[0, 1e-3], step=1e-6, decimals=5, children=[ dict(name='auto', type='action'), dict(name='subpixel', type='bool', value=False), ]), dict(name='downsample', type='int', value=1, suffix='x', bounds=[1,None]), dict(name='display', type='bool', value=True), dict(name='scanProgram', type='list', values=[]), dict(name='Objective', type='str', value='Unknown', readonly=True), dict(name='Filter', type='str', value='Unknown', readonly=True), ]) self.ptree.setParameters(self.params, showTop=False) self.params.sigTreeStateChanged.connect(self.update) self.params.child('detectors').sigAddNew.connect(self.addDetectorClicked) self.params.child('decomb', 'auto').sigActivated.connect(self.autoDecomb) self.man = getManager() self.scannerDev = self.man.getDevice(self.params['scanner']) # find first scope device that is parent of scanner dev = self.scannerDev while dev is not None and not isinstance(dev, Microscope): dev = dev.parentDevice() self.scopeDev = dev self.lastFrame = None # self.SUF = SUFA.ScannerUtilities() # self.ui.alphaSlider.valueChanged.connect(self.imageAlphaAdjust) self.img = pg.ImageItem() ## image shown in camera module self.img.setLookupTable(self.imageView.ui.histogram.getLookupTable) # image fetches LUT from the ImageView self.imageView.ui.histogram.sigLevelsChanged.connect(self._updateCamModImage) self.imageView.imageItem.setAutoDownsample(True)
def __init__(self, *args): AnalysisModule.__init__(self, *args) self.ui = Ui_Form() self.ui.setupUi(self) self.postGuiInit() self.man = getManager() #devs = self.man.listDevices() #for d in devs: #self.ui.scannerDevCombo.addItem(d) #self.ui.clampDevCombo.addItem(d) #self.fillModuleList() self.ui.scannerDevCombo.setTypes('scanner') self.ui.clampDevCombo.setTypes('clamp') self.ui.cameraModCombo.setTypes('cameraModule') self.tasks = {} self.currentTask = None self.ui.deleteBtn.clicked.connect(self.deleteSelected) self.stateGroup.sigChanged.connect(self.stateChanged) self.ui.taskList.currentItemChanged.connect(self.itemSelected) self.ui.taskList.itemClicked.connect(self.itemClicked) self.ui.recomputeBtn.clicked.connect(self.recompute)
def quit(self): AnalysisModule.quit(self) for k in self.tasks: self.tasks[k].close() self.tasks.clear() self.currentTask = None
def quit(self): #QtCore.QObject.disconnect(getManager(), QtCore.SIGNAL('modulesChanged'), self.fillModuleList) #getManager().sigModulesChanged.disconnect(self.fillModuleList) AnalysisModule.quit(self) for p in self.tasks.values(): p.close()
def quit(self): AnalysisModule.quit(self)
def quit(self): #Qt.QObject.disconnect(getManager(), Qt.SIGNAL('modulesChanged'), self.fillModuleList) #getManager().sigModulesChanged.disconnect(self.fillModuleList) AnalysisModule.quit(self) for p in self.tasks.values(): p.close()
def quit(self): AnalysisModule.quit(self) for p in self.tasks.values(): p.close()
def quit(self): self.clear() AnalysisModule.quit(self)