aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md
diff options
context:
space:
mode:
authorThéo de la Hogue2024-04-10 20:04:45 +0200
committerThéo de la Hogue2024-04-10 20:04:45 +0200
commit0c5fb0f3ec5f773797fc08ec769f33e332c7dd46 (patch)
tree9ab69aa9579b00fcb322c9331d09f580a2521c67 /docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md
parentbe59d476d3ff5810da583efe2ac4c62b4294f663 (diff)
downloadargaze-0c5fb0f3ec5f773797fc08ec769f33e332c7dd46.zip
argaze-0c5fb0f3ec5f773797fc08ec769f33e332c7dd46.tar.gz
argaze-0c5fb0f3ec5f773797fc08ec769f33e332c7dd46.tar.bz2
argaze-0c5fb0f3ec5f773797fc08ec769f33e332c7dd46.tar.xz
Updating documentation.
Diffstat (limited to 'docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md')
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md37
1 files changed, 10 insertions, 27 deletions
diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md
index 8250382..8242a7f 100644
--- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md
+++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md
@@ -1,34 +1,16 @@
-Load modules from another package
-=================================
+Load objects from external package
+==================================
-It is possible to load [GazeMovementIdentifier](../../../argaze.md/#argaze.GazeFeatures.GazeMovementIdentifier), [ScanPathAnalyzer](../../../argaze.md/#argaze.GazeFeatures.ScanPathAnalyzer), [AOIMatcher](../../../argaze.md/#argaze.GazeFeatures.AOIMatcher) or [AOIScanPathAnalyzer](../../../argaze.md/#argaze.GazeFeatures.AOIScanPathAnalyzer) modules [from another Python package](https://docs.python.org/3/tutorial/modules.html#packages).
+It is possible to load pipeline step objects [from external Python package](https://docs.python.org/3/tutorial/modules.html#packages).
-To do so, simply prepend the package where to find the module into the JSON configuration file:
+To do so, simply prepend the package module where to find a class into the JSON configuration file. The exemple below shows how to load an external [GazeMovementIdentifier](../../../argaze.md/#argaze.GazeFeatures.GazeMovementIdentifier):
```
{
...
"gaze_movement_identifier": {
- "my_package.MyGazeMovementIdentifierAlgorithm": {
- "specific_plugin_parameter": 0
- }
- },
- ...
- "scan_path_analyzers": {
- "my_package.MyScanPathAnalyzerAlgorithm": {
- "specific_plugin_parameter": 0
- }
- }
- ...
- "aoi_matcher": {
- "my_package.MyAOIMatcherAlgorithm": {
- "specific_plugin_parameter": 0
- }
- }
- ...
- "aoi_scan_path_analyzers": {
- "my_package.MyAOIScanPathAnalyzerAlgorithm": {
- "specific_plugin_parameter": 0
+ "my_package.my_module.my_class": {
+ "my_parameter": 0
}
}
}
@@ -45,7 +27,8 @@ import my_package
# Load ArFrame
with argaze.load('./configuration.json') as ar_frame:
- # Print ArFrame attributes
- for module, scan_path_analyzer in ar_frame.scan_path_analyzers.items():
- print('scan path analyzer type:', type(scan_path_analyzer))
+ # Print gaze movement identifier type
+ print(type(ar_frame.gaze_movement_identifier))
```
+
+This logic would be the same for [ScanPathAnalyzer](../../../argaze.md/#argaze.GazeFeatures.ScanPathAnalyzer), [AOIMatcher](../../../argaze.md/#argaze.GazeFeatures.AOIMatcher), [AOIScanPathAnalyzer](../../../argaze.md/#argaze.GazeFeatures.AOIScanPathAnalyzer) or [GazePositionCalibrator](../../../argaze.md/#argaze.GazeFeatures.GazePositionCalibrator). \ No newline at end of file