當前位置: 首頁>>代碼示例>>Python>>正文


Python StimulusModel.setStimType方法代碼示例

本文整理匯總了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
開發者ID:pdroberts,項目名稱:sparkle,代碼行數:19,代碼來源:factory.py

示例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
開發者ID:Joel-U,項目名稱:sparkle,代碼行數:22,代碼來源:factory.py

示例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_())
開發者ID:pdroberts,項目名稱:sparkle,代碼行數:32,代碼來源:qprotocol.py


注:本文中的sparkle.stim.stimulus_model.StimulusModel.setStimType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。