def _info_text_for_online_calibration(self, calibration): gazers = registered_gazer_classes() gazer_class_name = calibration.gazer_class_name gazer_label = gazer_labels_by_class_names(gazers)[gazer_class_name] return ( f"This {gazer_label} calibration was created before or during the " "recording. It is ready to be used in gaze mappers.")
def _create_mapping_method_selector(self, calibration): gazers = user_selectable_gazer_classes() gazers_map = gazer_labels_by_class_names(gazers) return ui.Selector( "gazer_class_name", calibration, label="Gaze Mapping", labels=list(gazers_map.values()), selection=list(gazers_map.keys()), )
def _info_text_for_calibration_from_other_recording(self, calibration): gazers = registered_gazer_classes() gazer_class_name = calibration.gazer_class_name gazer_label = gazer_labels_by_class_names(gazers)[gazer_class_name] if calibration.params: return ( f"This {gazer_label} calibration was copied from another recording. " "It is ready to be used in gaze mappers.") else: return ( "This calibration was copied from another recording, but you " "cannot use it here, because it is not calculated yet. Please go " "back to the original recording, calculate the calibration, " "and copy it again.")