Hi! I have looked around this forum, and have not found anything that has been able to help me, so I decided to ask myself, sorry if there is already an answer for this!
I am using macOS: sequoia 15.1.
I am trying to make a change blindness experiment, where I have 9 image pairs. the images in the pairs are two, one normal and the other image is slightly different ( has a small change ). I have defined 9 regions in my conditions file that are the same in each image, and one of the regions contains the change in the images. I want the two images in each image pair to loop again and again until the participant presses the correct region on the image ( the region that contains the change ). I used the polygon component to make the region that is correct in each trial clickable and made the size and position to be what says in my conditions file for each image pair.
Each component and loop that I have in my experiment:
image1 and image2: are connected to my conditions file and have a specific duration
blank1 and blank2: image components that show a blank screen, so the participant can detect when the images change
polygon/clickable_region: has no duration and has size and position according to the conditions file
code component: is supposed to make the images go in a loop, but that has not worked. I will attach a screenshot of what I have written in the code component
outer loop/trials_loop: a loop that contains the conditions file
inner loop/repeat_images: a loop that is inside the other loop and contains the trial. I will provide a screenshot of this loop and its properties
mouse component: has “clickable_region” as its clickable stimuli
Issues:
I have been able to make the images in the image pairs show up one time, but they do not loop.
How I tried to fix it: I tried adding a code component, but that did not change anything. I also tried to make a inner loop, which had many repititions, but that only made the images show up one time and then when I clicked the polygon the same images showed up.
The polygon component works, and I can click the polygon to start the next trial, but sometimes the polygon is positioned in the upper right corner ( something I did not intend it to do ) and is not clickable, so I have to force quit the experiment.
How I tried to fix it: I made sure to triple check that all positions are correct in the conditions file, but I have not found any other way to try and fix it.
I will attach screenshots of each component settings, my condition file and a picture of the flow.
If you are only seeing one iteration of your loop, I would recommend that you upgrade to 2024.2.4
Your mouse can only be clicked in the polygon called clickable_region
What does “if Correct_region:” mean? I suspect that you need polygons for all of your clickable regions. Then compare mouse.clicked_name with Correct_region
Thank you for your reply!
I am using version 2024.2.4 so that could not be the reason for why the loops do not work.
I do not know why if correct_region is in the code, I asked chatGPT to help me make the code because I do not know how to code haha. Do I not need a code if I have polygons for each region?
I will try making polygons for each region, thank you for your suggestion:)
Please could you describe the current behaviour and show your current code component? Are you using an incognito tab (or Ctrl-Shift-R) to ensure you see the latest version?
Why do you have repeat_images at all if the trial can only end on a correct response?
what happens is that the images in the pair show up one time, and then a grey screen appears, so they do not go in a loop until the participant taps the right region like I want it to be. I tried to do as you said above and add the different regions as individual polygons and make the mouse component only be able to tap the correct region. That works, and I am able to tap only the right region, so I took out the code component. I am new to psychopy so I do not know a lot about it and therefore know nothing about using code component.
How do you use incognito tab in psychopy?
I have the repeat_images because chatGPT said that the extra loop would make the images show up in a loop, but the loop made so each image pair shows up again and again after I tap the correct region, so I do not think that that is the solution to making the images loop.
Sorry if this is very unclear. As I said I am new to psychopy so I have very limited knowledge about how to use it
If you want the sequence to repeat on an incorrect response then you should set the mouse component to end on a valid click and move your code (with some simplification) into End Routine.