当前位置: 首页>>代码示例>>Python>>正文


Python StimulusModel.insertEmptyRow方法代码示例

本文整理汇总了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
开发者ID:boylea,项目名称:sparkle,代码行数:26,代码来源:test_stim_editor.py

示例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
开发者ID:Joel-U,项目名称:sparkle,代码行数:33,代码来源:stimulus_editor.py


注:本文中的sparkle.stim.stimulus_model.StimulusModel.insertEmptyRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。