pymovements.base.Screen.pix2deg

Screen.pix2deg(arr: float | list[float] | list[list[float]] | np.ndarray) np.ndarray[source]

Converts pixel screen coordinates to degrees of visual angle.

Parameters

arr (float, array_like) – Pixel coordinates to transform into degrees of visual angle

Returns

degrees_of_visual_angle – Coordinates in degrees of visual angle

Return type

np.ndarray

Raises

ValueError – If positions aren’t two-dimensional.

Examples

>>> screen = Screen(
...     width_px=1280,
...     height_px=1024,
...     width_cm=38,
...     height_cm=30,
...     distance_cm=68,
...     origin='lower left',
... )