I'm trying to present a dynamic checkerboard around an image. I have the checkerboard code to integrate into Psychopy but I'm not able to define the simultaneous presentation of the checkerboard and an image

I’m trying to present a dynamic checkerboard around an image. I have the checkerboard code to integrate into Psychopy but I’m not able to define the simultaneous presentation of the checkerboard and an image.

I tried defining a trial that contains the code for the dynamic checkerboard and the image I want to present but it is not working since I need to define some parameters in the code of the trial ( e.g. Begin experiment, Begin routine) and I’m not sure how to do so.

Thank you in advance.

Did you define the code for the checkerboard in a Code component? If so then you can add code to the start of the experiment by putting it in the Begin Experiment tab.

If you want to see where in the experiment code this gets put, just set the value of each tab to be a comment which you can easily spot (e.g. # THIS IS THE BEGIN EXPERIMENT CODE) and then click Compile.

Thank you @TParsons for your response. I added the code into a Code Component in ‘Begin of Routine’ since I want to present the checkerboard at the beginning of each trial, and I pressed the compile button. For some reason, this is not working. I don’t even get an error message. The experiment simply shuts down. Does this maybe have to do with the fact that I’m simultaneously presenting the checkerboard and an image, and some parametrs needs to be considered?

Again, Thank you for your response it’s appreciated.
Hadeel

There was an issue in 2020.1.2 with PsychoPy shutting down if you tried to compile without a particular legacy preference set, this sounds like that so you should be able to compile if you upgrade to the newest version.