Classes
Eyelink(window, timer[, isPsychopy, subject]) |
Interface for the SR Research Eyelink eyetracking system. |
imhr.eyetracking._eyelink.Eyelink(window, timer, isPsychopy=True, subject=None, **kwargs)[source]¶Bases: object
Interface for the SR Research Eyelink eyetracking system.
Methods
Methods
calibration(self) |
Start calibration procedure. |
connect(self[, calibration_type, …]) |
Connect to Eyelink. |
drift_correction(self[, origin]) |
Starts drift correction. |
finish_recording(self[, path]) |
Ending Eyelink recording. |
gc(self, bound, min_[, max_]) |
Creates gaze contigent event. |
sample(self) |
Collects new gaze coordinates from Eyelink. |
send_message(self, msg) |
Send message to Eyelink. |
send_variable(self, variables) |
send trial variable to eyelink at the end of trial. |
set_eye_used(self, eye) |
Set dominant eye. |
start_recording(self, trial, block) |
Starts recording of Eyelink. |
stop_recording(self[, trial, block, variables]) |
Stops recording of Eyelink. |
calibration(self) |
Start calibration procedure. |
connect(self[, calibration_type, …]) |
Connect to Eyelink. |
drift_correction(self[, origin]) |
Starts drift correction. |
finish_recording(self[, path]) |
Ending Eyelink recording. |
gc(self, bound, min_[, max_]) |
Creates gaze contigent event. |
sample(self) |
Collects new gaze coordinates from Eyelink. |
send_message(self, msg) |
Send message to Eyelink. |
send_variable(self, variables) |
send trial variable to eyelink at the end of trial. |
set_eye_used(self, eye) |
Set dominant eye. |
start_recording(self, trial, block) |
Starts recording of Eyelink. |
stop_recording(self[, trial, block, variables]) |
Stops recording of Eyelink. |
connect(self, calibration_type=13, automatic_calibration_pacing=1000, saccade_velocity_threshold=35, saccade_acceleration_threshold=9500, sound=True, select_parser_configuration=0, recording_parse_type='GAZE', enable_search_limits=True, ip='100.1.1.1')[source]¶Connect to Eyelink.
| Parameters: |
|
|---|---|
| Returns: |
|
Examples
>>> param = eyetracking.connect(calibration_type=13)
set_eye_used(self, eye)[source]¶Set dominant eye. This step is required for recieving gaze coordinates from Eyelink->Psychopy.
| Parameters: |
|
|---|
Examples
>>> dominant_eye = 'left'
>>> eye_used = eyetracking.set_eye_used(eye=dominant_eye)
calibration(self)[source]¶Start calibration procedure.
| Returns: |
|
|---|
Examples
>>> eyetracking.calibration()
drift_correction(self, origin='call')[source]¶Starts drift correction. This can be done at any point after calibration, including before and after eyetracking.start_recording has already been initiated.
| Parameters: |
|
|---|---|
| Returns: |
|
Notes
Running drift_correction will end any start_recording event to function properly. Once drift correction has occured, it is safe to run start_recording.
Examples
>>> eyetracking.drift_correction()
start_recording(self, trial, block)[source]¶Starts recording of Eyelink.
| Parameters: | |
|---|---|
| Returns: |
|
Notes
Examples
>>> eyetracking.start_recording(trial=1, block=1)
gc(self, bound, min_, max_=None)[source]¶Creates gaze contigent event. This function needs to be run while recording.
| Parameters: |
|
|---|
Examples
>>> # Collect samples within the center of the screen, for 2000 msec,
>>> # with a max limit of 10000 msec.
>>> region = dict(left=860, top=440, right=1060, bottom=640)
>>> eyetracking.gc(bound=bound, min_=2000, max_=10000)
sample(self)[source]¶Collects new gaze coordinates from Eyelink.
| Returns: |
|---|
Examples
>>> eyetracking.sample(eye_used=eye_used)
send_message(self, msg)[source]¶Send message to Eyelink. This allows post-hoc processing of event markers (i.e. “stimulus onset”).
| Parameters: |
|
|---|
Examples
>>> eyetracking.console(msg="eyetracking.calibration() started", color="blue")
send_variable(self, variables)[source]¶send trial variable to eyelink at the end of trial.
| Parameters: |
|---|
stop_recording(self, trial=None, block=None, variables=None)[source]¶Stops recording of Eyelink. Also allows transmission of trial-level variables to Eyelink.
| Parameters: | |
|---|---|
| Returns: |
|
Notes
Examples
>>> variables = dict(stimulus='face.png', event='stimulus')
>>> eyetracking.stop_recording(trial=trial, block=block, variables=variables)
finish_recording(self, path=None)[source]¶Ending Eyelink recording.
| Parameters: | |
|---|---|
| Returns: |
|
Notes
Examples
>>> #end recording session
>>> eyetracking.finish_recording()