examples/a121/reuse_calibration.py#
1# Copyright (c) Acconeer AB, 2022-2023
2# All rights reserved
3
4import acconeer.exptool as et
5from acconeer.exptool import a121
6
7
8args = a121.ExampleArgumentParser().parse_args()
9et.utils.config_logging(args)
10
11"""
12First session - Setup session without calibration
13 Sensor will calibrate during setup
14"""
15
16client = a121.Client.open(**a121.get_client_args(args))
17
18sensor_config = a121.SensorConfig()
19client.setup_session(sensor_config)
20
21calibrations = client.calibrations
22
23"""
24client.calibrations_provided will be equal to {1: False} since calibration was not provided
25"""
26print(f"Setup without provided calibration {client.calibrations_provided}")
27
28client.close()
29
30"""
31Second session - Setup session with calibration
32 Sensor will reuse calibration and not calibrate during setup
33"""
34
35client = a121.Client.open(**a121.get_client_args(args))
36
37sensor_config = a121.SensorConfig()
38client.setup_session(sensor_config, calibrations)
39
40"""
41client.calibrations_provided will be equal to {1: True} since calibration was provided
42"""
43print(f"Setup with provided calibration {client.calibrations_provided}")
44
45client.close()
View this example on GitHub: acconeer/acconeer-python-exploration