psychopy.org | Reference | Downloads | Github

Using a subject's input to determine stimuli presentation

Hi all,
I got great help for my previous newbie question so trying my luck again.
In my experiment the subject needs to select 3 human figures out of a figure bank presented. Once selected, these figures need to appear later in the trials of the experiment.
I know I can store the selection (for example - if the subject entered β€œ1” to choose figure number 1) but I am not sure how I can then use that in order to present the correct figure in the next steps of the experiment. I tried searching online and on youtube but could not find the answer.
Another possible implementation is for the subject to choose the figures and then for the experimenter to enter the figure numbers in the same input screen as the one that includes the subject and session number.
Any help is appreciated,
Thanks!

1 Like

Hi,

There might be a more elegant way to do this, but the following is one option. If the relevant information about the figure number would be entered in the first field of your dialogue window (by the experimenter), and you have a PNG file with that name in your experiment directory, you could get an image component to present this picture using the following code:

$dlg.data[0]+".png"

Note that order is important. If it were the second field, you would need to use $dlg.data[1], and so on.

Alternatively, you could write this information to a file, and read this information from the file later (assuming that you’re running two experiments sequentially). Less potential for human error, but also more complicated to set up.

Hope this helps.

Jan