本文整理汇总了Python中collector.Collector.clear方法的典型用法代码示例。如果您正苦于以下问题:Python Collector.clear方法的具体用法?Python Collector.clear怎么用?Python Collector.clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collector.Collector
的用法示例。
在下文中一共展示了Collector.clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import clear [as 别名]
#.........这里部分代码省略.........
print "stopping DILT scan"
if not self.status == "scanning":
self.conttimer.timeout.disconnect(self._cont_DILT)
else:
self.status = "idle"
def mouseDoubleClickEvent(self, event):
widgets = [self.usbWidget]
if self.plotsOnly:
for w in widgets:
w.show()
self.plotsOnly = False
else:
for w in widgets:
w.hide()
self.plotsOnly = True
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_F1:
self.freezeGraphs()
super(Base, self).keyPressEvent(event)
def freezeGraphs(self):
if self.plotsFreezed:
self.collector.reflectogrammChanged.connect(self.dragonplot.myplot)
self.collector.spectraOnChipChanged.connect(self.spectraplot.setData)
self.collector.temperatureCurveChanged.connect(self.temperatureplot.t0)
self.collector.temperatureCurve2Changed.connect(self.temperatureplot.t1)
self.correlator.measured.connect(self.distanceplot.myplot)
self.corraverager.measured.connect(self.distanceplot.d2)
else:
self.collector.reflectogrammChanged.disconnect(self.dragonplot.myplot)
self.collector.spectraOnChipChanged.disconnect(self.spectraplot.setData)
self.collector.temperatureCurveChanged.disconnect(self.temperatureplot.t0)
self.collector.temperatureCurve2Changed.disconnect(self.temperatureplot.t1)
self.correlator.measured.disconnect(self.distanceplot.myplot)
self.corraverager.measured.disconnect(self.distanceplot.d2)
self.plotsFreezed = not self.plotsFreezed
def _cont(self):
print "started scanning with PFGIT"
self.status = "scanning"
self.laserscanner = "PFGIT"
self.collector.clear()
self.PFGITscanner.reset()
self.collector.setNextIndex(self.PFGITscanner.pos)
def _cont_DILT(self):
print "started scanning with DILT"
self.status = "scanning"
self.laserscanner = "DIL"
self.collector.clear()
self.DIL_Tscanner.reset()
self.collector.setNextIndex(self.DIL_Tscanner.pos)
self.startUpScan()
def process_secondary(self):
for i in range(4):
diff = self.secondary.diffs[i] - (i - 1.5) * 20
self.diffsPlot.myplot(diff, n=i)
print self.secondary.results.shape
print self.secondary.results[:,990:1010]
print self.secondary.results[:,10990:11010]
print np.sum(self.secondary.results, axis=1)
def connectCorrectorWidget(self):
self.correctorWidget.A.valueChanged.connect(self.corrector.setA)
self.correctorWidget.channel.valueChanged.connect(self.corrector.setChannel)
self.correctorWidget.enabled.toggled.connect(self.corrector.setEnabled)
self.correctorWidget.distance.valueChanged.connect(self.corrector.setTargetDistance)
def connectScanerWidget(self):
self.scannerWidget.top.valueChanged.connect(self.PFGITscanner.setTop)
self.scannerWidget.bottom.valueChanged.connect(self.PFGITscanner.setBottom)
self.scannerWidget.nsteps.valueChanged.connect(self.PFGITscanner.setNdot)
self.scannerWidget.accurateScan.clicked.connect(self.start_PFGIT_scan)
self.DILTScannerWidget.top.valueChanged.connect(self.DIL_Tscanner.setTop)
self.DILTScannerWidget.bottom.valueChanged.connect(self.DIL_Tscanner.setBottom)
self.DILTScannerWidget.nsteps.valueChanged.connect(self.DIL_Tscanner.setNdot)
self.DILTScannerWidget.accurateScan.clicked.connect(self.start_DILT_scan)
def connectOtherWidget(self):
self.otherWidget.plotChannel.valueChanged.connect(self.spectraplot.setChannel)
self.otherWidget.saveData.clicked.connect(self.collector.savelastscan)
self.otherWidget.saveView.clicked.connect(self.saveView)
self.otherWidget.inverse.toggled.connect(
self.collector.setInversion)
def start_FOL2_oscilation(self):
self.killTimer(self.FOL2timer)
self.FOL2timer = self.startTimer(self.usbWidget.FOL2_period.value())
def closeEvent(self, event):
pass
示例2: MainWindow
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import clear [as 别名]
#.........这里部分代码省略.........
for w in widgets:
w.hide()
self.plotsOnly = True
def keyPressEvent(self, event):
print event.key()
print "123"
if event.key() == QtCore.Qt.Key_F1:
print "F1 pressed"
self.freezeGraphs()
super(Base, self).keyPressEvent(event)
def freezeGraphs(self):
if self.plotsFreezed:
self.collector.reflectogrammChanged.connect(self.dragonplot.myplot)
self.collector.spectraOnChipChanged.connect(self.spectraplot.setData)
self.collector.temperatureCurveChanged.connect(self.temperatureplot.t0)
self.collector.temperatureCurve2Changed.connect(self.temperatureplot.t1)
self.correlator.measured.connect(self.distanceplot.myplot)
self.corraverager.measured.connect(self.distanceplot.d2)
else:
self.collector.reflectogrammChanged.disconnect(self.dragonplot.myplot)
self.collector.spectraOnChipChanged.disconnect(self.spectraplot.setData)
self.collector.temperatureCurveChanged.disconnect(self.temperatureplot.t0)
self.collector.temperatureCurve2Changed.disconnect(self.temperatureplot.t1)
self.correlator.measured.disconnect(self.distanceplot.myplot)
self.corraverager.measured.disconnect(self.distanceplot.d2)
self.plotsFreezed = not self.plotsFreezed
def _cont(self):
print "started"
self.isScanning = True
self.collector.clear()
print "cleared"
self.scanner.reset()
print "reset"
self.pcieClient.measured.connect(self.collector.appendDragonResponse)
#self.precollector.averaged.connect(self.collector.appendDragonResponse)
self.scanner.scan()
self.collector.reflectogrammChanged.connect(self.scanner.scan)
self.scanner.boundaryReached.connect(
self.approximator.process_submatrix)
self.scanner.boundaryReached.connect(
self.correlator.process_submatrix)
self.scanner.boundaryReached.connect(
self.maximizer.process_submatrix)
def _cont_DILT(self):
print "started"
self.isScanning = True
self.collector.clear()
self.DIL_Tscanner.reset()
self.pcieClient.measured.connect(self.collector.appendDragonResponse)
#self.precollector.averaged.connect(self.collector.appendDragonResponse)
self.DIL_Tscanner.scan()
self.usbWorker.start_up_scan()
self.collector.reflectogrammChanged.connect(self.DIL_Tscanner.scan)
self.DIL_Tscanner.topReached.connect(self.usbWorker.start_down_scan)
self.DIL_Tscanner.bottomReached.connect(self.usbWorker.start_up_scan)
self.DIL_Tscanner.boundaryReached.connect(
self.approximator.process_submatrix)