本文整理汇总了Python中dataset.Dataset.setupParameterListener方法的典型用法代码示例。如果您正苦于以下问题:Python Dataset.setupParameterListener方法的具体用法?Python Dataset.setupParameterListener怎么用?Python Dataset.setupParameterListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dataset.Dataset
的用法示例。
在下文中一共展示了Dataset.setupParameterListener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: newDataset
# 需要导入模块: from dataset import Dataset [as 别名]
# 或者: from dataset.Dataset import setupParameterListener [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
示例2: newDataset
# 需要导入模块: from dataset import Dataset [as 别名]
# 或者: from dataset.Dataset import setupParameterListener [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