本文整理汇总了Python中Display.View.close方法的典型用法代码示例。如果您正苦于以下问题:Python View.close方法的具体用法?Python View.close怎么用?Python View.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display.View
的用法示例。
在下文中一共展示了View.close方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: User
# 需要导入模块: from Display import View [as 别名]
# 或者: from Display.View import close [as 别名]
#.........这里部分代码省略.........
newWireIn = self.doubleSpinBox_14.value()
self.nerfModel.SendPara(newVal = newWireIn, trigEvent = 14)
def onNewWireIn15(self):
newWireIn = self.doubleSpinBox_15.value()
self.nerfModel.SendPara(newVal = newWireIn, trigEvent = 15)
def plotData(self, data):
from pylab import plot, show, subplot
import numpy as np
if (data != []):
forplot = np.array(data)
for i in xrange(NUM_CHANNEL):
subplot(NUM_CHANNEL, 1, i+1)
plot(forplot[:, i])
show()
@pyqtSignature("QString")
def on_comboBox_activated(self, p0):
"""
Slot documentation goes here.
"""
choice = p0
if choice == "Spike Train 1Hz":
# pipeInData = spike_train(firing_rate = 1)
pipeInData = gen_sin(F = 1.0, AMP = 0.3, BIAS = 1.0)
# pipeInData = chirping_spike_train(coeff_a = 20)
elif choice == "Spike Train 10Hz":
# pipeInData = spike_train(firing_rate = 100)
pipeInData = gen_sin(F = 4.0, AMP = 0.3, BIAS = 1.57)
# pipeInData = chirping_spike_train(coeff_a = 40)
elif choice == "Spike Train 20Hz":
# pipeInData = gen_tri()
# pipeInData = spike_train(firing_rate = 500)
pipeInData = chirping_spike_train(coeff_a =60)
#self.nerfModel.SendPipeInt(pipeInData) # for spike_train(), SendPipeInt, SendPipe same result.
self.nerfModel.SendPipe(pipeInData)
@pyqtSignature("int")
def on_horizontalSlider_sliderMoved(self, position):
"""
Slot documentation goes here.
"""
self.onClkRate(position)
@pyqtSignature("bool")
def on_pushButton_2_clicked(self, checked):
"""
Slot documentation goes here.
"""
self.dispView.close()
self.plotData(self.data)
@pyqtSignature("int")
def on_horizontalSlider_valueChanged(self, value):
"""
Slot documentation goes here.
"""
self.onClkRate(value)
@pyqtSignature("bool")
def on_pushButton_5_clicked(self, checked):
"""
Slot documentation goes here.
"""
newResetSim = checked
self.nerfModel.SendButton(newResetSim, BUTTON_RESET_SIM)
@pyqtSignature("bool")
def on_pushButton_4_clicked(self, checked):
"""
Slot documentation goes here.
"""
newResetGlobal = checked
self.nerfModel.SendButton(newResetGlobal, BUTTON_RESET)
@pyqtSignature("bool")
def on_pushButtonData_clicked(self, checked):
"""
Slot documentation goes here.
"""
self.isLogData = checked
@pyqtSignature("bool")
def on_pushButton_6_clicked(self, checked):
"""
Slot documentation goes here.
"""
newButton1 = checked
self.nerfModel.SendButton(newButton1, BUTTON_1)
@pyqtSignature("bool")
def on_pushButton_7_clicked(self, checked):
"""
Slot documentation goes here.
"""
newButton2 = checked
self.nerfModel.SendButton(newButton2, BUTTON_2)
示例2: User
# 需要导入模块: from Display import View [as 别名]
# 或者: from Display.View import close [as 别名]
#.........这里部分代码省略.........
self.nerfModel.SendPara(bitVal = newHalfCnt, trigEvent = DATA_EVT_CLKRATE)
def onNewWireIn(self):
for ctrl in self.ctrl_all:
newWireIn = ctrl.doubleSpinBox.value()
if newWireIn != ctrl.currVal:
ctrl.currValue = newWireIn
if (ctrl.type == 'int32'):
bitVal = ConvertType(floor(newWireIn), fromType = 'i', toType = 'I')
# print bitVal
elif (ctrl.type == 'float32'):
bitVal = ConvertType(newWireIn, fromType = 'f', toType = 'I')
self.nerfModel.SendPara(bitVal = bitVal, trigEvent = ctrl.id)
def plotData(self, data):
from pylab import plot, show, subplot
from scipy.io import savemat, loadmat
import numpy as np
if (data != []):
forplot = np.array(data)
for i in xrange(NUM_CHANNEL):
subplot(NUM_CHANNEL, 1, i+1)
plot(forplot[:, i])
show()
savemat("./matlab_cmn.mat", {"lce": forplot[:, 0], "Ia": forplot[:, 1], \
"II": forplot[:, 2], "force": forplot[:, 3], \
"emg": forplot[:, 4]})
@pyqtSignature("QString")
def on_comboBox_activated(self, p0):
"""
Slot documentation goes here.
"""
choice = p0
if choice == "Spike Train 1Hz":
# pipeInData = spike_train(firing_rate = 1)
pipeInData = gen_sin(F = 1.0, AMP = 100.0, T = 2.0)
elif choice == "Spike Train 10Hz":
# pipeInData = spike_train(firing_rate = 10)
# pipeInData = gen_sin(F = 4.0, AMP = 0.3)
pipeInData = gen_tri(T = 2.0)
elif choice == "Spike Train 20Hz":
# pipeInData = gen_tri()
pipeInData = gen_ramp(T = [0.0, 0.1, 0.2, 0.8, 0.9, 2.0], L = [1.0, 1.0, 1.3, 1.3, 1.0, 1.0], FILT = False)
# pipeInData = gen_ramp(T = [0.0, 0.4, 1.5, 1.55, 1.6, 2.0], L = [0, 0, 15000, 15000, 0, 0], FILT = False)
# pipeInData = gen_ramp(T = [0.0, 0.2, 0.25, 1.75, 1.8, 2.0], L = [1.0, 1.0, 5000.0, 5000.0, 1.0, 1.0], FILT = False) # abrupt rise / fall
# pipeInData = spike_train(firing_rate = 1000)
self.nerfModel.SendPipe(pipeInData)
@pyqtSignature("int")
def on_horizontalSlider_sliderMoved(self, position):
"""
Slot documentation goes here.
"""
self.onClkRate(position)
@pyqtSignature("bool")
def on_pushButton_2_clicked(self, checked):
"""
Slot documentation goes here.
"""
self.dispView.close()
self.plotData(self.data)
@pyqtSignature("int")
def on_horizontalSlider_valueChanged(self, value):
"""
Slot documentation goes here.
"""
self.onClkRate(value)
@pyqtSignature("bool")
def on_pushButton_5_clicked(self, checked):
"""
Slot documentation goes here.
"""
newResetSim = checked
self.nerfModel.SendButton(newResetSim, BUTTON_RESET_SIM)
@pyqtSignature("bool")
def on_pushButton_4_clicked(self, checked):
"""
Slot documentation goes here.
"""
newResetGlobal = checked
self.nerfModel.SendButton(newResetGlobal, BUTTON_RESET)
@pyqtSignature("bool")
def on_pushButtonData_clicked(self, checked):
"""
Slot documentation goes here.
"""
self.isLogData = checked
示例3: User
# 需要导入模块: from Display import View [as 别名]
# 或者: from Display.View import close [as 别名]
#.........这里部分代码省略.........
def onNewWireIn2(self):
newWireIn = eval('self.doubleSpinBox_'+str(2)+u'.value()')
self.nerfModel.SendPara(newVal = newWireIn, trigEvent = 2)
def onNewWireIn4(self):
newWireIn = self.doubleSpinBox_4.value()
print newWireIn,
self.nerfModel.SendPara(newVal = newWireIn, trigEvent = 4)
def onNewWireIn5(self):
newWireIn = self.doubleSpinBox_5.value()
self.nerfModel.SendPara(newVal = newWireIn, trigEvent = 5)
def onNewWireIn14(self):
newWireIn = self.doubleSpinBox_14.value()
self.nerfModel.SendPara(newVal = newWireIn, trigEvent = 14)
def onNewWireIn15(self):
newWireIn = self.doubleSpinBox_15.value()
self.nerfModel.SendPara(newVal = newWireIn, trigEvent = 15)
def plotData(self, data):
from pylab import plot, show, subplot
from scipy.io import savemat, loadmat
import numpy as np
if (data != []):
forplot = np.array(data)
for i in xrange(NUM_CHANNEL):
subplot(NUM_CHANNEL, 1, i+1)
plot(forplot[:, i])
show()
savemat("./matlab_cmn.mat", {"lce": forplot[:, 0]})
@pyqtSignature("QString")
def on_comboBox_activated(self, p0):
"""
Slot documentation goes here.
"""
choice = p0
if choice == "Spike Train 1Hz":
# pipeInData = spike_train(firing_rate = 1)
pipeInData = gen_sin(F = 1.0, AMP = 0.3)
elif choice == "Spike Train 10Hz":
# pipeInData = spike_train(firing_rate = 10)
pipeInData = gen_sin(F = 4.0, AMP = 0.3)
elif choice == "Spike Train 20Hz":
# pipeInData = gen_tri()
pipeInData = gen_seq(T = [0.0, 0.1, 0.2, 0.8, 0.9, 1.0], L = [1.0, 1.0, 1.2, 1.2, 1.0, 1.0], FILT = True)
# pipeInData = spike_train(firing_rate = 100)
self.nerfModel.SendPipe(pipeInData)
@pyqtSignature("int")
def on_horizontalSlider_sliderMoved(self, position):
"""
Slot documentation goes here.
"""
self.onClkRate(position)
@pyqtSignature("bool")
def on_pushButton_2_clicked(self, checked):
"""
Slot documentation goes here.
"""
self.dispView.close()
self.plotData(self.data)
@pyqtSignature("int")
def on_horizontalSlider_valueChanged(self, value):
"""
Slot documentation goes here.
"""
self.onClkRate(value)
@pyqtSignature("bool")
def on_pushButton_5_clicked(self, checked):
"""
Slot documentation goes here.
"""
newResetSim = checked
self.nerfModel.SendButton(newResetSim, BUTTON_RESET_SIM)
@pyqtSignature("bool")
def on_pushButton_4_clicked(self, checked):
"""
Slot documentation goes here.
"""
newResetGlobal = checked
self.nerfModel.SendButton(newResetGlobal, BUTTON_RESET)
@pyqtSignature("bool")
def on_pushButtonData_clicked(self, checked):
"""
Slot documentation goes here.
"""
self.isLogData = checked