本文整理汇总了Python中pyqtgraph.flowchart.library.common.CtrlNode类的典型用法代码示例。如果您正苦于以下问题:Python CtrlNode类的具体用法?Python CtrlNode怎么用?Python CtrlNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CtrlNode类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, name):
terminals = {
'dataIn': dict(io='in'),
'dataOut': dict(io='out'),
}
self._buffer = np.array([])
CtrlNode.__init__(self, name, terminals=terminals)
示例2: __init__
def __init__(self, name):
terminals = {
"accelX": dict(io="in"),
"accelY": dict(io="in"),
"accelZ": dict(io="in"),
"activity": dict(io="out"),
}
self.activities = {
"walk": "You're walking",
"hop": "You're running",
"none": "No activity yet...",
"stand": "You're standing",
"nodata": "Computing data...",
}
self.classes = ["stand", "walk", "hop"]
self.classifier = svm.SVC()
self.sample_data = {}
self.sample_rate = 30
self.sample_data["walk"] = self._read_data("walk")
self.sample_data["stand"] = self._read_data("stand")
self.sample_data["hop"] = self._read_data("hop")
self.sample_data["walk"] = self._transform_data(self.sample_data["walk"])
self.sample_data["stand"] = self._transform_data(self.sample_data["stand"])
self.sample_data["hop"] = self._transform_data(self.sample_data["hop"])
self._train_data()
CtrlNode.__init__(self, name, terminals=terminals)
示例3: __init__
def __init__(self, name):
terminals = {
'dataIn': dict(io='in'),
'dataOut': dict(io='out'),
}
CtrlNode.__init__(self, name, terminals=terminals)
示例4: __init__
def __init__(self, name):
terminals = {
'dataIn': dict(io='in'),
'dataOut': dict(io='out') # to specify whether it is input or output
} # other more advanced options are available
# as well..
CtrlNode.__init__(self, name, terminals=terminals)
示例5: __init__
def __init__(self, node_name):
terminals = {
'x_axis_in': dict(io='in'),
'z_axis_in': dict(io='in'),
'x_rotation_out': dict(io='out'),
'z_rotation_out': dict(io='out')
}
CtrlNode.__init__(self, node_name, terminals=terminals)
示例6: __init__
def __init__(self, name):
## Define the input / output terminals available on this node
terminals = {
'dataIn': dict(io='in'), # each terminal needs at least a name and
'dataOut': dict(io='out'), # to specify whether it is input or output
} # other more advanced options are available
# as well..
CtrlNode.__init__(self, name, terminals=terminals)
示例7: __init__
def __init__(self, name):
self.view = None
## Initialize node with only a single input terminal
CtrlNode.__init__( self, name,
terminals={
'data' : {'io':'in'},
'labelImage':{'io':'out'}
}
)
示例8: __init__
def __init__(self, name):
self.plot = None
self.curveOrig = None
self.curveNoise = None
CtrlNode.__init__(self, name, terminals={
'origIn': dict(io='in'),
'noiseIn': dict(io='in'),
'filterIn': dict(io='in'),
})
示例9: __init__
def __init__(self, name):
terminals = {
'xIn': dict(io='in'),
'zIn': dict(io='in'),
'xOut': dict(io='out'),
'yOut': dict(io='out'),
}
self._normalVector = np.array([])
self._offset = 512
CtrlNode.__init__(self, name, terminals=terminals)
示例10: __init__
def __init__(self, name):
terminals = {
'dataIn': dict(io='in'),
'convolution': dict(io='out'),
}
self.bufferSize = bufferSize
self.size = convolutionSize
self.kernel = None
CtrlNode.__init__(self, name, terminals=terminals)
示例11: __init__
def __init__(self, name):
terminals = {
'dataIn': dict(io='in'),
'buttons': dict(io='in'),
'dataOut': dict(io='out'),
}
self._buffer = np.array([])
self.buttons = None
self.plusPressed = False
self.minusPressed = False
CtrlNode.__init__(self, name, terminals=terminals)
示例12: __init__
def __init__(self, name):
terminals = {
'accelX': dict(io='in'),
'accelY': dict(io='in'),
'accelZ': dict(io='in'),
'activity': dict(io='out'),
}
self.activities = {
'walking': 'You\'re walking',
'running': 'You\'re running', 'none': 'No activity yet...',
'standing': 'You\'re standing',
'nodata': 'Computing data...'}
CtrlNode.__init__(self, name, terminals=terminals)
示例13: __init__
def __init__(self, name):
terminals = {
'Out': dict(io='out')
}
CtrlNode.__init__(self, name, terminals=terminals)
self.data_size = global_data.BUFFER_SIZE
self.batch_size = self.data_size #/ 10 # Update the whole signal buffer at once
self.block_count = self.data_size / self.batch_size
self.data = [0] * self.data_size # Signal data buffer
# Create and init update timer
self.timer = QtCore.QTimer()
self.timer.timeout.connect(self.updateSignal)
self.timer.start(global_data.UPDATE_INTERVAL)
# Pointer points to the value that will be updated next
self.pointer = 0