当前位置: 首页>>代码示例>>Python>>正文


Python Collector.setReflectogrammLength方法代码示例

本文整理汇总了Python中collector.Collector.setReflectogrammLength方法的典型用法代码示例。如果您正苦于以下问题:Python Collector.setReflectogrammLength方法的具体用法?Python Collector.setReflectogrammLength怎么用?Python Collector.setReflectogrammLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在collector.Collector的用法示例。


在下文中一共展示了Collector.setReflectogrammLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: MainWindow

# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import setReflectogrammLength [as 别名]

#.........这里部分代码省略.........
        if is_interactive:
            self.interaction = interaction.Model()
        self.corraverager = Averager(self)
        self.corraverager.setNumber(settings["TimeScanner"]["averageNumber"])

        self.connectScanerWidget()
        self.connectOtherWidget()

        self.spectraplot.setChannel(self.otherWidget.plotChannel.value())

        self.corrector = DistanceCorrector(self)
        self.connectCorrectorWidget()
        corrector_settings = state.settings["DistanceCorrector"]
        self.corrector.setTargetDistance(corrector_settings["distance"])
        self.corrector.setA(corrector_settings["A"])
        self.corrector.setEnabled(corrector_settings["enabled"])
        self.corrector.setChannel(corrector_settings["channel"])
        self.corrector.setReaction(settings["USB"]["DIL_T"])

        self.maximizer.measured.connect(self.corrector.appendDistances)
        self.corrector.correct.connect(lambda val: self.state.update("USB", ("DIL_T", val)))
        state.subscribe("USB",
            lambda diff: None if diff[0] != "DIL_T" else self.corrector.setReaction(diff[1]))



        self.temperatureplot.t0 = lambda v:self.temperatureplot.myplot(v, 0)
        self.temperatureplot.t1 = lambda v:self.temperatureplot.myplot(v, 1)

        self.collector.temperatureCurveChanged.connect(self.temperatureplot.t0)
        self.collector.temperatureCurve2Changed.connect(self.temperatureplot.t1)


        self.collector.setReflectogrammLength(state.settings["PCIE"]["framelength"])


        self.status = "waiting"
        self.start = time.time()
        self.time_prev = time.time()
        self.resp_amp = []
        self.laserscanner = "PFGIT"
        self.enablePFGITscanner(True)
        self.scannerSelect.PFGIT.toggled.connect(self.enablePFGITscanner)
        if self.scannerSelect.PFGIT.isChecked():
            print "PFGIT enabled"
            self.maximizer.set_bottom(self.scannerWidget.bottom.value())
            self.maximizer.set_dt(self.scannerWidget.dt())
        else:
            print "DILT enabled"
            self.maximizer.set_bottom(self.DILTScannerWidget.bottom.value())
            self.maximizer.set_dt(self.DILTScannerWidget.dt())


        #WARNING old code! revision may be needed
        #self.collector.reflectogrammChanged.connect(self.dragonplot.myplot)
        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)

开发者ID:budylin,项目名称:pybotdr,代码行数:68,代码来源:mainwindow.py

示例2: MainWindow

# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import setReflectogrammLength [as 别名]

#.........这里部分代码省略.........
        self.corraverager.setNumber(self.scannerWidget.averageNumber.value())
        
        
        self.spectraplot.setChannel(self.otherWidget.plotChannel.value())
        
        self.corrector = DistanceCorrector(self)
        self.connectCorrectorWidget()
        self.corrector.setTargetDistance(self.correctorWidget.distance.value())
        self.corrector.setA(self.correctorWidget.A.value())
        self.corrector.setEnabled(self.correctorWidget.enabled.isChecked())
        self.corrector.setChannel(self.correctorWidget.channel.value())
        self.corrector.setReaction(self.usbWidget.spinBox_6.value())
        
        self.maximizer.measured.connect(self.corrector.appendDistances)        
        self.corrector.correct.connect(self.usbWidget.spinBox_6.setValue)
        self.usbWidget.spinBox_6.valueChanged.connect(self.corrector.setReaction)
        
        self.usbWorker.measured.connect(self.usbWidget.showResponse)
        self.usbWorker.measured.connect(self.collector.appendUSBResponse)
        self.usbWorker.statusChanged.connect(self.usbWidget.label_status.setText)
        
        
        self.temperatureplot.t0 = lambda v:self.temperatureplot.myplot(v, 0)
        self.temperatureplot.t1 = lambda v:self.temperatureplot.myplot(v, 1)
        
        self.collector.temperatureCurveChanged.connect(self.temperatureplot.t0)
        self.collector.temperatureCurve2Changed.connect(self.temperatureplot.t1)
                
        self.pcieClient = pcie.PCIENetWorker()
        self.pcieClient.setPCIESettings(self.pcieWidget.value())
        
        self.pcieClient.measured.connect(self.precollector.appendDragonResponse)
        self.precollector.reflectogrammChanged.connect(self.dragonplot.myplot)
        self.collector.setReflectogrammLength(self.pcieWidget.framelength.value())
        
        
        self.pcieClient.start()
        #self.pcieClient.measured.connect(lambda x: self.dragonplot.myplot(x.data))
        self.isScanning = False

        self.enablePulseScanner(True)
        self.scannerSelect.pulse.toggled.connect(self.enablePulseScanner)        
        

        self.pcieWidget.valueChanged.connect(self.pcieClient.setPCIESettings)

        #WARNING old code! revision may be needed
        #self.collector.reflectogrammChanged.connect(self.dragonplot.myplot)
        self.collector.spectraOnChipChanged.connect(self.spectraplot.setData)
        #self.collector.spectraChanged.connect(mypeakdetection)
        
        
        self.collector.sharedArrayChanged.connect(self.memoryupdater.updateShared)
        self.memoryupdater.updated.connect(self.correlator.update)
        self.memoryupdater.updated.connect(self.approximator.update)
        #self.scanner.dtChanged.connect(self.correlator.setDt)
        #self.scanner.dtChanged.connect(self.approximator.setDt)
        
        self.memoryupdater.updateShared((self.collector.shared, (2,) + self.collector.upScanMatrix.shape))
        #self.correlator.setDt(65535. / self.scannerWidget.nsteps.value())
        self.correlator.setDt(1.)
        self.correlator.measured.connect(self.distanceplot.myplot)

        #self.approximator.measured.connect(lambda t: self.distanceplot.myplot(t, n=1))
        
        self.scannerWidget.averageNumber.valueChanged.connect(self.corraverager.setNumber)
开发者ID:omega-photonics,项目名称:dragon-pyBOTDR,代码行数:70,代码来源:mainwindow.py


注:本文中的collector.Collector.setReflectogrammLength方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。