本文整理汇总了Python中collector.Collector.setSpectraLength方法的典型用法代码示例。如果您正苦于以下问题:Python Collector.setSpectraLength方法的具体用法?Python Collector.setSpectraLength怎么用?Python Collector.setSpectraLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collector.Collector
的用法示例。
在下文中一共展示了Collector.setSpectraLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import setSpectraLength [as 别名]
#.........这里部分代码省略.........
self.collector.spectraOnChipChanged.connect(self.spectraplot.setData)
# This connections must be replaced with clear code
self.collector.sharedArrayChanged.connect(self.memoryupdater.updateShared)
self.memoryupdater.updated.connect(self.correlator.update)
self.memoryupdater.updateShared((self.collector.shared, (2,) + self.collector.upScanMatrix.shape))
self.correlator.setDt(1.)
self.correlator.measured.connect(self.distanceplot.myplot)
self.scannerWidget.averageNumber.valueChanged.connect(self.corraverager.setNumber)
self.distanceplot.d2 = lambda t: self.distanceplot.myplot(t, n=3)
self.distanceplot.d3 = lambda t: self.distanceplot.myplot(t, n=4)
self.corraverager.measured.connect(self.distanceplot.d2)
self.pcieWidget.framelength.valueChanged.connect(self.collector.setReflectogrammLength)
self.measuretimer = self.startTimer(1000)
#self.FOL2timer = self.startTimer(self.usbWidget.FOL2_period.value())
self.pcieWidget.framelength.valueChanged.connect(self.change_scan_time)
self.pcieWidget.framecount.valueChanged.connect(self.change_scan_time)
self.DILTScannerWidget.nsteps.valueChanged.connect(self.change_scan_time)
self.change_scan_time()
self.showMaximized()
self.plotsOnly = False
self.plotsFreezed = False
self.DILTScannerWidget.nsteps.valueChanged.connect(self.collector.setSpectraLength)
self.DIL_Tscanner.scanPositionChanged.connect(self.DILTScannerWidget.position.setNum)
self.scannerWidget.nsteps.valueChanged.connect(self.collector.setSpectraLength)
self.PFGITscanner.scanPositionChanged.connect(self.scannerWidget.position.setNum)
self.scannerWidget.dtChanged.connect(self.maximizer.set_dt)
self.scannerWidget.bottom.valueChanged.connect(
self.maximizer.set_bottom)
self.otherWidget.work.toggled.connect(self.on_work)
def on_work(self, val):
if not val:
self.status = "idle"
else:
self.status = "waiting"
def on_wait(self, data):
t, T1, T2 = self.collector.get_actual_temperature(2 * EXT_STAB_TIME)
targets = [self.state.settings["USB"]["T1set"],
self.state.settings["USB"]["T2set"]]
if logic.check_stability(t, [T1, T2], targets, EXT_STAB_TIME):
self.status = "searching"
self.state.update("PCIE", ("framecount", 200))
print "Searching"
middle = (self.state.settings["TimeScanner"]["top"] +
self.state.settings["TimeScanner"]["bottom"]) / 2
self.state.update("USB", ("PFGI_TscanAmp", middle))
setter = lambda x: self.state.update("USB", ("DIL_T", x))
dt = INT_STAB_RATE * SEARCH_STEP / 3
logic.init_search(SEARCH_BOT, SEARCH_TOP, SEARCH_STEP,
dt, setter)
def on_scan(self, pcie_dev_response):
示例2: MainWindow
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import setSpectraLength [as 别名]
#.........这里部分代码省略.........
self.usbWorker.setDIL_T_scan_top(self.DILTScannerWidget.top.value())
self.usbWorker.setDIL_T_scan_bottom(self.DILTScannerWidget.bottom.value())
self.scanner.dtChanged.connect(self.maximizer.set_dt)
self.scanner.bottomChanged.connect(self.maximizer.set_bottom)
self.scanner.updaterange()
self.showMaximized()
self.plotsOnly = False
self.plotsFreezed = False
def change_scan_time(self):
framelength = self.pcieWidget.framelength.value()
framecount = self.pcieWidget.framecount.value()
ndot = self.DILTScannerWidget.nsteps.value()
time = 2 * framelength * framecount * ndot / 133000000
print "Estimated scan time is {} seconds".format(time)
self.usbWorker.setDIL_T_scan_time(time)
def enablePulseScanner(self, val):
self.DILTScannerWidget.setEnabled(not val)
self.scannerWidget.setEnabled(val)
if val:
print "scanning with pulse"
try:
self.collector.reflectogrammChanged.disconnect(self.DIL_Tscanner.measure)
except TypeError:
pass
try:
self.DIL_Tscanner.measured.disconnect(self.collector.appendOnChipTemperature)
except TypeError:
pass
try:
self.DILTScannerWidget.nsteps.valueChanged.disconnect(self.collector.setSpectraLength)
except TypeError:
pass
try:
self.DIL_Tscanner.scanPositionChanged.disconnect(self.DILTScannerWidget.position.setNum)
except TypeError:
pass
try:
self.DIL_Tscanner.nextIndexChanged.connect(self.collector.setNextIndex)
except TypeError:
pass
if self.isScanning:
self.start_DILT_scan(False)
self.collector.reflectogrammChanged.connect(self.scanner.measure)
self.scanner.measured.connect(self.collector.appendOnChipTemperature)
self.scannerWidget.nsteps.valueChanged.connect(self.collector.setSpectraLength)
self.collector.setSpectraLength(self.scanner.ndot)
self.scanner.scanPositionChanged.connect(self.scannerWidget.position.setNum)
self.scanner.nextIndexChanged.connect(self.collector.setNextIndex)
else:
print "scanning with cont"
self.collector.reflectogrammChanged.connect(self.DIL_Tscanner.measure)
self.DIL_Tscanner.measured.connect(self.collector.appendOnChipTemperature)
self.DILTScannerWidget.nsteps.valueChanged.connect(self.collector.setSpectraLength)
self.collector.setSpectraLength(self.DIL_Tscanner.ndot)
self.DIL_Tscanner.scanPositionChanged.connect(self.DILTScannerWidget.position.setNum)
self.DIL_Tscanner.nextIndexChanged.connect(self.collector.setNextIndex)
try:
self.collector.reflectogrammChanged.disconnect(self.scanner.measure)
except TypeError: