Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Offset per Device #331

Merged
merged 3 commits into from
Jul 16, 2024
Merged

Static Offset per Device #331

merged 3 commits into from
Jul 16, 2024

Conversation

lawhead
Copy link
Collaborator

@lawhead lawhead commented Jul 11, 2024

Overview

Refactored code to allow configuration of a static_offset value for each device, rather than a global value set in the parameters.json.

Ticket

https://www.pivotaltracker.com/story/show/187737714

Contributions

  • Added a static_offset to the DeviceSpec; added a new default value for each device in devices.json
  • Updated any code using previous offset from the parameters file to read the offset for the device of interest (in particular, see offline_analysis and copy phrase)
  • Fixed unit tests

Test

  • Ran all unit tests
  • Ran RSVP Calibration -> Offline Analysis -> Copy Phrase to ensure that typing still worked.

@lawhead lawhead requested review from tab-cmd and celikbasak July 11, 2024 20:26
Copy link
Contributor

@tab-cmd tab-cmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this update! This looks exactly as I would have envisioned it. In offline analysis, if wanting to use an offset for a different device, we'd only need to pull it from the spec. @celikbasak will need to review but this should work well for us.

@@ -26,6 +27,7 @@ def setUp(self):
self.gaze_device_mock.content_type = 'Eyetracker'
self.gaze_device_mock.sample_rate = 60
self.gaze_device_mock.is_active = False
self.gaze_device_mock.static_offset = 0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is currently assumed 0.0 for my analyses as well, but I will think of a way to estimate the correct value

@@ -120,6 +124,7 @@
"sample_rate": 60.0,
"description": "Tobii Nano. For use with the Tobii Pro SDK.",
"excluded_from_analysis": ["device_ts", "system_ts", "left_pupil", "right_pupil"],
"status": "active"
"status": "active",
"static_offset": 0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it 0 for now

@lawhead lawhead merged commit 72dd333 into 2.0.0rc4 Jul 16, 2024
6 checks passed
@lawhead lawhead deleted the static-offset-refactor branch July 16, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants