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


Python Dataset.listenForPlotParameter方法代码示例

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


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

示例1: newDataset

# 需要导入模块: from dataset import Dataset [as 别名]
# 或者: from dataset.Dataset import listenForPlotParameter [as 别名]
 def newDataset(self, dataset, directory, manuallyLoaded, datasetName):
     context = yield self.cxn.context() # create a new context
     datasetObject = Dataset(self, self.cxn, context, dataset, directory, datasetName, self.reactor)
     self.datasetDict[dataset, directory] = datasetObject
     yield datasetObject.openDataset(context)
     yield datasetObject.setupParameterListener(context)
     yield datasetObject.checkForPlotParameter()
     datasetLabels = yield datasetObject.getYLabels()
     windowName = []
     if (len(self.winDict.values()) < MAXWINDOWS):
         # if the dataset was loaded manually, it does not require the 'plotLive' parameter 
         if (manuallyLoaded == True):
             self.prepareDataset(datasetObject, dataset, directory, datasetLabels, windowName)#, context)
         else:        
             hasPlotParameter = yield datasetObject.listenForPlotParameter()
             if (hasPlotParameter == True):
                 windowParameter = datasetObject.getWindowParameter()
                 # if windows are specified (via parameter), send that instead
                 if (windowParameter != None):
                     self.prepareDataset(datasetObject, dataset, directory, datasetLabels, windowParameter)#, context)
                 else:
                     self.prepareDataset(datasetObject, dataset, directory, datasetLabels, windowName)#, context)
             else:
                 # This data is not for plotting. Remove it.
                 # There should be a cleaner way of doing this
                 datasetObject.endTimer()
                 del datasetObject
     else:
         print 'Too many windows open!'
         datasetObject.endTimer()
         del datasetObject
开发者ID:EQ4,项目名称:resonator,代码行数:33,代码来源:connections.py

示例2: newDataset

# 需要导入模块: from dataset import Dataset [as 别名]
# 或者: from dataset.Dataset import listenForPlotParameter [as 别名]
 def newDataset(self, dataset, directory, manuallyLoaded):
     context = yield self.cxn.context() # create a new context
     datasetObject = Dataset(self.cxn, context, dataset, directory)
     self.datasetDict[dataset, directory] = datasetObject
     yield datasetObject.openDataset(context)
     yield datasetObject.setupParameterListener(context)
     yield datasetObject.checkForPlotParameter()
     datasetLabels = yield datasetObject.getYLabels()
     # if the dataset was loaded manually, it does not require the 'plotLive' parameter 
     if (manuallyLoaded == True):
         self.prepareDataset(datasetObject, dataset, directory, datasetLabels, context)
     else:        
         hasPlotParameter = yield datasetObject.listenForPlotParameter()
         if (hasPlotParameter == True):
             self.prepareDataset(datasetObject, dataset, directory, datasetLabels, context)
         else:
             # This data is not for plotting. Remove it.
             # There should be a cleaner way of doing this
             del datasetObject
开发者ID:noli,项目名称:HaeffnerLabSQIP,代码行数:21,代码来源:connections.py


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