Skip to content

calibration dots draw not working properly on Mac #17

@TommasoGhilardi

Description

@TommasoGhilardi

On macOS Retina displays, the calibration result dots are drawn in the wrong location, typically "undershooting" or appearing clustered in the top-left relative to the targets.

This occurs because win.size reports "logical" points (e.g., 1440px), but the screen buffer uses "physical" pixels (e.g., 2880px). Our current PIL-based drawing pipeline calculates coordinates based on the logical size, resulting in a mismatch with the high-density backing buffer.

Proposed Solutions We are evaluating two potential fixes:

  • Option A: Account for Scale Factor (PIL Fix) We can modify Coords.py and Calibration.py to use win.getContentScaleFactor(). By detecting the scaling ratio (e.g., 2.0x), we can manually multiply the canvas size and pixel coordinates to match the physical resolution.

Option B: Use Native PsychoPy Stimuli (Refactor) Refactor the result screen to use visual.ElementArrayStim (or lists of visual.Circle) instead of generating a static PIL image.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions