Multiple Rating scale

Hi all,

I am new to Psychopy, and I’m trying to build my first experiment.
The propose of the experiment is to run a movie (let’s say for 15 sec) and while the movie run, the participant can rate the movie as many times he wants. I want to keep track of the rate and the second the participant rate.
For example, if I rate at second 5 the movie as 4, at second 10 I can rate to 5, and so on.
Important to say, the movie needs to run without stops for rating.
I succeed to build an experiment that plays the movie and rate the first number I choose, but once I selected the rate, I cant change it.

Is there an option to run the movie with multiple rating?

Thanks in advance!

Here is the code I did:

Create some handy timers

globalClock = core.Clock() # to track the time since experiment started
routineTimer = core.CountdownTimer() # to track time remaining of each (non-slip) routine

------Prepare to start Routine “trial”-------

t = 0
trialClock.reset() # clock
frameN = -1
continueRoutine = True

update component parameters for each repeat

rating.reset()

keep track of which components have finished

trialComponents = [movie, rating]
for thisComponent in trialComponents:
if hasattr(thisComponent, ‘status’):
thisComponent.status = NOT_STARTED

-------Start Routine “trial”-------

while continueRoutine:
# get current time
t = trialClock.getTime()
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame

# *movie* updates
if t >= 0.0 and movie.status == NOT_STARTED:
    # keep track of start time/frame for later
    movie.tStart = t
    movie.frameNStart = frameN  # exact frame index
    movie.setAutoDraw(True)
# *rating* updates
if t >= 0.0 and rating.status == NOT_STARTED:
    # keep track of start time/frame for later
    rating.tStart = t
    rating.frameNStart = frameN  # exact frame index
    rating.setAutoDraw(True)

1:

2:

I think you can set a rating scale to store of history of responses, rather than just collect one:

http://www.psychopy.org/api/visual/ratingscale.html

Yes, rating.getHistory() is what you want. The values should be there already; there should be no need to do anything special to enable this feature.

Edit: For people using the Builder interface (which is not your situation), they DO have to enable it. There’s a checkbox on the Advanced tab.

1 Like

Thanks!

I already check the store history in the advanced tab,
As follow:
image

But yet, when I run the experiment, I can only choose one rate, when I choose and click the triangle become grey, and I unable to change it.
you can see in the photo below;
image

Thanks in advance!

Ah, you are using Builder, ok. Un-check Single click – that option means “end the trial after exactly one response has been made”.

Thanks!

I try that but then I get an empty excel as an output

In that case I suspect that the data are getting collected at run-time but not saved, because the accept button is not pressed. So to keep your experiment set up this way, and not require people to indicate accept, you’ll need to add a code component, and at the end of the routine add code

thisExp.addData('history', rating.getHistory())

Hi, I try to add this to the code, it still not working, I get an empty file.
Only if I change the setting to show accept, and click on rate only at the end of the movie I get all the history rating.
is there any other option to do this?

Thanks!

Try adding one more line to the code part, so that it looks like this:

thisExp.addData('history', rating.getHistory())
thisExp.nextEntry()

I already have this in the code:

for thisComponent in trialComponents:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)

thisExp.addData('rating.response', rating.getRating())
thisExp.addData('rating.rt', rating.getRT())
thisExp.addData('rating.history', rating.getHistory())
thisExp.nextEntry()

Lets try to get a minimal version working for you, then explore how your experiment differs from one that work for you. The following works for me with PsychoPy 1.85.

  1. make a new experiment
  2. add one ratingscale component
  3. set its advanced settings to:
  • disable: disappear, force-end-routine, show accept singleclick
  • enable: store history, store rating, store rating time
  1. no code components, loops, or anything else, just that one trial
  2. save and run, set the marker to a few places, then press return to end the trial. look at the .csv data file. I get values in the data fields for the rating, the rt, and the history