From f56b287d251afd65e74757c85ff5c78517fa1595 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Mon, 11 Mar 2024 16:29:09 +0100 Subject: Harmonizing name of methods returning a boolean status. --- .../aruco_markers_pipeline/configuration_and_execution.md | 2 +- .../advanced_topics/gaze_position_calibration.md | 2 +- .../gaze_analysis_pipeline/advanced_topics/scripting.md | 12 ++++++------ .../gaze_analysis_pipeline/configuration_and_execution.md | 2 +- docs/user_guide/gaze_analysis_pipeline/logging.md | 4 ++-- .../timestamped_gaze_positions_edition.md | 10 +++++----- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'docs') diff --git a/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md b/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md index 0349a91..885db50 100644 --- a/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md +++ b/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md @@ -138,7 +138,7 @@ Particularly, timestamped gaze positions can be passed one by one to [ArUcoCamer try: # Look ArUcoCamera frame at a timestamped gaze position - aruco_camera.look(timestamp, gaze_position) + aruco_camera.look(timestamped_gaze_position) # Do something with pipeline exception except Exception as e: diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md index 9e0ec4c..4d80c05 100644 --- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md +++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md @@ -37,7 +37,7 @@ Here is an extract from the JSON ArFrame configuration file where a [Linear Regr ... # If calibration process started - if ar_frame.gaze_position_calibrator.calibrating: + if ar_frame.gaze_position_calibrator.is_calibrating(): # Store calibration data ar_frame.gaze_position_calibrator.store(timestamp, observed_gaze_position, expected_gaze_position) diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md index 11e561e..4935847 100644 --- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md +++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md @@ -80,7 +80,7 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho ... ar_frame.last_gaze_position # Check if a gaze movement has been identified - if ar_frame.last_gaze_movement and ar_frame.last_gaze_movement.finished: + if ar_frame.last_gaze_movement and ar_frame.last_gaze_movement.is_finished(): # Do something with identified fixation if GazeFeatures.is_fixation(ar_frame.last_gaze_movement): @@ -93,7 +93,7 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho ... # Do something with scan path analysis - if ar_frame.analysis_available: + if ar_frame.is_analysis_available(): for scan_path_analyzer_name, scan_path_analysis in ar_frame.analysis(): @@ -105,7 +105,7 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho # Do something with last looked aoi name ... ar_frame.last_looked_aoi_name - if ar_layer.analysis_available: + if ar_layer.is_analysis_available(): for aoi_scan_path_analyzer_name, aoi_scan_path_analysis in ar_layer.analysis(): @@ -132,9 +132,9 @@ In that case, the last gaze movement *finished* flag is false. Then, the last gaze movement type can be tested thanks to [GazeFeatures.is_fixation](../../../argaze.md/#argaze.GazeFeatures.is_fixation) and [GazeFeatures.is_saccade](../../../argaze.md/#argaze.GazeFeatures.is_saccade) functions. -### *ar_frame.analysis_available* +### *ar_frame.is_analysis_available()* -This flag allows to know when new scan path analysis are available. +This method allows to know when new scan path analysis are available. ### *ar_frame.analysis()* @@ -144,7 +144,7 @@ This an iterator to access to all scan path analysis. The name of the last aoi matching done by [AoiMatcher](../../../argaze.md/#argaze.GazeFeatures.AoiMatcher) if one is instanciated else, it is a None value. -### *ar_layer.analysis_available* +### *ar_layer.is_analysis_available()* This flag allows to know when new aoi scan path analysis are available. diff --git a/docs/user_guide/gaze_analysis_pipeline/configuration_and_execution.md b/docs/user_guide/gaze_analysis_pipeline/configuration_and_execution.md index 633b736..e7a5c17 100644 --- a/docs/user_guide/gaze_analysis_pipeline/configuration_and_execution.md +++ b/docs/user_guide/gaze_analysis_pipeline/configuration_and_execution.md @@ -110,7 +110,7 @@ Timestamped gaze positions have to be passed one by one to [ArFrame.look](../../ try: # Look ArFrame at a timestamped gaze position - ar_frame.look(gaze_position) + ar_frame.look(timestamped_gaze_position) # Do something with pipeline exception except Exception as e: diff --git a/docs/user_guide/gaze_analysis_pipeline/logging.md b/docs/user_guide/gaze_analysis_pipeline/logging.md index 48808cc..001c213 100644 --- a/docs/user_guide/gaze_analysis_pipeline/logging.md +++ b/docs/user_guide/gaze_analysis_pipeline/logging.md @@ -38,7 +38,7 @@ class ScanPathAnalysisLogger(DataFeatures.PipelineStepObserver, UtilsFeatures.Fi def on_look(self, timestamp, ar_frame, exception): """Log scan path metrics""" - if ar_frame.analysis_available: + if ar_frame.is_analysis_available(): log = ( timestamp, @@ -78,7 +78,7 @@ class AOIScanPathAnalysisLogger(DataFeatures.PipelineStepObserver, UtilsFeatures def on_look(self, timestamp, ar_layer, exception): """Log aoi scan path metrics.""" - if ar_layer.analysis_available: + if ar_layer.is_analysis_available(): log = ( timestamp, diff --git a/docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md b/docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md index 4c53258..5c60f8c 100644 --- a/docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md +++ b/docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md @@ -20,7 +20,7 @@ dataframe = pandas.read_csv('gaze_positions.csv', delimiter=",", low_memory=Fals ts_gaze_positions = GazeFeatures.TimeStampedGazePositions.from_dataframe(dataframe, timestamp = 'Recording timestamp [ms]', x = 'Gaze point X [px]', y = 'Gaze point Y [px]') # Iterate over timestamped gaze positions -for gaze_position in ts_gaze_positions: +for timestamped_gaze_position in ts_gaze_positions: # Do something with each timestamped gaze position ... @@ -37,8 +37,8 @@ from argaze import GazeFeatures # Assuming to be inside the function where timestamp_µs, gaze_x and gaze_y values are catched ... - # Define a basic gaze position converting microsecond timestamp into second timestamp - gaze_position = GazeFeatures.GazePosition((gaze_x, gaze_y), timestamp=timestamp_µs * 1e-6) + # Define a timestamped gaze position converting microsecond timestamp into second timestamp + timestamped_gaze_position = GazeFeatures.GazePosition((gaze_x, gaze_y), timestamp=timestamp_µs * 1e-6) # Do something with each timestamped gaze position ... @@ -55,8 +55,8 @@ start_time = time.time() # Assuming to be inside the function where only gaze_x and gaze_y values are catched (no timestamp) ... - # Define a basic gaze position with millisecond timestamp - gaze_position = GazeFeatures.GazePosition((gaze_x, gaze_y), timestamp=int((time.time() - start_time) * 1e3)) + # Define a timestamped gaze position with millisecond timestamp + timestamped_gaze_position = GazeFeatures.GazePosition((gaze_x, gaze_y), timestamp=int((time.time() - start_time) * 1e3)) # Do something with each timestamped gaze position ... -- cgit v1.1