Eyetracker |

Loading...
Searching...
No Matches
Functions
pygaze._misc.misc Namespace Reference

## Functions
| copy_docstr (src, target)
| pos2psychopos (pos, dispsize=None)
| psychopos2pos (pos, dispsize=None)
| rgb2psychorgb (rgbgun)

## Function Documentation

## ◆ copy_docstr()

pygaze._misc.misc.copy_docstr | ( |  | src,
|  |  | target )

        Copies docstrings from the methods of a source class to the methods of a
        target class.

        arguments:
        src     --  source class (e.g. BaseDisplay)
        target  --  target class (e.g. PyGameDisplay)

## ◆ pos2psychopos()

pygaze._misc.misc.pos2psychopos | ( |  | pos,
|  |  | dispsize = None )

    Returns a converted position tuple (x,y) (internal use)

        arguments
        pos     -- a (x,y) position tuple, assuming (0,0) is top left

        keyword arguments
        dispsize    -- a (width, height) tuple for the display resolution or None
                   for autodetecting the size of current active window
                   (default = None)

        returns
        pos     -- a (x,y) tuple that makes sense to PsychoPy (i.e. (0,0) is
                   display center; bottom left is (-,-) and top right is
                   (+,+))

## ◆ psychopos2pos()

pygaze._misc.misc.psychopos2pos | ( |  | pos,
|  |  | dispsize = None )

    Returns a converted position tuple (x,y) (internal use)

        arguments
        pos     -- a (x,y) tuple that makes sense to PsychoPy (i.e. (0,0) is
                   display center; bottom left is (-,-) and top right is
                   (+,+))

        keyword arguments
        dispsize    -- a (width, height) tuple for the display resolution or None
                   for autodetecting the size of current active window
                   (default = None)

        returns
        pos     -- a (x,y) position tuple, assuming (0,0) is top left

## ◆ rgb2psychorgb()

pygaze._misc.misc.rgb2psychorgb | ( |  | rgbgun | ) |

    Returns a converted RGB gun

        arguments
        rgbgun  -- a (R,G,B) or (R,G,B,A) tuple containing values between 0
                   and 255; other values (e.g. 'red' or hex values) may be
                   passed as well, but will be returned as they were
        returns
        psyrgb  -- a (R,G,B) tuple containing values between -1 and 1; or
                   rgbgun when passed rgbgun was not a tuple or a list