psychopy.org | Reference | Downloads | Github

Rating scale data not recordning

OS (e.g. Win10): Ubuntu 18.04.3
PsychoPy version (e.g. 1.84.x): 3.2
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?: I am trying to collect participants answers on their auditory imagery experience using rating scales after listening to melodies. There are 2 runs of 10 trials each, and in each run only 5 trials should contain the rating scale. For the other 5 there is no time for imagine.

What did you try to make it work?: Well, my friend has helped me in this (instructions are in Portuguese). The code she came up with for the the rating scale routine is:

Initialize components for Routine “vividExp1”

vividExp1Clock = core.Clock()
vivid_exp1 = visual.TextStim(win=win, name=‘vivid_exp1’,
text=‘Quão vívida foi sua mentalização?\n\nDe uma nota de 1 a 5’,
font=‘Arial’,
pos=(0, 0), height=0.03, wrapWidth=None, ori=0,
color=‘white’, colorSpace=‘rgb’, opacity=1,
languageStyle=‘LTR’,
depth=0.0);
rating = visual.RatingScale(win=win, name=‘rating’, marker=‘triangle’, size=1.0, pos=[0.0, -0.3], low=1, high=5, labels=[’’], scale=’’, singleClick=True, disappear=True)

What specifically went wrong when you tried that?:
In the .csv file only 1 answer is stored. I should see 10 answers (related to the stimuli). This is the most important dependent variable in my experiment.
So, any ideas?

Hi @marimoga, not sure what is happening given the code. Would you mind sharing your psyexp file?

Not at all!
You see, there are 2 files with the 2 experiments to counterbalance the conditions (the music context in experiment 1 is tonal and in experiment 2 atonal). So half of participants will do the exp1 first then 2 and the other half exp2 then 1. Each experiment has a loop (should be 10 trials in each with 5 trials containing the rating scale for vividness and 5 trials without it).
Thanks!

piloto2_1.psyexp (85.6 KB) piloto1_2.psyexp (85.6 KB)

Please, find attached 2 examples of csv file after tests.

777_piloto1_2019_out_17_1042.csv (3.4 KB) 09876_piloto1_2019_out_17_1110.csv (6.1 KB)

The issue is that “is Trials” is not ticked in the loop handler. This setting indicates that each trial should be on a new line in the datafile. Without this, each rating will overwrite the previous rating, on the same row in the excel file.

Brilliant! Thank you so much. That solved it!
However, I have just noticed in the loop the condition I’ve proposed is not working. As I said, in each loop should be 10 trials in each with 5 trials containing the rating scale for vividness and 5 trials without it, but after running it there was only 2 trials with the rating scale in one experiment and in the other 6! This should be random, of course, but I need to control the number of trials in each run.

I think you would be better off redesigning your task and taking advantage of the trialhandler that can use conditions files to define your trials. So, instead of defining your trials numbers using nReps = 10, you could add a conditions file with 10 entries (rows) which define each trial. If you only want rating scales for 5 of those trials, then you would add a column that determines whether or not to present the rating scale, e.g., add a column called “showRating”, and add values of 0 (do not show) or 1 (show) . In your code component, you would display the rating routine based on these values:

# Begin routine
if showRating != 1:
    continueRoutine = False

It didn’t work, I am afraid.
Where exactly should I display thiS:

You should create a code component in your routine containing the rating scale, and add that code to the “Begin routine” tab.