Eyetracker |

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
pygaze._eyetracker.libeyelink.libeyelink Class Reference
Inheritance diagram for pygaze._eyetracker.libeyelink.libeyelink:

## Public Member Functions
| __init__ (self, display, resolution=settings.DISPSIZE, data_file=settings.LOGFILENAME+".edf", fg_color=settings.FGC, bg_color=settings.BGC, eventdetection=settings.EVENTDETECTION, saccade_velocity_threshold=35, saccade_acceleration_threshold=9500, blink_threshold=settings.BLINKTHRESH, force_drift_correct=True, pupil_size_mode=settings.EYELINKPUPILSIZEMODE, **args)
| send_command (self, cmd)
| log (self, msg)
| status_msg (self, msg)
| connected (self)
| calibrate (self)
| drift_correction (self, pos=None, fix_triggered=False)
| manual_drift_correction (self, pos)
| prepare_drift_correction (self, pos)
| fix_triggered_drift_correction (self, pos=None, min_samples=30, max_dev=60, reset_threshold=10)
| start_recording (self)
| stop_recording (self)
| close (self)
| set_eye_used (self)
| pupil_size (self)
| sample (self)
| set_detection_type (self, eventdetection)
| wait_for_event (self, event)
| wait_for_saccade_start (self)
| wait_for_saccade_end (self)
| wait_for_fixation_start (self)
| wait_for_fixation_end (self)
| wait_for_blink_start (self)
| wait_for_blink_end (self)
| set_draw_calibration_target_func (self, func)
| is_valid_sample (self, gazepos)
| confirm_abort_experiment (self)
| draw_drift_correction_target (self, x, y)
Public Member Functions inherited from pygaze._eyetracker.baseeyetracker.BaseEyeTracker
| __init__ (self)
| get_eyetracker_clock_async (self)
| log_var (self, var, val)
| draw_calibration_target (self, x, y)
| set_draw_drift_correction_target_func (self, func)

## Public Attributes
| local_data_file = data_file
| eyelink_data_file = os.path.basename(data_file)
| display = display
int | fontsize = 18
| scr = Screen(disptype=settings.DISPTYPE, mousevisible=False)
| kb = Keyboard(keylist=["escape", "q"], timeout=1)
| resolution = resolution
bool | recording = False
| saccade_velocity_treshold = saccade_velocity_threshold
| saccade_acceleration_treshold = saccade_acceleration_threshold
| blink_threshold = blink_threshold
int | eye_used = None
int | left_eye = 0
int | right_eye = 1
int | binocular = 2
str | pupil_size_mode = pupil_size_mode
tuple | prevsample = (-1,-1)
int | prevps = -1
float | fixtresh = 1.5
int | fixtimetresh = 100
| spdtresh = self.saccade_velocity_treshold
| accthresh = self.saccade_acceleration_treshold
int | weightdist = 10
| screendist = settings.SCREENDIST
| screensize = settings.SCREENSIZE
tuple | pixpercm
int | tracker_software_ver = 0
int | eyelink_ver = pylink.getEYELINK().getTrackerVersion()
str | eyelink_model = 'EyeLink I'
| eyelink_graphics = EyelinkGraphics(self, _eyelink)
str | eventdetection = 'native':
tuple | pxdsttresh = (XRMS, YRMS)
| pxfixtresh = deg2pix(self.screendist, self.fixtresh, self.pixpercm)
float | pxspdtresh
float | pxacctresh
Public Attributes inherited from pygaze._eyetracker.baseeyetracker.BaseEyeTracker
| draw_calibration_target = func

## Static Public Attributes
int | MAX_TRY = 100

## Protected Member Functions
| _get_eyelink_clock_async (self)

## Constructor & Destructor Documentation

## ◆ __init__()

pygaze._eyetracker.libeyelink.libeyelink.__init__ | ( |  | self,
|  |  | display,
|  |  | resolution = settings.DISPSIZE,
|  |  | data_file = settings.LOGFILENAME+".edf",
|  |  | fg_color = settings.FGC,
|  |  | bg_color = settings.BGC,
|  |  | eventdetection = settings.EVENTDETECTION,
|  |  | saccade_velocity_threshold = 35,
|  |  | saccade_acceleration_threshold = 9500,
|  |  | blink_threshold = settings.BLINKTHRESH,
|  |  | force_drift_correct = True,
|  |  | pupil_size_mode = settings.EYELINKPUPILSIZEMODE,
|  | ** | args )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

## Member Function Documentation

## ◆ _get_eyelink_clock_async()

pygaze._eyetracker.libeyelink.libeyelink._get_eyelink_clock_async | ( |  | self | ) |
| protected

            Retrieve time differenece between tracker timestamps and
            current clock time upheld in the pygaze environment.

            Note that this is not guaranteed to be a static time difference, the
            clocks might run at different speeds. Therefore you should consider
            running this function every time you utilize on this time difference.

            Returns:
            The tracker time minus the clock time

## ◆ calibrate()

pygaze._eyetracker.libeyelink.libeyelink.calibrate | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ close()

pygaze._eyetracker.libeyelink.libeyelink.close | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ confirm_abort_experiment()

pygaze._eyetracker.libeyelink.libeyelink.confirm_abort_experiment | ( |  | self | ) |

            Asks for confirmation before aborting the experiment. Displays a
            confirmation screen, collects the response, and acts accordingly.

            Exceptions:
            Raises a response_error upon confirmation.

            Returns:
            False if no confirmation was given.

## ◆ connected()

pygaze._eyetracker.libeyelink.libeyelink.connected | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ draw_drift_correction_target()

pygaze._eyetracker.libeyelink.libeyelink.draw_drift_correction_target | ( |  | self,
|  |  | x,
|  |  | y )

            Draws the drift-correction target.

            arguments

            x       --  The X coordinate
            y       --  The Y coordinate

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ drift_correction()

pygaze._eyetracker.libeyelink.libeyelink.drift_correction | ( |  | self,
|  |  | pos = None,
|  |  | fix_triggered = False )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ fix_triggered_drift_correction()

pygaze._eyetracker.libeyelink.libeyelink.fix_triggered_drift_correction | ( |  | self,
|  |  | pos = None,
|  |  | min_samples = 30,
|  |  | max_dev = 60,
|  |  | reset_threshold = 10 )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ is_valid_sample()

pygaze._eyetracker.libeyelink.libeyelink.is_valid_sample | ( |  | self,
|  |  | gazepos )

            Checks if the sample provided is valid, based on EyeLink specific
            criteria.

            arguments
            gazepos     --  a (x,y) gaze position tuple, as returned by
                            self.sample()

            returns
            valid           --  a Boolean: True on a valid sample, False on
                            an invalid sample

## ◆ log()

pygaze._eyetracker.libeyelink.libeyelink.log | ( |  | self,
|  |  | msg )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ manual_drift_correction()

pygaze._eyetracker.libeyelink.libeyelink.manual_drift_correction | ( |  | self,
|  |  | pos )

            Performs a manual, i.e. spacebar-triggered drift correction.

            Arguments:
            pos     --  The positionf or the drift-correction target.

            Returns:
            True if drift correction was successfull, False otherwise.

## ◆ prepare_drift_correction()

pygaze._eyetracker.libeyelink.libeyelink.prepare_drift_correction | ( |  | self,
|  |  | pos )

    Puts the tracker in drift correction mode

## ◆ pupil_size()

pygaze._eyetracker.libeyelink.libeyelink.pupil_size | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ sample()

pygaze._eyetracker.libeyelink.libeyelink.sample | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ send_command()

pygaze._eyetracker.libeyelink.libeyelink.send_command | ( |  | self,
|  |  | cmd )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ set_detection_type()

pygaze._eyetracker.libeyelink.libeyelink.set_detection_type | ( |  | self,
|  |  | eventdetection )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ set_draw_calibration_target_func()

pygaze._eyetracker.libeyelink.libeyelink.set_draw_calibration_target_func | ( |  | self,
|  |  | func )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ set_eye_used()

pygaze._eyetracker.libeyelink.libeyelink.set_eye_used | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ start_recording()

pygaze._eyetracker.libeyelink.libeyelink.start_recording | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ status_msg()

pygaze._eyetracker.libeyelink.libeyelink.status_msg | ( |  | self,
|  |  | msg )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ stop_recording()

pygaze._eyetracker.libeyelink.libeyelink.stop_recording | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ wait_for_blink_end()

pygaze._eyetracker.libeyelink.libeyelink.wait_for_blink_end | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ wait_for_blink_start()

pygaze._eyetracker.libeyelink.libeyelink.wait_for_blink_start | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ wait_for_event()

pygaze._eyetracker.libeyelink.libeyelink.wait_for_event | ( |  | self,
|  |  | event )

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ wait_for_fixation_end()

pygaze._eyetracker.libeyelink.libeyelink.wait_for_fixation_end | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ wait_for_fixation_start()

pygaze._eyetracker.libeyelink.libeyelink.wait_for_fixation_start | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ wait_for_saccade_end()

pygaze._eyetracker.libeyelink.libeyelink.wait_for_saccade_end | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## ◆ wait_for_saccade_start()

pygaze._eyetracker.libeyelink.libeyelink.wait_for_saccade_start | ( |  | self | ) |

    See pygaze._eyetracker.baseeyetracker.BaseEyeTracker

Reimplemented from pygaze._eyetracker.baseeyetracker.BaseEyeTracker.

## Member Data Documentation

## ◆ accthresh

pygaze._eyetracker.libeyelink.libeyelink.accthresh = self.saccade_acceleration_treshold

## ◆ binocular

int pygaze._eyetracker.libeyelink.libeyelink.binocular = 2

## ◆ blink_threshold

pygaze._eyetracker.libeyelink.libeyelink.blink_threshold = blink_threshold

## ◆ display

pygaze._eyetracker.libeyelink.libeyelink.display = display

## ◆ eventdetection

pygaze._eyetracker.libeyelink.libeyelink.eventdetection = 'native':

## ◆ eye_used

int pygaze._eyetracker.libeyelink.libeyelink.eye_used = None

## ◆ eyelink_data_file

pygaze._eyetracker.libeyelink.libeyelink.eyelink_data_file = os.path.basename(data_file)

## ◆ eyelink_graphics

pygaze._eyetracker.libeyelink.libeyelink.eyelink_graphics = EyelinkGraphics(self, _eyelink)

## ◆ eyelink_model

str pygaze._eyetracker.libeyelink.libeyelink.eyelink_model = 'EyeLink I'

## ◆ eyelink_ver

int pygaze._eyetracker.libeyelink.libeyelink.eyelink_ver = pylink.getEYELINK().getTrackerVersion()

## ◆ fixtimetresh

int pygaze._eyetracker.libeyelink.libeyelink.fixtimetresh = 100

## ◆ fixtresh

float pygaze._eyetracker.libeyelink.libeyelink.fixtresh = 1.5

## ◆ fontsize

int pygaze._eyetracker.libeyelink.libeyelink.fontsize = 18

## ◆ kb

pygaze._eyetracker.libeyelink.libeyelink.kb = Keyboard(keylist=["escape", "q"], timeout=1)

## ◆ left_eye

int pygaze._eyetracker.libeyelink.libeyelink.left_eye = 0

## ◆ local_data_file

pygaze._eyetracker.libeyelink.libeyelink.local_data_file = data_file

## ◆ MAX_TRY

pygaze._eyetracker.libeyelink.libeyelink.MAX_TRY = 100
| static

## ◆ pixpercm

tuple pygaze._eyetracker.libeyelink.libeyelink.pixpercm

Initial value:
= (self.resolution[0]/float(self.screensize[0]) + \
self.resolution[1]/float(self.screensize[1])) / 2.0

## ◆ prevps

int pygaze._eyetracker.libeyelink.libeyelink.prevps = -1

## ◆ prevsample

tuple pygaze._eyetracker.libeyelink.libeyelink.prevsample = (-1,-1)

## ◆ pupil_size_mode

pygaze._eyetracker.libeyelink.libeyelink.pupil_size_mode = pupil_size_mode

## ◆ pxacctresh

float pygaze._eyetracker.libeyelink.libeyelink.pxacctresh

Initial value:
= deg2pix(self.screendist, self.accthresh,
self.pixpercm)/1000.0

## ◆ pxdsttresh

tuple pygaze._eyetracker.libeyelink.libeyelink.pxdsttresh = (XRMS, YRMS)

## ◆ pxfixtresh

pygaze._eyetracker.libeyelink.libeyelink.pxfixtresh = deg2pix(self.screendist, self.fixtresh, self.pixpercm)

## ◆ pxspdtresh

float pygaze._eyetracker.libeyelink.libeyelink.pxspdtresh

Initial value:
= deg2pix(self.screendist, self.spdtresh,
self.pixpercm)/1000.0

## ◆ recording

bool pygaze._eyetracker.libeyelink.libeyelink.recording = False

## ◆ resolution

pygaze._eyetracker.libeyelink.libeyelink.resolution = resolution

## ◆ right_eye

int pygaze._eyetracker.libeyelink.libeyelink.right_eye = 1

## ◆ saccade_acceleration_treshold

pygaze._eyetracker.libeyelink.libeyelink.saccade_acceleration_treshold = saccade_acceleration_threshold

## ◆ saccade_velocity_treshold

pygaze._eyetracker.libeyelink.libeyelink.saccade_velocity_treshold = saccade_velocity_threshold

## ◆ scr

pygaze._eyetracker.libeyelink.libeyelink.scr = Screen(disptype=settings.DISPTYPE, mousevisible=False)

## ◆ screendist

pygaze._eyetracker.libeyelink.libeyelink.screendist = settings.SCREENDIST

## ◆ screensize

pygaze._eyetracker.libeyelink.libeyelink.screensize = settings.SCREENSIZE

## ◆ spdtresh

pygaze._eyetracker.libeyelink.libeyelink.spdtresh = self.saccade_velocity_treshold

## ◆ tracker_software_ver

int pygaze._eyetracker.libeyelink.libeyelink.tracker_software_ver = 0

## ◆ weightdist

int pygaze._eyetracker.libeyelink.libeyelink.weightdist = 10

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

- C:/Users/lurax/eyetrackingTobii/pygaze/_eyetracker/libeyelink.py