Is it possible for the rating scale automatically record the last position of marker as response

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
Win 10

PsychoPy version (e.g. 1.84.x):
1.85.4

Standard Standalone? (y/n) If not then what?:
Y

What are you trying to achieve?:
In this experiment, we hope to let the participant rating their feeling to a geometrical shape that was associated with uncomfortable feelings.
Because the experiment will be carried out in a fMRI scanner, the participant only has two keys. so we will tell the participants that the rating scale will disappear in 15 seconds and they need to finish the rating during this periods.
So, in this case, we hope the program can automatically record the last position of the marker as response, without the participant using an accept key

What did you try to make it work?:
Now, I can finish this by storing the history, but I think this may not be the best solution, so I wonder is it possible to record and store the last position of the marker as a response.

@hcp4715, using the getHistory() method of the rating scale should not cause any problems, since this will store the last rating that was stored at the end of the trial. However, another way would be to create a code component and add the following in the tab for ‘End Routine’:

thisExp.addData('lastRating', rating.markerPlacedAt)

This will save a numerical value in the csv file under a heading called ‘lastRating’ showing the markers final position on the scale at the end of the trial.

1 Like

Thanks so much, @dvbridges.
I add a code component and it records the last replace of the ratings!!

But another problem is: the number recorded by this method, which is from 0 - 10, is different from getHistory, which is from 0 - 100. Is it possible to make the lastrRating exactly as the last record by getHistory,

@hcp4715, are you using visual analogue scale?

Hi, @dvbridges,
Thanks for your quick reply!
A little bit more clarification: in the current PsychoPy procedure, the object I am using is the rating object in the builder. What I intended to achieve in my experiment is like visual analogue scale (participants will rating their own anxious feeling from 0 to 100, 0 mean completely not anxious, 100 mean extremely anxious).

Ok thanks @hcp4715 would you mind posting your experiment on here so I can see how you created your scale?

Hi, @dvbridges , thank you so much!
Here is the psyexp file. Do you need other files too?
reapp_consolid.psyexp (27.2 KB)

Ok, you could replace the code in your code component with the following:

thisExp.addData('lastRating', int(rating.markerPlacedAt*10))
1 Like

Great!
Thanks so much! David @dvbridges