|
8 | 8 | from typing import Any, Literal |
9 | 9 |
|
10 | 10 | from glassesTools import annotation, gaze_worldref, utils |
11 | | -from glassesValidator import process as gv_process |
| 11 | +from glassesTools.validation import DataQualityType, get_DataQualityType_explanation |
12 | 12 |
|
13 | 13 | from . import marker, plane, session, typed_dict_defaults, type_utils |
14 | 14 |
|
@@ -89,7 +89,7 @@ def __init__(self, |
89 | 89 |
|
90 | 90 | validate_do_global_shift : bool = True, |
91 | 91 | validate_max_dist_fac : float = .5, |
92 | | - validate_dq_types : set[gv_process.DataQualityType]|None = None, |
| 92 | + validate_dq_types : set[DataQualityType]|None = None, |
93 | 93 | validate_allow_dq_fallback : bool = False, |
94 | 94 | validate_include_data_loss : bool = False, |
95 | 95 | validate_I2MC_settings : I2MCSettings|None = None, |
@@ -549,8 +549,8 @@ def load_from_json(path: str | pathlib.Path, strict_check: bool=True) -> 'Study' |
549 | 549 | _params = inspect.signature(Study.__init__).parameters |
550 | 550 | study_defaults = {k:d for k in _params if (d:=_params[k].default)!=inspect._empty} |
551 | 551 | study_parameter_types = {k:_params[k].annotation for k in _params if k not in ['self','strict_check']} |
552 | | -def _get_gv_data_quality_type_doc(dq: gv_process.DataQualityType): |
553 | | - t,doc = gv_process.get_DataQualityType_explanation(dq) |
| 552 | +def _get_gv_data_quality_type_doc(dq: DataQualityType): |
| 553 | + t,doc = get_DataQualityType_explanation(dq) |
554 | 554 | return (dq, type_utils.GUIDocInfo(t,doc)) |
555 | 555 | def _get_annotation_event_doc(a: annotation.Event): |
556 | 556 | t = annotation.tooltip_map[a] |
@@ -619,11 +619,11 @@ def _get_annotation_event_doc(a: annotation.Event): |
619 | 619 | 'export_output3D': type_utils.GUIDocInfo('Mapped data export: include 3D fields', 'Determines whether gaze positions on the plane in the scene camera reference frame are exported when invoking the Export Trials action.'), |
620 | 620 | 'export_output2D': type_utils.GUIDocInfo('Mapped data export: include 2D fields', 'Determines whether gaze positions on the plane in the plane\'s reference frame are exported when invoking the Export Trials action.'), |
621 | 621 | 'export_only_code_marker_presence': type_utils.GUIDocInfo('Mapped data export: only include marker presence?', 'If enabled, for each marker only a single column is added to the export created by the Export Trials action, indicating whether the given marker was detected or not on a given frame. If not enabled, marker pose information is included in the export.'), |
622 | | - 'validate_do_global_shift': type_utils.GUIDocInfo('glassesValidator: Apply global shift?', 'If enabled, for each validation interval the mean position will be removed from the gaze data and the targets, removing any overall shift of the data. This improves the matching of fixations to targets when there is a significant overall offset in the data. It may fail (backfire) if there are data samples far outside the range of the validation targets, or if there is no data for some targets.'), |
| 622 | + 'validate_do_global_shift': type_utils.GUIDocInfo('glassesValidator: Apply global shift?', 'If enabled, for each validation interval the median position will be removed from the gaze data and the mean from the targets, removing any overall shift of the data. This improves the matching of fixations to targets when there is a significant overall offset in the data. It may fail (backfire) if there are data samples far outside the range of the validation targets, or if there is no data for some targets.'), |
623 | 623 | 'validate_max_dist_fac': type_utils.GUIDocInfo('glassesValidator: Maximum distance factor', 'Factor for determining distance limit when assigning fixation points to validation targets. If for a given target the closest fixation point is further away than <factor>*[minimum intertarget distance], then no fixation point will be assigned to this target, i.e., it will not be matched to any fixation point. Set to a large value to essentially disable.'), |
624 | 624 | 'validate_dq_types': type_utils.GUIDocInfo('glassesValidator: Data quality types', 'Selects the types of data quality you would like to calculate for each of the recordings. When none are selected, a good default is used for each recording. When none of the selected types is available, depending on the `validate_allow_dq_fallback` setting, either an error is thrown or that same default is used instead. Whether a data quality type is available depends on what type of gaze information is available for a recording, as well as whether the camera is calibrated.',{ |
625 | 625 | None: # None indicates the doc specification applies to the contained values |
626 | | - dict([_get_gv_data_quality_type_doc(dq) for dq in gv_process.DataQualityType]) |
| 626 | + dict([_get_gv_data_quality_type_doc(dq) for dq in DataQualityType]) |
627 | 627 | }), |
628 | 628 | 'validate_allow_dq_fallback': type_utils.GUIDocInfo('glassesValidator: Allow fallback data quality type?', 'If not enabled, an error is raised when the data quality type(s) indicated in "glassesValidator: Data quality types" are not available. If enabled, a sensible default other data type will be used instead. Does not apply if the "glassesValidator: Data quality types" is not set.'), |
629 | 629 | 'validate_include_data_loss': type_utils.GUIDocInfo('glassesValidator: Include data loss?', 'If enabled, the data quality report will include data loss during the episode selected for each target on the validation poster. This is NOT the data loss of the whole recording and thus not what you want to report in your paper.'), |
|
0 commit comments