예제 #1
0
    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)
예제 #2
0
    def saveState(self):
        state = AnalysisModule.saveState(self)

        # remove some unnecessary information
        state['colorMapper'].pop('fields', None)

        return state
예제 #3
0
파일: Imaging.py 프로젝트: hiuwo/acq4
    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')
예제 #4
0
    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)
예제 #5
0
    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)
예제 #6
0
파일: interface.py 프로젝트: hiuwo/acq4
 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)
예제 #7
0
파일: interface.py 프로젝트: hiuwo/acq4
 def quit(self):
     AnalysisModule.quit(self)
     for k in self.tasks:
         self.tasks[k].close()
     self.tasks.clear()
     self.currentTask = None
예제 #8
0
파일: interface.py 프로젝트: hiuwo/acq4
 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()
예제 #9
0
파일: Imaging.py 프로젝트: hiuwo/acq4
 def quit(self):
     AnalysisModule.quit(self)
예제 #10
0
 def quit(self):
     AnalysisModule.quit(self)
     for k in self.tasks:
         self.tasks[k].close()
     self.tasks.clear()
     self.currentTask = None
예제 #11
0
 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()
예제 #12
0
 def quit(self):
     AnalysisModule.quit(self)
     for p in self.tasks.values():
         p.close()
예제 #13
0
파일: Imaging.py 프로젝트: travis-open/acq4
 def quit(self):
     self.clear()
     AnalysisModule.quit(self)