本文整理汇总了Python中sparkle.stim.stimulus_model.StimulusModel.setStimType方法的典型用法代码示例。如果您正苦于以下问题:Python StimulusModel.setStimType方法的具体用法?Python StimulusModel.setStimType怎么用?Python StimulusModel.setStimType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sparkle.stim.stimulus_model.StimulusModel
的用法示例。
在下文中一共展示了StimulusModel.setStimType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create
# 需要导入模块: from sparkle.stim.stimulus_model import StimulusModel [as 别名]
# 或者: from sparkle.stim.stimulus_model.StimulusModel import setStimType [as 别名]
def create():
stim = StimulusModel()
tone = PureTone()
tone.setDuration(0.1)
stim.insertComponent(tone)
tuning_curve = stim.autoParams()
tuning_curve.insertRow(0)
tuning_curve.toggleSelection(0, tone)
tuning_curve.setParamValue(0, parameter='frequency', start=1000, stop=100000, step=20000)
tuning_curve.insertRow(1)
tuning_curve.toggleSelection(1, tone)
tuning_curve.setParamValue(1, parameter='intensity', start=90, stop=100, step=10)
stim.setStimType(TuningCurveEditor.name)
return stim
示例2: create
# 需要导入模块: from sparkle.stim.stimulus_model import StimulusModel [as 别名]
# 或者: from sparkle.stim.stimulus_model.StimulusModel import setStimType [as 别名]
def create():
stim = StimulusModel()
tone = PureTone()
tone.setDuration(CCFactory.defaultInputs['duration'])
tone.setRisefall(CCFactory.defaultInputs['risefall'])
stim.insertComponent(tone)
tuning_curve = stim.autoParams()
tuning_curve.insertRow(0)
tuning_curve.toggleSelection(0, tone)
tuning_curve.setParamValue(0, parameter='frequency', start=CCFactory.defaultInputs['freqStart'], stop=CCFactory.defaultInputs['freqStop'], step=CCFactory.defaultInputs['freqStep'])
tuning_curve.insertRow(1)
tuning_curve.toggleSelection(1, tone)
tuning_curve.setParamValue(1, parameter='intensity', start=CCFactory.defaultInputs['intenStart'], stop=CCFactory.defaultInputs['intenStop'], step=CCFactory.defaultInputs['intenStep'])
stim.setRepCount(CCFactory.defaultInputs['reps'])
stim.setStimType(CCFactory.name)
return stim
示例3: StimulusModel
# 需要导入模块: from sparkle.stim.stimulus_model import StimulusModel [as 别名]
# 或者: from sparkle.stim.stimulus_model.StimulusModel import setStimType [as 别名]
silence0.setDuration(0.025)
stim0 = StimulusModel()
stim1 = StimulusModel()
stim0.insertComponent(tone2)
stim1.insertComponent(tone1)
# stim.insertComponent(tone0)
# stim.insertComponent(tone4, (1,0))
stim1.insertComponent(tone5, 1,0)
stim0.insertComponent(vocal0, 1,0)
# stim.insertComponent(tone3, (2,0))
# stim.insertComponent(silence0, (2,0))
stim0.setLoopCount(3)
stim0.setStimType('Custom')
stim1.setStimType('Custom')
tableView = ProtocolView()
tableView.show()
tableView.resize(400,400)
model = QProtocolTabelModel(ProtocolTabelModel())
model.insertTest(stim0,0)
model.insertTest(stim1,0)
tableView.setModel(model)
sys.exit(app.exec_())