The code uses next(iterator) to pull the "raw" key-value parameter following a "data" parameter. To fix this, we would need to do a look-ahead to see whether the following key is rawi or rawf. Unfortunately this would require a different kind of parser.
The AML parser expects values to be paired with their raw sensor readings, like this:
However this is dependent on the configuration, and raw values might be omitted.
The code uses
next(iterator)
to pull the "raw" key-value parameter following a "data" parameter. To fix this, we would need to do a look-ahead to see whether the following key israwi
orrawf
. Unfortunately this would require a different kind of parser.https://github.com/WHOIGit/PhytO-ARM/blob/d7f493fc8f0bad54a2f68c0af40bf4ada0a84d06/src/aml_ctd/src/amlxparser.py#L27-L34