sensirion-gas-index-algorithm


Namesensirion-gas-index-algorithm JSON
Version 3.2.2 PyPI version JSON
download
home_pagehttps://developers.sensirion.com
SummarySensirions public algorithms to calculate VOC and NOx gas indices.
upload_time2022-12-05 10:38:44
maintainer
docs_urlNone
authorSensirion
requires_python>=3.6,<4
licenseBSD
keywords sensirion gas-index voc nox algorithm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Sensirion Gas Index Algorithm
=============================

Sensirion's Gas Index Algorithm software provides a VOC and an NOx Index output signal calculated from the SGP40/41 raw
signal inputs `SRAW_VOC` and `SRAW_NOX`. Note: for SGP40, only `SRAW_VOC` is available. This algorithm enables robust detection of
ambient changes of VOCs and NOx with minimal sensor-to-sensor variation. The algorithm is based on a statistical gain-offset
normalization and adapts both parameters constantly applying an exponentially decaying function of the learned parameters to
be able to adapt to changing environments.

For the VOC Index output, the software must be instanced as VOC Algorithm while for the NOx Index output, the software must
be instanced as NOx Algorithm. It is important to feed the raw signals to the corresponding algorithm (i.e., `SRAW_VOC` to the
VOC Algorithm and `SRAW_NOX` to the NOx Algorithm) at a constant sampling interval which must coincide with the sampling
interval that is used to read out the raw signals from the SGP40/41 sensor. The default sampling interval applied in the
algorithm is 1 s. In case, a different sampling interval should be used the definition of the sampling interval in the h.file
of the algorithm must be changed, too.

The algorithm calculates the VOC and NOx Index signals recursively from a single raw tick value of `SRAW_VOC` and `SRAW_NOX`,
respectively, which are both measured by the SGP40/41 sensor at each time step, as well as internal states that are updated
at each time step. These internal states are most importantly the recursively estimated mean and variance of the
corresponding `SRAW` signal as well as some additional internal states such as uptime and other counters. After estimating the
states, the algorithm converts the raw signals in ticks into either VOC or NOx Index, respectively, and applies an adaptive
low-pass filter.


Install
-------
.. sourcecode:: bash

    pip install sensirion-gas-index-algorithm

Recommended usage is within a virtualenv.

Usage VOC Algorithm
-------------------
.. sourcecode:: python

    from sensirion_gas_index_algorithm.voc_algorithm import VocAlgorithm

    voc_algorithm = VocAlgorithm()
    s_voc_raw = 27000  # read out from SGP41
    for _ in range(100):
        voc_index = voc_algorithm.process(s_voc_raw)
        print(voc_index)


Usage NOx Algorithm
-------------------
.. sourcecode:: python

    from sensirion_gas_index_algorithm.nox_algorithm import NoxAlgorithm

    nox_algorithm = NoxAlgorithm()
    s_nox_raw = 18000  # read out from SGP41
    for _ in range(100):
        nox_index = nox_algorithm.process(s_voc_raw)
        print(nox_index)

CHANGELOG
---------

3.2.1
:::::

- Use floating point version of Gas Index Algorithm

3.2.0
:::::

- Add low power examples
- Allow chaning of sampling interval

3.1.0
:::::

- Add VOC gas index algorithm version 3.1.0
- Add NOx gas index algorithm version 3.1.0



            

Raw data

            {
    "_id": null,
    "home_page": "https://developers.sensirion.com",
    "name": "sensirion-gas-index-algorithm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6,<4",
    "maintainer_email": "",
    "keywords": "sensirion,gas-index,voc,nox,algorithm",
    "author": "Sensirion",
    "author_email": "info@sensirion.com",
    "download_url": "https://files.pythonhosted.org/packages/46/67/2469ae7f760281a8ad06b79bb8b1886877c2b40c94b2516a36459d096022/sensirion-gas-index-algorithm-3.2.2.tar.gz",
    "platform": null,
    "description": "Sensirion Gas Index Algorithm\n=============================\n\nSensirion's Gas Index Algorithm software provides a VOC and an NOx Index output signal calculated from the SGP40/41 raw\nsignal inputs `SRAW_VOC` and `SRAW_NOX`. Note: for SGP40, only `SRAW_VOC` is available. This algorithm enables robust detection of\nambient changes of VOCs and NOx with minimal sensor-to-sensor variation. The algorithm is based on a statistical gain-offset\nnormalization and adapts both parameters constantly applying an exponentially decaying function of the learned parameters to\nbe able to adapt to changing environments.\n\nFor the VOC Index output, the software must be instanced as VOC Algorithm while for the NOx Index output, the software must\nbe instanced as NOx Algorithm. It is important to feed the raw signals to the corresponding algorithm (i.e., `SRAW_VOC` to the\nVOC Algorithm and `SRAW_NOX` to the NOx Algorithm) at a constant sampling interval which must coincide with the sampling\ninterval that is used to read out the raw signals from the SGP40/41 sensor. The default sampling interval applied in the\nalgorithm is 1 s. In case, a different sampling interval should be used the definition of the sampling interval in the h.file\nof the algorithm must be changed, too.\n\nThe algorithm calculates the VOC and NOx Index signals recursively from a single raw tick value of `SRAW_VOC` and `SRAW_NOX`,\nrespectively, which are both measured by the SGP40/41 sensor at each time step, as well as internal states that are updated\nat each time step. These internal states are most importantly the recursively estimated mean and variance of the\ncorresponding `SRAW` signal as well as some additional internal states such as uptime and other counters. After estimating the\nstates, the algorithm converts the raw signals in ticks into either VOC or NOx Index, respectively, and applies an adaptive\nlow-pass filter.\n\n\nInstall\n-------\n.. sourcecode:: bash\n\n    pip install sensirion-gas-index-algorithm\n\nRecommended usage is within a virtualenv.\n\nUsage VOC Algorithm\n-------------------\n.. sourcecode:: python\n\n    from sensirion_gas_index_algorithm.voc_algorithm import VocAlgorithm\n\n    voc_algorithm = VocAlgorithm()\n    s_voc_raw = 27000  # read out from SGP41\n    for _ in range(100):\n        voc_index = voc_algorithm.process(s_voc_raw)\n        print(voc_index)\n\n\nUsage NOx Algorithm\n-------------------\n.. sourcecode:: python\n\n    from sensirion_gas_index_algorithm.nox_algorithm import NoxAlgorithm\n\n    nox_algorithm = NoxAlgorithm()\n    s_nox_raw = 18000  # read out from SGP41\n    for _ in range(100):\n        nox_index = nox_algorithm.process(s_voc_raw)\n        print(nox_index)\n\nCHANGELOG\n---------\n\n3.2.1\n:::::\n\n- Use floating point version of Gas Index Algorithm\n\n3.2.0\n:::::\n\n- Add low power examples\n- Allow chaning of sampling interval\n\n3.1.0\n:::::\n\n- Add VOC gas index algorithm version 3.1.0\n- Add NOx gas index algorithm version 3.1.0\n\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Sensirions public algorithms to calculate VOC and NOx gas indices.",
    "version": "3.2.2",
    "split_keywords": [
        "sensirion",
        "gas-index",
        "voc",
        "nox",
        "algorithm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "387ecce6c80a621b392b20c83661cd51",
                "sha256": "b26feabb8662366394ae73aee1143e402a6bf756ac664cd0a9aa4eece3c1f01c"
            },
            "downloads": -1,
            "filename": "sensirion_gas_index_algorithm-3.2.2-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "387ecce6c80a621b392b20c83661cd51",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.6,<4",
            "size": 43017,
            "upload_time": "2022-12-05T10:38:42",
            "upload_time_iso_8601": "2022-12-05T10:38:42.617187Z",
            "url": "https://files.pythonhosted.org/packages/21/73/5deeb0bcc2455064ec7d61fe21ba3fde2b4b57a65c9e62f2d8204e017598/sensirion_gas_index_algorithm-3.2.2-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "f717503f4263f2acc8bf3bfb947bbeb1",
                "sha256": "a7c1de5ffef8f2245b35ad3c5a426747bbbfa5b3803534bc27ba88d77dbcaf2e"
            },
            "downloads": -1,
            "filename": "sensirion-gas-index-algorithm-3.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f717503f4263f2acc8bf3bfb947bbeb1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6,<4",
            "size": 49428,
            "upload_time": "2022-12-05T10:38:44",
            "upload_time_iso_8601": "2022-12-05T10:38:44.706665Z",
            "url": "https://files.pythonhosted.org/packages/46/67/2469ae7f760281a8ad06b79bb8b1886877c2b40c94b2516a36459d096022/sensirion-gas-index-algorithm-3.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-05 10:38:44",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "sensirion-gas-index-algorithm"
}
        
Elapsed time: 0.02394s