psychopy.org | Reference | Downloads | Github

How to use the data collected during the previous routine?

Hello everyone!

I have some problems with the access to the data, collected at some stage of the experiment. During certain routine several pictures are presented, and participants have to evaluate each picture by choosing one number from different options.

As the next stage comes, I have to present those pictures again with the numbers that had been chosen by the participant before. I am new to PsychoPy, that is why I couldn’t find the attributes for ‘DataHandler’ objects that could extract the values I need.

I would appreciate any help!

Thank you in advance!

I’d be tempted to maintain a dictionary to associate image names with responses, then you can later use the image name to look up the number.

e.g. at the start of the experiment, make an empty dictionary:

links = {}

Then on each trial after a response has been gathered, add the pair to the dictionary:

links[image_name_variable] = response_variable

Then you can look up the response number later by using the image name as the key:

number = links[image_name_variable]

Dear Mr. MacAskill,

Thank you so much! It works!