pymovements.gaze.transforms.pix2deg#
- pymovements.gaze.transforms.pix2deg(*, screen_resolution: tuple[int, int], screen_size: tuple[float, float], distance: float | str, origin: str, n_components: int, pixel_column: str = 'pixel', position_column: str = 'position') pl.Expr #
Convert pixel screen coordinates to degrees of visual angle.
- Parameters:
screen_resolution (tuple[int, int]) – Pixel screen resolution as tuple (width, height).
screen_size (tuple[float, float]) – Screen size in centimeters as tuple (width, height).
distance (float | str) – Must be either a scalar or a string. If a scalar is passed, it is interpreted as the Eye-to-screen distance in centimeters. If a string is passed, it is interpreted as the name of a column containing the Eye-to-screen distance in millimiters for each sample.
origin (str) – The location of the pixel origin. Supported values:
center
,upper left
. See also py:func:~pymovements.gaze.transform.center_origin for more information.n_components (int) – Number of components in input column.
pixel_column (str) – The input pixel column name. (default: ‘pixel’)
position_column (str) – The output position column name. (default: ‘position’)
- Returns:
The respective polars expression.
- Return type:
pl.Expr