PsychoPy version : 3.2.4
I am currently building an experiment during which a visual count down is presented to the participants. Previously to the visual count down, participants are rating the intensity perceived from a video on a visual analogue scale. I want this visual countdown to vary (i.e., 0,2,4,6,8,10,12,14,16,18, or 20) accordingly to the previous response of the participant on the intensity VAS, which can vary between 0 and 1. However, I can’t make it out.
I am using the Builder option and I’ve tried few things.
First, in the properties basic options for my visual countdown, I’ve added the variable $rating in the ‘Stop’ option with the ‘’Condition’’ option selected. Then, I’ve added a Loop for my trial with the following options: loopType=interleaved staircases, nReps=24, starType=simple and switchMethod=sequential. In the options ‘’Conditions’’, I’ve linked an Excel sheet which included the two colons (i.e. rating and time). All possible ratings options were added (i.e., 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, and 1.0) with the corresponding time (i.e., 0,2,4,6,8,10,12,14,16,18, or 20). The option ‘Is trials’ was checked.
However, I obtain the following error message:
line 292, in
AttributeError: ‘numpy.float64’ object has no attribute ‘reset’
I am not sure what to change to fixe it out.
Second, I’ve tried to add a code in ‘’Begin Routine’’ instead of a Loop, as follow:
if (rating= 0.0): t=0 else(rating = 0.1): t=2 else (rating = 0.2): t=4 else (rating = 0.3): t=6 else (rating = 0.4): t=8 else (rating = 0.5): t=10 else (rating = 0.6): t=12 else (rating = 0.7): t=14 else (rating = 0.8): t=16 else (rating = 0.9): t=18 else (rating = 1.0): t=20 t=16 else (rating = 0.9): t=18 else (rating = 1.0): t=20
However, this led to the following error message:
if (ratingAide = 0.0):
SyntaxError: invalid syntax
As I am not used to code, I am not sure what is the error here and how to get it fix.
If someone as an idea of what causes the problem and potentials solutions, I would be very helpful and appreciated.
Thank you for your time!