Hi,
I’m having participants rate different items with a rating scale. However, some of the items are not applicable to all, so I want to give participants an option to skip that question via the skipKeys argument. If I understand the documentation correctly, if they make use of the skip key, the getRating function should return None. If I press the skip key fast enough (say a couple of hundred ms) None indeed is the output. However, if I wait just a little before pressing, the output becomes the low end of the scale.
How do I make sure None is indeed the output of getRating even if I wait a bit with pressing the skip key?
Find below an example of the code I use. I’d appreciate any help!
Thanks!
Niklas
from psychopy import visual, event
win=visual.Window(color = (1,1,1),units = ‘pix’,fullscr = True, screen = 1)
def ratingIcons(win, icon):
ratingScale = visual.RatingScale(win, pos = (0,-350), low = -100, high = 100, scale = None, tickMarks = (-100,0,100),
labels = ('Not attractive at all', ' ', 'Very attractive'), textColor = 'black',
lineColor = 'black', precision = 1, marker = 'triangle', markerStart = 0, markerColor = 'DarkRed',
singleClick = False, showValue = False, showAccept = True, acceptText = 'Confirm', stretch = 2, skipKeys = 'space')
textReminder = visual.TextStim(win, text = 'How attractive does this app look to you?', pos = (0,350), color='black', height = 40 , wrapWidth = 1200)
theItem = visual.TextStim(win, text = '', color='black')
event.Mouse(visible = True)
while ratingScale.noResponse:
theItem.setText(icon)
theItem.draw()
textReminder.draw()
ratingScale.draw()
win.flip()
rating = ratingScale.getRating()
ratingRT = ratingScale.getRT()
print icon, rating
someQuestions = [‘Q1’, ‘Q2’, ‘Q3’, ‘Q4’, ‘Q5’]
for aQuestion in someQuestions:
ratingIcons(win, aQuestion)
win.close()test.py (1.3 KB)