本文整理汇总了Python中sparkle.stim.stimulus_model.StimulusModel.insertEmptyRow方法的典型用法代码示例。如果您正苦于以下问题:Python StimulusModel.insertEmptyRow方法的具体用法?Python StimulusModel.insertEmptyRow怎么用?Python StimulusModel.insertEmptyRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sparkle.stim.stimulus_model.StimulusModel
的用法示例。
在下文中一共展示了StimulusModel.insertEmptyRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from sparkle.stim.stimulus_model import StimulusModel [as 别名]
# 或者: from sparkle.stim.stimulus_model.StimulusModel import insertEmptyRow [as 别名]
def setUp(self):
self.tempfile = os.path.join(os.path.abspath(os.path.dirname(__file__)), u"tmp", 'testsave.json')
model = StimulusModel()
model.setMaxVoltage(1.5, 10.0)
model.setReferenceVoltage(100, 0.1)
model.setRepCount(7)
# add tone, vocalization, and silence components
component = PureTone()
component.setIntensity(34)
component.setDuration(0.2)
model.insertComponent(component, 0,0)
vocal = Vocalization()
vocal.setFile(sample.samplewav())
model.insertEmptyRow()
model.insertComponent(vocal, 1,0)
silence = Silence()
# have gap between tone and vocal
silence.setDuration(0.5)
model.insertComponent(silence, 1,0)
nsteps = self.add_auto_param(model)
editor = StimulusEditor()
editor.setModel(QStimulusModel(model))
self.editor = editor
self.stim = model
示例2: Vocalization
# 需要导入模块: from sparkle.stim.stimulus_model import StimulusModel [as 别名]
# 或者: from sparkle.stim.stimulus_model.StimulusModel import insertEmptyRow [as 别名]
vocal0 = Vocalization()
test_file = os.path.join(os.path.expanduser('~'),r'Dropbox\daqstuff\M1_FD024\M1_FD024_syl_12.wav')
vocal0.setFile(test_file)
silence0 = Silence()
silence0.setDuration(0.025)
stim = StimulusModel()
stim.setReferenceVoltage(100, 0.1)
stim.insertComponent(tone2)
stim.insertComponent(tone1)
# stim.insertComponent(tone0)
# stim.insertComponent(tone4, (1,0))
# stim.insertComponent(tone5, (1,0))
stim.insertEmptyRow()
stim.insertComponent(vocal0, 1,0)
stim.insertComponent(tone3, 1,0)
# stim.insertComponent(silence0, (2,0))
ptype = 'duration'
start = .1
step = .2
stop = 1.0
parameter_model = stim.autoParams()
parameter_model.insertRow(0)
# select first component
parameter_model.toggleSelection(0, stim.component(0,0))
# set values for autoparams