OS (e.g. Win11 Enterprise):
PsychoPy version (e.g. 2026.1.3 Py 3.8):
Standard Standalone Installation? (y):
Do you want it to also run online? (y):
What are you trying to achieve?
I am trying to present two images side by side on the screen. These images depict X-ray scans of airport bags. One image is a side view of the bag and the other is a top-down view.
Each image contains a target object (e.g. a knife) with a bounding box drawn around it. The target is the same object in both images because the two images depict the same bag. I have a JSON file containing the target coordinates in pixels. An example JSON entry is:
{"name": "P00096", "objects": [{"label": "Knife", "ol_bb": [485, 328, 593, 370], "sd_bb": [485, 510, 592, 525]}]}
Participants will be required to spot any malicious looking object in the image.
The experiment requires:
-
A key dependent variable is accuracy, measured as the percentage of clicks that correctly land on the target.
-
Participants must achieve a certain level of accuracy (successful clicks on the target) before progressing to the next set of trials.
-
The experiment will be run via Pavlovia and Prolific, so screen sizes and monitor resolutions will vary between participants. Therefore, the images must scale consistently across different setups.
What I am trying to achieve is a reliable way of ensuring that the bag images and their associated bounding boxes remain spatially accurate when presented on different monitors.
I am specifically looking for advice on:
A. The best and most appropriate PsychoPy window units setting (norm vs height) for presenting the images, and how to ensure that the images scale appropriately across different screen sizes and aspect ratios.
B. The best way to determine whether mouse clicks land inside the target bounding boxes.
C. Once the participants have clicked on the image and press spacebar to state ‘satisfied’, the images will then be replaced by an identical set, but greyed out. I’m very confused as to how to do this.
What did you try to make it work?
I have written custom code (with AI assistance) to capture mouse clicks relative to the stimulus coordinates. This appears to be working based on the output data files, which correctly record mouse click positions and whether clicks fall within the target regions.
However, I still need guidance on point A and C — specifically, how image scaling behaves when monitor sizes and resolutions differ between participants and how to grey out the images.
Link to the most relevant existing thread you have found:
Scale Images to different sizes - Builder - PsychoPy
What specifically went wrong when you tried that?
For Point A - I do not currently have an error message. At this stage, I am seeking advice on the best methodological and technical approach before proceeding further.
Point C - I’m just very unsure about how to do this methodologically, without creating a new routine?
Thank you in advance!
Nathan