Repository navigation
KLEyeTracking Internal Cleanup & API Cleanup - #48
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
This PR makes a wide array of changes and tweaks to how the KLEyeTracking module works internally, as well as introduces some new features and improvements. A number of unused method arguments have been removed from the API for the sake of simplicity.
Note that these changes have yet to be tested on real EyeLink hardware! Bugs are expected, but will be ironed out with proper testing once all planned changes are integrated.
Major improvements
GazeEventGenerator), making it cleaner and easier to adapt for use with any future trackers but also importantly making it possible to write unit tests for eye event generation as well as the EyeTracker class in general.P.dm_click_to_blinkis enabled (off by default). The code for generating blink events can likewise be extended to other trackers in the future.EyeLinkclass has been rewritten to hold the underlyingpylink.EyeLinkobject internally instead of subclassing it directly (which required weird hacks in the first place and also broke documentation if pylink wasn't installed). To access pylink-specific methods, you can access theself.el.eyelinkattribute, which will beNoneif not using the EyeLink backend, making it possible to wrap tracker-specific code inifblocks and also making it explicit in the code that the developer is accessing EyeLink-specific functionality.EyeTrackerclass no longer subclassesBoundarySetdirectly, instead using a BoundarySet internal and providing methods (add_boundary,add_boundaries,clear_boundaries) in the EyeTracker class itself to wrap the existing behaviour in a way that's clearly documented and doesn't require the developer to read the documentation for a separate class in a separate module to understand core functionality.EL_prefix from them all to reduce character counts and also emphasize independence from the underlying tracker hardware.reportandinspectparameters have been removed from all boundary-testing methods in the EyeTracker class, greatly simplifying the API and documentation. These parameters have never been used since being introduced, and the edge-case flexibility they offer will ultimately be replaced by the ability to parse eye event objects directly (in a future PR).Other Changes
events.pysubmodule has been reorganized and renamed in anticipation of adding eye event wrappers.ui_request. This was a bad idea for several reasons, but primarily that it didn't stop the trial and would resume right where it left off!Merge Checklist
closes #<issue-number>to automatically close an issue