I’m using RatingScale in my experiment to let the participant assess their liking towards the presented image. What I want to do is to let the ratingscale show the value where the mouse stops(without click), so that participant can see the value they are going to choose and it will go on to the next trial after a single click.
For now, the program can work just can’t show the value been chosen.
The code has been written under PsychoPy version 1.85.6, operation system win7.
And I know it says while singleClick = True, showValue will be ignored. I just wanna try and it didn’t work.
Hi @Jin, yes this is possible. You can call one of the rating scale methods called _getMarkerFromPos and pass it the X position of the mouse from mouse.getPos. You can assign the returned value to a text component so that it can appear on screen.
Please see the attached example from a Builder experiment ratingXPos.psyexp (7.8 KB)
Slider allows you to check the current value of the slider by querying its markerPos and this is set continuously as the participant drags the marker. This is only set as a “rating” when they release the mouse button. Does that make sense.
I had included a Builder demo called newRatings to show this. I’ve just discovered that fails in 3.0.0b3 but in versions before (and after) that it will be fine.
I tried to run the example you sent me, I think I understand what you mean, but I can’t successfully run it, I got an error, which I don’t know whether it is caused by different version of psychopy, it says,
############## Running: C:\Users\c1728176\Downloads\ratingXPos.py ##############
File "C:\Users\c1728176\Downloads\ratingXPos.py", line 122
x = rating._getMarkerFromPos(mouse.getPos()[0])+1
^
IndentationError: expected an indented block
Hi @Jin, the indentation error occurs when the code is not indented properly. - see here for documentation on how Python programs are structured through indentation.
If you want to follow Jon’s newer version of Slider you should use the new PsychoPy 3.