Eyetracker
 
Loading...
Searching...
No Matches
pygaze._eyetracker.pytribe.tracker Class Reference

Public Member Functions

 __init__ (self, connection)
 
 set_connection (self, connection)
 
 get_push (self)
 
 get_heartbeatinterval (self)
 
 get_version (self)
 
 get_trackerstate (self)
 
 get_framerate (self)
 
 get_iscalibrated (self)
 
 get_iscalibrating (self)
 
 get_calibresult (self)
 
 get_frame (self)
 
 get_screenindex (self)
 
 get_screenresw (self)
 
 get_screenresh (self)
 
 get_screenpsyw (self)
 
 get_screenpsyh (self)
 
 set_push (self, push=None)
 
 set_version (self, version)
 
 set_screenindex (self, index)
 
 set_screenresw (self, width)
 
 set_screenresh (self, height)
 
 set_screenpsyw (self, width)
 
 set_screenpsyh (self, height)
 

Public Attributes

 connection = connection
 
bool push = True
 

Detailed Description

class for SDK Tracker state and information related requests

Constructor & Destructor Documentation

◆ __init__()

pygaze._eyetracker.pytribe.tracker.__init__ ( self,
connection )
Initializes a tracker instance

        arguments

        connection  --  a pytribe.connection instance for the currently
                        attached EyeTribe tracker

Member Function Documentation

◆ get_calibresult()

pygaze._eyetracker.pytribe.tracker.get_calibresult ( self)
Gets the latest valid calibration result

        returns

        WITHOUT CALIBRATION:
        None

        WITH CALIBRATION:
        calibresults    --  a dict containing the calibration results:
                        {   'result':   Boolean indicating whether the
                                    calibration was succesful
                            'deg':  float indicating the average error
                                    in degrees of visual angle
                            'Ldeg': float indicating the left eye
                                    error in degrees of visual angle
                            'Rdeg': float indicating the right eye
                                    error in degrees of visual angle
                            'calibpoints': list, containing a dict for
                                        each calibration point:
                                        {'state':   integer indicating
                                                the state of the
                                                calibration point
                                                (0 means no useful
                                                data has been
                                                obtained and the
                                                point should be
                                                resampled; 1 means
                                                the data is of
                                                questionable
                                                quality, consider
                                                resampling; 2 means
                                                the data is ok)
                                        'cpx':  x coordinate of the
                                                calibration point
                                        'cpy':  y coordinate of the
                                                calibration point
                                        'mecpx':    mean estimated x
                                                coordinate of the
                                                calibration point
                                        'mecpy':    mean estimated y
                                                coordinate of the
                                                calibration point
                                        'acd':  float indicating
                                                the accuracy in
                                                degrees of visual
                                                angle
                                        'Lacd': float indicating
                                                the accuracy in
                                                degrees of visual
                                                angle (left eye)
                                        'Racd': float indicating
                                                the accuracy in
                                                degrees of visual
                                                angle (right eye)
                                        'mepix':    mean error in
                                                pixels
                                        'Lmepix':   mean error in
                                                pixels (left eye)
                                        'Rmepix':   mean error in
                                                pixels (right eye)
                                        'asdp': standard deviation
                                                in pixels
                                        'Lasdp':    standard deviation
                                                in pixels (left eye)
                                        'Rasdp':    standard deviation
                                                in pixels (right eye)
                                        }
                        }

◆ get_frame()

pygaze._eyetracker.pytribe.tracker.get_frame ( self)
Returns the latest frame data (dict)
            {   'timestamp': string time representation,
                'time': integer timestamp in milliseconds,
                'fix': Boolean indicating whether there is a fixation,
                'state': integer 32bit masked tracker state,
                'rawx': integer raw x gaze coordinate in pixels,
                'rawy': integer raw y gaze coordinate in pixels,
                'avgx': integer smoothed x gaze coordinate in pixels,
                'avgx': integer smoothed y gaze coordinate in pixels,
                'psize': float average pupil size,
                'Lrawx': integer raw x left eye gaze coordinate in pixels,
                'Lrawy': integer raw y left eye gaze coordinate in pixels,
                'Lavgx': integer smoothed x left eye gaze coordinate in pixels,
                'Lavgx': integer smoothed y left eye gaze coordinate in pixels,
                'Lpsize': float left eye pupil size,
                'Lpupilx': integer raw left eye pupil centre x coordinate,
                'Lpupily': integer raw left eye pupil centre y coordinate,
                'Rrawx': integer raw x right eye gaze coordinate in pixels,
                'Rrawy': integer raw y right eye gaze coordinate in pixels,
                'Ravgx': integer smoothed x right eye gaze coordinate in pixels,
                'Ravgx': integer smoothed y right eye gaze coordinate in pixels,
                'Rpsize': float right eye pupil size,
                'Rpupilx': integer raw right eye pupil centre x coordinate,
                'Rpupily': integer raw right eye pupil centre y coordinate
                }

◆ get_framerate()

pygaze._eyetracker.pytribe.tracker.get_framerate ( self)
Returns the frame rate that the tracker is running at (integer)

◆ get_heartbeatinterval()

pygaze._eyetracker.pytribe.tracker.get_heartbeatinterval ( self)
Returns the expected heartbeat interval in milliseconds
        (integer)

◆ get_iscalibrated()

pygaze._eyetracker.pytribe.tracker.get_iscalibrated ( self)
Indicates whether there is a calibration (Boolean)

◆ get_iscalibrating()

pygaze._eyetracker.pytribe.tracker.get_iscalibrating ( self)
Indicates whether the tracker is in calibration mode (Boolean)

◆ get_push()

pygaze._eyetracker.pytribe.tracker.get_push ( self)
Returns a Booleam reflecting the state: True for push mode,
        False for pull mode (Boolean)

◆ get_screenindex()

pygaze._eyetracker.pytribe.tracker.get_screenindex ( self)
Returns the screen index number in a multi screen setup (integer)

◆ get_screenpsyh()

pygaze._eyetracker.pytribe.tracker.get_screenpsyh ( self)
Returns the physical screen height in meters (float)

◆ get_screenpsyw()

pygaze._eyetracker.pytribe.tracker.get_screenpsyw ( self)
Returns the physical screen width in meters (float)

◆ get_screenresh()

pygaze._eyetracker.pytribe.tracker.get_screenresh ( self)
Returns the screen resolution height in pixels (integer)

◆ get_screenresw()

pygaze._eyetracker.pytribe.tracker.get_screenresw ( self)
Returns the screen resolution width in pixels (integer)

◆ get_trackerstate()

pygaze._eyetracker.pytribe.tracker.get_trackerstate ( self)
Returns the state of the physcial tracker (integer):
            0:  TRACKER_CONNECTED
                tracker is detected and working
            1:  TRACKER_NOT_CONNECTED
                tracker device is not connected
            2:  TRACKER_CONNECTED_BADFW
                tracker device is connected, but not working due to
                bad firmware
            3:  TRACKER_CONNECTED_NOUSB3
                tracker device is connected, but not working due to
                unsupported USB host
            4:  TRACKER_CONNECTED_NOSTREAM
                tracker device is connected, but no stream could be
                received

◆ get_version()

pygaze._eyetracker.pytribe.tracker.get_version ( self)
Returns the version number (integer)

◆ set_connection()

pygaze._eyetracker.pytribe.tracker.set_connection ( self,
connection )
Set a new connection

        arguments

        connection  --  a pytribe.connection instance for the currently
                        attached EyeTribe tracker

◆ set_push()

pygaze._eyetracker.pytribe.tracker.set_push ( self,
push = None )
Toggles the push state, or sets the state to the passed value

        keyword arguments

        push        --  Boolean indicating the state: True for push,
                                            False for pull
                                            None to toggle current
        returns

        state   --  Boolean indicating the push state

◆ set_screenindex()

pygaze._eyetracker.pytribe.tracker.set_screenindex ( self,
index )
Set the screen index

        arguments

        index   --  integer value indicating the index number of the
                    screen that is to be used with the tracker

◆ set_screenpsyh()

pygaze._eyetracker.pytribe.tracker.set_screenpsyh ( self,
height )
Set the physical height of the screen

        arguments

        width   --  float value indicating the physical screen height in
                    metres

◆ set_screenpsyw()

pygaze._eyetracker.pytribe.tracker.set_screenpsyw ( self,
width )
Set the physical width of the screen

        arguments

        width   --  float value indicating the physical screen width in
                    metres

◆ set_screenresh()

pygaze._eyetracker.pytribe.tracker.set_screenresh ( self,
height )
Set the screen resolution height

        arguments

        height  --  integer value indicating the screen resolution height
                    in pixels

◆ set_screenresw()

pygaze._eyetracker.pytribe.tracker.set_screenresw ( self,
width )
Set the screen resolution width

        arguments

        width   --  integer value indicating the screen resolution width
                    in pixels

◆ set_version()

pygaze._eyetracker.pytribe.tracker.set_version ( self,
version )
Set the protocol version

        arguments

        version --  integer version number

Member Data Documentation

◆ connection

pygaze._eyetracker.pytribe.tracker.connection = connection

◆ push

bool pygaze._eyetracker.pytribe.tracker.push = True

The documentation for this class was generated from the following file: