本文整理匯總了Python中sparkle.stim.stimulus_model.StimulusModel.containsPval方法的典型用法代碼示例。如果您正苦於以下問題:Python StimulusModel.containsPval方法的具體用法?Python StimulusModel.containsPval怎麽用?Python StimulusModel.containsPval使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sparkle.stim.stimulus_model.StimulusModel
的用法示例。
在下文中一共展示了StimulusModel.containsPval方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_verify_with_bad_frequency_auto_parameter_disallowed
# 需要導入模塊: from sparkle.stim.stimulus_model import StimulusModel [as 別名]
# 或者: from sparkle.stim.stimulus_model.StimulusModel import containsPval [as 別名]
def test_verify_with_bad_frequency_auto_parameter_disallowed(self):
component = PureTone()
stim_model = StimulusModel()
stim_model.setReferenceVoltage(100, 0.1)
stim_model.insertComponent(component, 0,0)
model = QStimulusModel(stim_model)
ap_model = model.autoParams()
ap_model.insertRows(0,1)
ap_model.toggleSelection(ap_model.index(0,0), component)
# setData always deals with base units
values = ['frequency', 100000, 300000, 25000]
for i, value in enumerate(values):
ap_model.setData(ap_model.index(0,i), value, QtCore.Qt.EditRole)
invalid = stim_model.verify(windowSize=0.1)
print 'msg', invalid
assert invalid == 0
assert stim_model.containsPval('frequency', 75000)