afe_calib - bruno-beloff/scs_mfr GitHub Wiki
docs > software repositories > scs_mfr > commands > calibration
DESCRIPTION
The afe_calib utility is used to retrieve or install the calibration sheet for the Alphasense analogue front-end (AFE) board or single sensor installed on the host system.
Alphasense electrochemical sensors are calibrated in the factory when fitted to their AFE board, or individually. The calibration values are provided in a structured document, either on paper or - for sensors provided by South Coast Science - in electronic form. The afe_calib utility is used to retrieve this JSON document via a web API.
The --pid-test-sens flag is used to correct the sensitivity of PID sensors, based on the result of a bump test. Prior to the bump test, sensor should have its zero offset set to the match the ambient VOC concentration. The afe_baseline utility should be set once more, following the sensitivity correction.
The afe_calib utility may also be used to set a "test" calibration sheet, for use in a manufacturing environment.
If a sensor should be ignored by the sampling process, its entry in the afe_calib document should be manually edited to null.
If the gas sensor(s) on a device are changed, then the following utilities should be used to clear existing baseline and calibration settings:
Note that the scs_dev/gases_sampler process must be restarted for changes to take effect.
SYNOPSIS
afe_calib.py [{ -f SERIAL_NUMBER | -a SERIAL_NUMBER | -s SERIAL_NUMBER YYYY-MM-DD | -r | -p CORRECT REPORTED | -t | -d }] [-i INDENT] [-v]
Options | |
---|---|
--version | show program's version number and exit |
-h, --help | show this help message and exit |
-f FIND_SERIAL_NUMBER, --find=FIND_SERIAL_NUMBER | find calibration data (without loading it) |
-a AFE_SERIAL_NUMBER, --afe=AFE_SERIAL_NUMBER | load calibration data for AFE with serial number |
-s SENSOR, --sensor=SENSOR | load calibration data for DSI with serial number and calibration date |
-r, --reload | reload calibration data |
-p PID_TEST_SENS, --pid-test-sens=PID_TEST_SENS | set the PID test sensitivity |
-t, --test | set AFE as test load |
-d, --delete | delete this calibration |
-i INDENT, --indent=INDENT | pretty-print the output with INDENT |
-v, --verbose | report narrative to stderr |
EXAMPLES
./afe_calib.py -s 212810465 2019-08-22
./afe_calib.py -vi4 -p 14000 12000
DOCUMENT EXAMPLE
{"serial_number": null, "type": "DSI", "calibrated_on": "2024-01-01", "dispatched_on": null, "pt1000_v20": null, "sn1": {"serial_number": "143351067", "sensor_type": "PIDH2", "pid_zero_mv": null, "pid_sensitivity_mv_ppm": 44.9, "bump-calib": {"sensitivity": 0.857, "calibrated-on": "2024-01-05T13:16:04Z"}}}
FILES
~/SCS/conf/afe_calib.json