zoukankan      html  css  js  c++  java
  • psychopy 呈现一个量表的打分条

    #object: 呈现一个量表的打分条
    #writer: mike
    #time: 2020.09.15
    
    from psychopy import  visual,core
    
    MyWindown = visual.Window([800,600], screen=0, fullscr=False)
    #文本刺激
    Text = visual.TextStim(win = MyWindown, text = u"hsdasadd",units= 'pix',pos=(0,100))
    #评价条刺激
    Rating =visual.RatingScale(win = MyWindown,scale="very happy ------------very unhappy", low=1, high=10,precision=1,pos=(0,-0.1),showValue=True, marker='cirle')
    #呈现刺激,不断的刷新屏幕
    while Rating.noResponse:
        Rating.draw()
        Text.draw()
        MyWindown.flip()
    
    #如果被试确定了刺激,就进行下一个画面
    Text1 = visual.TextStim(win = MyWindown, text = u"congradulations",units= 'pix',pos=(0,100))
    Text1.draw()
    MyWindown.flip()
    core.wait(5)
    MyWindown.close()

    其中最关键的一步,是 while循环,如果没有while循环,那么,用鼠标点击评分条,会没有效果。

  • 相关阅读:
    MySQL 对于千万级的大表要怎么优化?
    Spring Cloud中文社区
    什么是QPS,PV
    http://www.rabbitmq.com/documentation.html
    redis
    MySQL分区表
    linux命令综合
    Python-MRO
    Python3 错误和异常
    装饰器
  • 原文地址:https://www.cnblogs.com/zijidefengge/p/13703008.html
Copyright © 2011-2022 走看看