Skip to content

Instantly share code, notes, and snippets.

@papr
Created April 1, 2021 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save papr/339dcb08caef45d3798a68aa4e619269 to your computer and use it in GitHub Desktop.
Save papr/339dcb08caef45d3798a68aa4e619269 to your computer and use it in GitHub Desktop.
To use this calibration choreography, download the file and place it in the `Home directory -> pupil_capture_settings -> plugins` folder. Afterward, start Capture. You should be able to select the new choreography in the Calibration menu.
from calibration_choreography.screen_marker_plugin import ScreenMarkerChoreographyPlugin
from calibration_choreography.base_plugin import ChoreographyMode
class NinePointScreenMarkerChoreography(ScreenMarkerChoreographyPlugin):
label = "Nine-point Calibration"
@classmethod
def selection_label(cls) -> str:
return "Nine-point Screen Marker"
@staticmethod
def get_list_of_markers_to_show(mode: ChoreographyMode) -> list:
if ChoreographyMode.CALIBRATION == mode:
return [
(0.5, 0.5),
(0.0, 1.0),
(0.5, 1.0),
(1.0, 1.0),
(1.0, 0.5),
(1.0, 0.0),
(0.5, 0.0),
(0.0, 0.0),
(0.0, 0.5),
]
if ChoreographyMode.VALIDATION == mode:
return [
(0.25, 0.5),
(0.5, 0.75),
(0.75, 0.5),
(0.5, 0.25),
(0.25, 0.0),
(0.0, 0.25),
(0.0, 0.75),
(0.25, 1.0),
(0.75, 1.0),
(1.0, 0.75),
(1.0, 0.25),
(0.75, 0.0),
]
raise ValueError(f"Unknown mode {mode}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment