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[source]#

Convert pixel screen coordinates to degrees of visual angle.

Parameters:
  • screen_resolution – Pixel screen resolution as tuple (width, height).

  • screen_size – Screen size in centimeters as tuple (width, height).

  • distance – 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 – The location of the pixel origin. Supported values: center, lower left. See also py:func:~pymovements.gaze.transform.center_origin for more information.

  • n_components – Number of components in input column.

  • pixel_column – The input pixel column name.

  • position_column – The output position column name.