From 74ed30fa3417c5a1bb5f147d779250e5bbdbd521 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 22 Nov 2023 10:38:16 +0100 Subject: Including code reference inside pipeline modules description. --- .../pipeline_modules/aoi_matchers.md | 26 ++++++++--- .../pipeline_modules/aoi_scan_path_analyzers.md | 50 ++++++++++++++++------ .../pipeline_modules/gaze_movement_identifiers.md | 27 ++++++++---- .../pipeline_modules/gaze_position_calibrators.md | 22 ++++++++-- .../pipeline_modules/scan_path_analyzers.md | 37 ++++++++++++---- src/argaze/GazeAnalysis/Basic.py | 2 - src/argaze/GazeAnalysis/DeviationCircleCoverage.py | 1 - .../DispersionThresholdIdentification.py | 4 -- src/argaze/GazeAnalysis/Entropy.py | 1 - src/argaze/GazeAnalysis/ExploreExploitRatio.py | 1 - src/argaze/GazeAnalysis/FocusPointInside.py | 5 +-- src/argaze/GazeAnalysis/KCoefficient.py | 2 - src/argaze/GazeAnalysis/LempelZivComplexity.py | 1 - src/argaze/GazeAnalysis/LinearRegression.py | 1 - src/argaze/GazeAnalysis/NGram.py | 1 - src/argaze/GazeAnalysis/NearestNeighborIndex.py | 1 - src/argaze/GazeAnalysis/TransitionMatrix.py | 1 - .../VelocityThresholdIdentification.py | 4 -- 18 files changed, 125 insertions(+), 62 deletions(-) diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md index 61338cc..c0bc9df 100644 --- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md +++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md @@ -3,22 +3,38 @@ AOI matchers ArGaze provides ready-to-use AOI matching algorithms. -Here are JSON samples to include the chosen module inside [ArLayer configuration](../aoi_analysis.md) *aoi_matcher* entry. +The JSON samples have to be included inside [ArLayer configuration](../aoi_analysis.md) *aoi_matcher* entry to select an algorithm. + +```json +"aoi_matcher": { + JSON sample +} +``` + +Read more about [AOIMatcher base class in code reference](../../../argaze.md/#argaze.GazeFeatures.AOIMatcher). + +!!! note + + The members indicated as **property** are what returns the matcher. ## Deviation circle coverage +::: argaze.GazeAnalysis.DeviationCircleCoverage.AOIMatcher + +### JSON sample + ```json "DeviationCircleCoverage": { "coverage_threshold": 0.5 } ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.DeviationCircleCoverage.AOIMatcher) - ## Focus point inside +::: argaze.GazeAnalysis.FocusPointInside.AOIMatcher + +### JSON sample + ```json "FocusPointInside": {} ``` - -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.FocusPointInside.AOIMatcher) diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md index ad1832d..e68cf8f 100644 --- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md +++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md @@ -3,42 +3,66 @@ AOI scan path analyzers ArGaze provides ready-to-use AOI scan path analysis algorithms. -Here are JSON samples to include a chosen module inside [ArLayer configuration](../aoi_analysis.md) *aoi_scan_path_analyzers* entry. +The JSON samples have to be included inside [ArLayer configuration](../aoi_analysis.md) *aoi_scan_path_analyzers* entry to select an algorithm. + +```json +"aoi_scan_path_analyzers": { + JSON sample +} +``` + +Read more about [AOIScanPathAnalyzer base class in code reference](../../../argaze.md/#argaze.GazeFeatures.AOIScanPathAnalyzer). + +!!! note + + The members indicated as **property** are what returns the analyzer. ## Basic metrics +::: argaze.GazeAnalysis.Basic.AOIScanPathAnalyzer + +### JSON sample + ```json "Basic": {} ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.Basic.AOIScanPathAnalyzer) - ## Entropy +::: argaze.GazeAnalysis.Entropy.AOIScanPathAnalyzer + +### JSON sample + ```json "Entropy": {} ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.Entropy.AOIScanPathAnalyzer) - ## K-modified coefficient +::: argaze.GazeAnalysis.KCoefficient.AOIScanPathAnalyzer + +### JSON sample + ```json "KCoefficient": {} ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.KCoefficient.AOIScanPathAnalyzer) - ## Lempel-Ziv complexity +::: argaze.GazeAnalysis.LempelZivComplexity.AOIScanPathAnalyzer + +### JSON sample + ```json "LempelZivComplexity": {} ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.LempelZivComplexity.AOIScanPathAnalyzer) - ## N-Gram +::: argaze.GazeAnalysis.NGram.AOIScanPathAnalyzer + +### JSON sample + ```json "NGram": { "n_min": 3, @@ -46,12 +70,12 @@ Here are JSON samples to include a chosen module inside [ArLayer configuration]( } ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.NGram.AOIScanPathAnalyzer) - ## Transition matrix +::: argaze.GazeAnalysis.TransitionMatrix.AOIScanPathAnalyzer + +### JSON sample + ```json "TransitionMatrix": {} ``` - -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.TransitionMatrix.AOIScanPathAnalyzer) \ No newline at end of file diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md index 751cc7b..6530c15 100644 --- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md +++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md @@ -3,27 +3,38 @@ Gaze movement identifiers ArGaze provides ready-to-use gaze movement identification algorithms. -Here are JSON samples to include a chosen module inside [ArFrame configuration](../configuration_and_execution.md) *gaze_movement_identifier* entry. +The JSON samples have to be included inside [ArFrame configuration](../configuration_and_execution.md) *gaze_movement_identifier* entry to select an algorithm. + +```json +"gaze_movement_identifier": { + JSON sample +} +``` + +Read more about [GazeMovementIdentifier base class in code reference](../../../argaze.md/#argaze.GazeFeatures.GazeMovementIdentifier). ## Dispersion threshold identification (I-DT) +::: argaze.GazeAnalysis.DispersionThresholdIdentification.GazeMovementIdentifier + +### JSON sample + ```json "DispersionThresholdIdentification": { - "deviation_max_threshold": 50, - "duration_min_threshold": 200 + "deviation_max_threshold": 25, + "duration_min_threshold": 150 } ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.DispersionThresholdIdentification.GazeMovementIdentifier) - ## Velocity threshold identification (I-VT) +::: argaze.GazeAnalysis.VelocityThresholdIdentification.GazeMovementIdentifier + +### JSON sample + ```json "VelocityThresholdIdentification": { "velocity_max_threshold": 10, "duration_min_threshold": 200 } ``` - -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.VelocityThresholdIdentification.GazeMovementIdentifier) - diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md index 69139ed..67dd779 100644 --- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md +++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md @@ -3,10 +3,27 @@ Gaze position calibrators ArGaze provides ready-to-use gaze position calibrator algorithms. -Here are JSON samples to include the chosen module inside [ArFrame configuration](../advanced_topics/gaze_position_calibration.md) *gaze_position_calibrator* entry. + +The JSON samples have to be included inside [ArFrame configuration](../advanced_topics/gaze_position_calibration.md) *gaze_position_calibrator* entry to select an algorithm. + +```json +"gaze_position_calibrator": { + JSON sample +} +``` + +Read more about [GazePositionCalibrator base class in code reference](../../../argaze.md/#argaze.GazeFeatures.GazePositionCalibrator). + +!!! note + + The members indicated as **property** are what returns the matcher. ## Linear regression +::: argaze.GazeAnalysis.LinearRegression.GazePositionCalibrator + +### JSON sample + ```json "LinearRegression": { "coefficients": [ @@ -25,6 +42,3 @@ Here are JSON samples to include the chosen module inside [ArFrame configuration ] } ``` - -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.LinearRegression.GazePositionCalibrator) - diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md index f9f757a..c779112 100644 --- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md +++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md @@ -3,38 +3,57 @@ Scan path analyzers ArGaze provides ready-to-use scan path analysis algorithms. -Here are JSON samples to include a chosen module inside [ArFrame configuration](../configuration_and_execution.md) *scan_path_analyzers* entry. +The JSON samples have to be included inside [ArFrame configuration](../configuration_and_execution.md) *scan_path_analyzers* entry to select an algorithm. + +```json +"scan_path_analyzers": { + JSON sample +} +``` + +Read more about [ScanPathAnalyzer base class in code reference](../../../argaze.md/#argaze.GazeFeatures.ScanPathAnalyzer). + +!!! note + + The members indicated as **property** are what returns the analyzer. ## Basic metrics +::: argaze.GazeAnalysis.Basic.ScanPathAnalyzer + +### JSON sample + ```json "Basic": {} ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.Basic.ScanPathAnalyzer) - ## Explore/Exploit ratio +::: argaze.GazeAnalysis.ExploreExploitRatio.ScanPathAnalyzer + +### JSON sample + ```json "ExploreExploitRatio": { "short_fixation_duration_threshold": 0 } ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.ExploreExploitRatio.ScanPathAnalyzer) - ## K coefficient +::: argaze.GazeAnalysis.KCoefficient.ScanPathAnalyzer + +### JSON sample + ```json "KCoefficient": {} ``` -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.KCoefficient.ScanPathAnalyzer) - ## Nearest neighbor index +::: argaze.GazeAnalysis.NearestNeighborIndex.ScanPathAnalyzer + +### JSON sample ```json "NearestNeighborIndex": {} ``` - -[See in code reference](../../../argaze.md/#argaze.GazeAnalysis.NearestNeighborIndex.ScanPathAnalyzer) \ No newline at end of file diff --git a/src/argaze/GazeAnalysis/Basic.py b/src/argaze/GazeAnalysis/Basic.py index dc7b4fd..a11991f 100644 --- a/src/argaze/GazeAnalysis/Basic.py +++ b/src/argaze/GazeAnalysis/Basic.py @@ -27,7 +27,6 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer): self.__step_fixation_durations_average = 0 def analyze(self, scan_path: GazeFeatures.ScanPathType): - """Analyze scan path.""" self.__path_duration = scan_path.duration @@ -72,7 +71,6 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): self.__step_fixation_durations_average = 0 def analyze(self, aoi_scan_path: GazeFeatures.ScanPathType): - """Analyze aoi scan path.""" self.__path_duration = aoi_scan_path.duration diff --git a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py index acc0665..fde9543 100644 --- a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py +++ b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py @@ -29,7 +29,6 @@ class AOIMatcher(GazeFeatures.AOIMatcher): """Minimal coverage ratio to consider a fixation over an AOI (1 means that whole fixation's deviation circle have to be over the AOI).""" def __post_init__(self): - """Init looked aoi data.""" self.__look_count = 0 self.__looked_aoi_data = (None, None) diff --git a/src/argaze/GazeAnalysis/DispersionThresholdIdentification.py b/src/argaze/GazeAnalysis/DispersionThresholdIdentification.py index a7b9900..9d8cad2 100644 --- a/src/argaze/GazeAnalysis/DispersionThresholdIdentification.py +++ b/src/argaze/GazeAnalysis/DispersionThresholdIdentification.py @@ -143,10 +143,6 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier): self.__saccade_positions = GazeFeatures.TimeStampedGazePositions() def identify(self, ts, gaze_position, terminate=False) -> GazeMovementType: - """Identify gaze movement from successive timestamped gaze positions. - - The optional *terminate* argument allows to notify identification algorithm that given gaze position will be the last one. - """ # Ignore non valid gaze position if not gaze_position.valid: diff --git a/src/argaze/GazeAnalysis/Entropy.py b/src/argaze/GazeAnalysis/Entropy.py index f248845..631a8ea 100644 --- a/src/argaze/GazeAnalysis/Entropy.py +++ b/src/argaze/GazeAnalysis/Entropy.py @@ -38,7 +38,6 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): self.__transition_entropy = -1 def analyze(self, aoi_scan_path: GazeFeatures.AOIScanPathType): - """Analyze aoi scan path.""" assert(len(aoi_scan_path) > 1) diff --git a/src/argaze/GazeAnalysis/ExploreExploitRatio.py b/src/argaze/GazeAnalysis/ExploreExploitRatio.py index b4550e7..b66076b 100644 --- a/src/argaze/GazeAnalysis/ExploreExploitRatio.py +++ b/src/argaze/GazeAnalysis/ExploreExploitRatio.py @@ -34,7 +34,6 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer): self.__explore_exploit_ratio = 0. def analyze(self, scan_path: GazeFeatures.ScanPathType): - """Analyze scan path.""" assert(len(scan_path) > 1) diff --git a/src/argaze/GazeAnalysis/FocusPointInside.py b/src/argaze/GazeAnalysis/FocusPointInside.py index 81a9d20..e7da766 100644 --- a/src/argaze/GazeAnalysis/FocusPointInside.py +++ b/src/argaze/GazeAnalysis/FocusPointInside.py @@ -26,7 +26,6 @@ class AOIMatcher(GazeFeatures.AOIMatcher): """Matching algorithm based on fixation's focus point.""" def __post_init__(self): - """Init looked aoi data.""" self.__looked_aoi_data = (None, None) self.__matched_gaze_movement = None @@ -91,12 +90,12 @@ class AOIMatcher(GazeFeatures.AOIMatcher): @property def looked_aoi(self) -> AOIFeatures.AreaOfInterest: - """Get most likely looked aoi for current fixation (e.g. the aoi with the highest coverage mean value)""" + """Get most likely looked aoi for current fixation.""" return self.__looked_aoi_data[1] @property def looked_aoi_name(self) -> str: - """Get most likely looked aoi name for current fixation (e.g. the aoi with the highest coverage mean value)""" + """Get most likely looked aoi name for current fixation.""" return self.__looked_aoi_data[0] \ No newline at end of file diff --git a/src/argaze/GazeAnalysis/KCoefficient.py b/src/argaze/GazeAnalysis/KCoefficient.py index c50bc3a..c8fa398 100644 --- a/src/argaze/GazeAnalysis/KCoefficient.py +++ b/src/argaze/GazeAnalysis/KCoefficient.py @@ -31,7 +31,6 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer): self.__K = 0 def analyze(self, scan_path: GazeFeatures.ScanPathType): - """Analyze scan path.""" assert(len(scan_path) > 1) @@ -88,7 +87,6 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): self.__K = 0 def analyze(self, aoi_scan_path: GazeFeatures.AOIScanPathType) -> float: - """Analyze aoi scan path.""" assert(len(aoi_scan_path) > 1) diff --git a/src/argaze/GazeAnalysis/LempelZivComplexity.py b/src/argaze/GazeAnalysis/LempelZivComplexity.py index 50c7a90..552ad75 100644 --- a/src/argaze/GazeAnalysis/LempelZivComplexity.py +++ b/src/argaze/GazeAnalysis/LempelZivComplexity.py @@ -32,7 +32,6 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): self.__lempel_ziv_complexity = 0 def analyze(self, aoi_scan_path: GazeFeatures.AOIScanPathType): - """Analyze aoi scan path.""" assert(len(aoi_scan_path) > 1) diff --git a/src/argaze/GazeAnalysis/LinearRegression.py b/src/argaze/GazeAnalysis/LinearRegression.py index 9315751..414832a 100644 --- a/src/argaze/GazeAnalysis/LinearRegression.py +++ b/src/argaze/GazeAnalysis/LinearRegression.py @@ -37,7 +37,6 @@ class GazePositionCalibrator(GazeFeatures.GazePositionCalibrator): """Linear regression intercept value""" def __post_init__(self): - """Init calibration.""" self.__linear_regression = LinearRegression() self.__linear_regression.coef_ = numpy.array(self.coefficients) diff --git a/src/argaze/GazeAnalysis/NGram.py b/src/argaze/GazeAnalysis/NGram.py index a19974a..903c0c0 100644 --- a/src/argaze/GazeAnalysis/NGram.py +++ b/src/argaze/GazeAnalysis/NGram.py @@ -36,7 +36,6 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): self.__ngrams_count = {} def analyze(self, aoi_scan_path: GazeFeatures.AOIScanPathType): - """Analyze aoi scan path.""" assert(len(aoi_scan_path) > 1) diff --git a/src/argaze/GazeAnalysis/NearestNeighborIndex.py b/src/argaze/GazeAnalysis/NearestNeighborIndex.py index 34432ad..1ca336f 100644 --- a/src/argaze/GazeAnalysis/NearestNeighborIndex.py +++ b/src/argaze/GazeAnalysis/NearestNeighborIndex.py @@ -36,7 +36,6 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer): self.__nearest_neighbor_index = 0 def analyze(self, scan_path: GazeFeatures.ScanPathType): - """Analyze scan path.""" assert(len(scan_path) > 1) diff --git a/src/argaze/GazeAnalysis/TransitionMatrix.py b/src/argaze/GazeAnalysis/TransitionMatrix.py index b346b5a..5e3bdf5 100644 --- a/src/argaze/GazeAnalysis/TransitionMatrix.py +++ b/src/argaze/GazeAnalysis/TransitionMatrix.py @@ -34,7 +34,6 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): self.__transition_matrix_density = 0. def analyze(self, aoi_scan_path: GazeFeatures.AOIScanPathType): - """Analyze aoi scan path.""" assert(len(aoi_scan_path) > 1) diff --git a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py index d10f666..e9f770a 100644 --- a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py +++ b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py @@ -143,10 +143,6 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier): self.__saccade_positions = GazeFeatures.TimeStampedGazePositions() def identify(self, ts, gaze_position, terminate=False) -> GazeMovementType: - """Identify gaze movement from successive timestamped gaze positions. - - The optional *terminate* argument allows to notify identification algorithm that given gaze position will be the last one. - """ # Ignore non valid gaze position if not gaze_position.valid: -- cgit v1.1