I am assisting a student with their final year project, but am still a novice at coding. This is quite a big ask, so please bear with me.
I am using some help I previously requested, which can be found here: Saving responses to call images up again later
Essentially, the study consists of 3 blocks. There are 60 images which need to be shown at random. For the first block, they make a rating (1-5) on each image. In the second block, they make a different 1-5 rating, but on the same 60 images. These images are randomised, so will be shown at different points in each block. The student has set this bit up fine, but it’s the final block we’re stuck on.
Each image where they rate it 3 or higher in both blocks, needs to be saved and shown again in this final block. In the final block they make a choice between the saved image and the other 59 images. This block also needs to be randomised, so if they had 10 images saved it wouldn’t just work through image 1 vs others, and then image 2 vs others etc.
Currently I have a begin experiment routine that has 3 lists
savedImages1, savedImages2 and choiceImages
My thought is that as the images are randomised in the trials I will need to populated the first list with every image that is rated 3 or higher, the same with the second list, and then some code before the third block to check if an image is in both lists, add that image to choiceImages
I tried to use the code:
if trials1.response() >= 3:
But I was met with the error that “response” is not an attribute, is this because they are using a slider? Is it because responses are string values and therefore the >= 3 wouldn’t work?
Once I am able to save based on responses, how would I go about doing the check and save for the third list? I believe I would need something similar to what I’ve written below.
for x in savedImages1:
for y in savedImages2:
if x == y:
Then finally (hopefully) they are shown the final block. In this block they will be presented with the images saved to choiceImages on the left (one by one and at random) and then the remaining 59 images on the right. This is the part I am struggling most with in terms of visualising the code.
Should I have an excel sheet with 60 columns of 59 images (1 column for each image, then the 59 images being the 60 - that image) and some code to call the correct one? Or is there an easier method that I am not aware of?
I understand this is a big project and so close to the holidays. Any help would be fantastic.