當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。