-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I'm using version 0.6.1 of this library with the default EPA algorithm. When I provide a PM concentration that is higher than the upper limit defined by the maximum AQI range (i.e. it would result in an AQI above 500), the library fails with an IndexError.
The error gets thrown by the line
Line 91 in 56f6e3b
| (aqilo, aqihi) = self.piecewise['aqi'][idx] |
idx variable is larger than the AQI boundary array allows.
Complete error message:
File "/home/pi/.local/lib/python3.7/site-packages/aqi/__init__.py", line 45, in to_aqi
return _aqi.aqi(ccs)
File "/home/pi/.local/lib/python3.7/site-packages/aqi/algos/base.py", line 36, in aqi
_iaqi = self.iaqi(elem, cc)
File "/home/pi/.local/lib/python3.7/site-packages/aqi/algos/base.py", line 91, in iaqi
(aqilo, aqihi) = self.piecewise['aqi'][idx]
IndexError: list index out of range
Metadata
Metadata
Assignees
Labels
No labels