Edit and execute context ======================== The [utils.contexts module](../../argaze.md/#argaze.utils.contexts) provides ready-made contexts like: * [Tobii Pro Glasses 2](context_modules/tobii_pro_glasses_2.md) live stream and post processing contexts, * [Pupil Labs](context_modules/pupil_labs.md) live stream context, * [OpenCV](context_modules/opencv.md) window cursor position and movie processing, * [Random](context_modules/random.md) gaze position generator. ## Edit JSON configuration Here is a JSON configuration that loads a [Random.GazePositionGenerator](../../argaze.md/#argaze.utils.contexts.Random.GazePositionGenerator) context: ```json { "argaze.utils.contexts.Random.GazePositionGenerator": { "name": "Random gaze position generator", "range": [1280, 720], "pipeline": { "argaze.ArFeatures.ArFrame": { "size": [1280, 720] } } } } ``` Let's understand the meaning of each JSON entry. ### argaze.utils.contexts.Random.GazePositionGenerator The class name of the object being loaded from the [utils.contexts module](../../argaze.md/#argaze.utils.contexts). ### *name* The name of the [ArContext](../../argaze.md/#argaze.ArFeatures.ArContext). Basically useful for visualization purposes. ### *range* The range of the gaze position being generated. This property is specific to the [Random.GazePositionGenerator](../../argaze.md/#argaze.utils.contexts.Random.GazePositionGenerator) class. ### *pipeline* A minimal gaze processing pipeline that only draws last gaze position. ## Context execution A context can be loaded from a JSON configuration file using the [*load* command](../utils/main_commands.md). ```shell python -m argaze load CONFIGURATION ``` This command should open a GUI window with a random yellow dot inside. ![ArGaze load GUI](../../img/argaze_load_gui_random.png) !!! note "" At this point, it is possible to load any ready-made context from [utils.contexts](../../argaze.md/#argaze.utils.contexts) module. However, the incoming gaze positions are not processed and gaze mapping would not be available for head-mounted eye tracker context. Read the [gaze analysis pipeline section](../gaze_analysis_pipeline/introduction.md) to learn how to process gaze positions then, the [ArUco markers pipeline section](../aruco_marker_pipeline/introduction.md) to learn how to enable gaze mapping with an ArUco markers setup.