Created
April 1, 2021 13:33
-
-
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.
This file contains 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
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