gaitalytics


Namegaitalytics JSON
Version 0.2.2 PyPI version JSON
download
home_pageNone
Summaryeasy gait-metrics for everyone
upload_time2025-02-07 10:41:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2024 André Böni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords gait-analysis mocap c3d gait-metrics biomechanics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Gaitalytics
===========

.. start-badges

.. list-table::
    :stub-columns: 1

    * - docs
      - |docs|
    * - tests
      - |github-actions|
    * - package
      - |pypi| |conda|
    * - development
      - |MIT| |last-commit| |commits-since| |pixi-badge|

.. |docs| image:: https://img.shields.io/readthedocs/python-gaitalytics?logo=readthedocs
    :target: https://python-gaitalytics.readthedocs.io/
    :alt: Documentation Status

.. |github-actions| image:: https://img.shields.io/github/actions/workflow/status/DART-Lab-LLUI/python-gaitalytics/on_push_test.yaml?logo=pytest
    :alt: GitHub Actions Build Status
    :target: https://github.com/DART-Lab-LLUI/python-gaitalytics/actions/

.. |last-commit| image:: https://img.shields.io/github/last-commit/DART-Lab-LLUI/python-gaitalytics
   :alt: GitHub last commit
   :target: https://github.com/DART-Lab-LLUI/python-gaitalytics

.. |commits-since| image:: https://img.shields.io/github/commits-since/DART-Lab-LLUI/python-gaitalytics/latest.svg
    :alt: Commits since latest release
    :target: https://github.com/DART-Lab-LLUI/python-gaitalytics/compare/

.. |pixi-badge| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json
    :alt: Pixi Badge
    :target: https://pixi.sh

.. |pypi| image:: https://img.shields.io/pypi/dm/gaitalytics?logo=pypi
   :alt: PyPI - Downloads
   :target: https://pypi.org/project/gaitalytics/

.. |conda| image:: https://img.shields.io/conda/dn/DartLab-LLUI/gaitalytics?logo=anaconda
   :alt: Conda Downloads
   :target: https://anaconda.org/dartlab-llui/gaitalytics

.. |MIT| image:: https://img.shields.io/github/license/DART-Lab-LLUI/python-gaitalytics?logo=opensourceinitiative
   :alt: GitHub License


.. end-badges

This Python package provides a comprehensive set of tools and advanced algorithms for analyzing 3D motion capture data.
It is specifically designed to process gait data stored in c3d format. Prior to utilizing the features of gaitalytics,
it is necessary to perform data labeling, modeling, and filtering procedures.

The library's versatility allows it to be adaptable to various marker sets and modeling algorithms,
offering high configurability.

Quickstart
----------

Installation
^^^^^^^^^^^^

Fast install with anaconda:

.. code:: shell

    conda install gaitalytics -c DartLab-LLUI
..

Or with pip:

.. code:: shell

    pip install gaitalytics
..


Configuration
^^^^^^^^^^^^^

Gaitalytics can be used with any marker set, which at least includes
three or four hip markers (front left/right, back left/right or sacrum) and four foot
markers (left heel/toe, right heel/toe).

Additionally markers can be defined on which standard time-series features such as min max mean etc.
will be calculated.

All functionalities in the libraries only take points into account which
are configured in as specific yaml file.



Minimal requirements would look like this:

.. code-block:: yaml

    analysis:
      markers:
        - "LHipAngles"
        - "LKneeAngles"
        - "LAnkleAngles"
        - "LPelvisAngles"
        - "LThoraxAngles"
    mapping:
      markers:
        # Foot
        l_heel: "LHEE"
        r_heel: "RHEE"
        l_toe: "LTOE"
        r_toe: "RTOE"

        # Hip
        l_ant_hip: "LASI"
        r_ant_hip: "RASI"
        l_post_hip: "LPSI"
        r_post_hip: "RPSI"
        sacrum: "SACR"
..



Simple Pipeline
^^^^^^^^^^^^^^^^
.. code-block:: python

    from gaitalytics import api
    # Load configuration (yaml file from above)
    config = api.load_config("./pig_config.yaml")

    # Load trial from c3d file
    trial = api.load_c3d_trial("./test_small.c3d", config)

    # Detect events
    events = api.detect_events(trial, config)
    try:
        # check events
        api.check_events(events)

        # write events to c3d in the same file
        api.write_events_to_c3d("./test_small.c3d", events, './test.c3d')

        # add events to trial
        trial.events = events

        # segment trial to gait cycles. (Events are already existing in the c3d file)
        trial_segmented = api.segment_trial(trial)

        # calculate features
        features = api.calculate_features(trial_segmented, config)

        # normalise time
        trial_normalized = api.time_normalise_trial(trial_segmented)

        # save features
        features.to_netcdf("features.nc")

        # export segmented trial to netcdf
        api.export_trial(trial_segmented, "output_segments")
        api.export_trial(trial_normalized, "output_norm")

    except ValueError as e:
        print(e)
..

Documentation
-------------
https://python-gaitalytics.readthedocs.org

https://github.com/DART-Lab-LLUI/python-gaitalytics

https://pypi.org/project/gaitalytics/

https://anaconda.org/dartlab-llui/gaitalytics


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gaitalytics",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Andr\u00e9 B\u00f6ni <andre.boeni@llui.org>",
    "keywords": "gait-analysis, mocap, c3d, gait-metrics, biomechanics",
    "author": null,
    "author_email": "Andr\u00e9 B\u00f6ni <andre.boeni@llui.org>",
    "download_url": "https://files.pythonhosted.org/packages/60/c6/0fa57b48facab7ca500827da4d136814640c78d967f5ccac9c614916aca9/gaitalytics-0.2.2.tar.gz",
    "platform": null,
    "description": "Gaitalytics\n===========\n\n.. start-badges\n\n.. list-table::\n    :stub-columns: 1\n\n    * - docs\n      - |docs|\n    * - tests\n      - |github-actions|\n    * - package\n      - |pypi| |conda|\n    * - development\n      - |MIT| |last-commit| |commits-since| |pixi-badge|\n\n.. |docs| image:: https://img.shields.io/readthedocs/python-gaitalytics?logo=readthedocs\n    :target: https://python-gaitalytics.readthedocs.io/\n    :alt: Documentation Status\n\n.. |github-actions| image:: https://img.shields.io/github/actions/workflow/status/DART-Lab-LLUI/python-gaitalytics/on_push_test.yaml?logo=pytest\n    :alt: GitHub Actions Build Status\n    :target: https://github.com/DART-Lab-LLUI/python-gaitalytics/actions/\n\n.. |last-commit| image:: https://img.shields.io/github/last-commit/DART-Lab-LLUI/python-gaitalytics\n   :alt: GitHub last commit\n   :target: https://github.com/DART-Lab-LLUI/python-gaitalytics\n\n.. |commits-since| image:: https://img.shields.io/github/commits-since/DART-Lab-LLUI/python-gaitalytics/latest.svg\n    :alt: Commits since latest release\n    :target: https://github.com/DART-Lab-LLUI/python-gaitalytics/compare/\n\n.. |pixi-badge| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json\n    :alt: Pixi Badge\n    :target: https://pixi.sh\n\n.. |pypi| image:: https://img.shields.io/pypi/dm/gaitalytics?logo=pypi\n   :alt: PyPI - Downloads\n   :target: https://pypi.org/project/gaitalytics/\n\n.. |conda| image:: https://img.shields.io/conda/dn/DartLab-LLUI/gaitalytics?logo=anaconda\n   :alt: Conda Downloads\n   :target: https://anaconda.org/dartlab-llui/gaitalytics\n\n.. |MIT| image:: https://img.shields.io/github/license/DART-Lab-LLUI/python-gaitalytics?logo=opensourceinitiative\n   :alt: GitHub License\n\n\n.. end-badges\n\nThis Python package provides a comprehensive set of tools and advanced algorithms for analyzing 3D motion capture data.\nIt is specifically designed to process gait data stored in c3d format. Prior to utilizing the features of gaitalytics,\nit is necessary to perform data labeling, modeling, and filtering procedures.\n\nThe library's versatility allows it to be adaptable to various marker sets and modeling algorithms,\noffering high configurability.\n\nQuickstart\n----------\n\nInstallation\n^^^^^^^^^^^^\n\nFast install with anaconda:\n\n.. code:: shell\n\n    conda install gaitalytics -c DartLab-LLUI\n..\n\nOr with pip:\n\n.. code:: shell\n\n    pip install gaitalytics\n..\n\n\nConfiguration\n^^^^^^^^^^^^^\n\nGaitalytics can be used with any marker set, which at least includes\nthree or four hip markers (front left/right, back left/right or sacrum) and four foot\nmarkers (left heel/toe, right heel/toe).\n\nAdditionally markers can be defined on which standard time-series features such as min max mean etc.\nwill be calculated.\n\nAll functionalities in the libraries only take points into account which\nare configured in as specific yaml file.\n\n\n\nMinimal requirements would look like this:\n\n.. code-block:: yaml\n\n    analysis:\n      markers:\n        - \"LHipAngles\"\n        - \"LKneeAngles\"\n        - \"LAnkleAngles\"\n        - \"LPelvisAngles\"\n        - \"LThoraxAngles\"\n    mapping:\n      markers:\n        # Foot\n        l_heel: \"LHEE\"\n        r_heel: \"RHEE\"\n        l_toe: \"LTOE\"\n        r_toe: \"RTOE\"\n\n        # Hip\n        l_ant_hip: \"LASI\"\n        r_ant_hip: \"RASI\"\n        l_post_hip: \"LPSI\"\n        r_post_hip: \"RPSI\"\n        sacrum: \"SACR\"\n..\n\n\n\nSimple Pipeline\n^^^^^^^^^^^^^^^^\n.. code-block:: python\n\n    from gaitalytics import api\n    # Load configuration (yaml file from above)\n    config = api.load_config(\"./pig_config.yaml\")\n\n    # Load trial from c3d file\n    trial = api.load_c3d_trial(\"./test_small.c3d\", config)\n\n    # Detect events\n    events = api.detect_events(trial, config)\n    try:\n        # check events\n        api.check_events(events)\n\n        # write events to c3d in the same file\n        api.write_events_to_c3d(\"./test_small.c3d\", events, './test.c3d')\n\n        # add events to trial\n        trial.events = events\n\n        # segment trial to gait cycles. (Events are already existing in the c3d file)\n        trial_segmented = api.segment_trial(trial)\n\n        # calculate features\n        features = api.calculate_features(trial_segmented, config)\n\n        # normalise time\n        trial_normalized = api.time_normalise_trial(trial_segmented)\n\n        # save features\n        features.to_netcdf(\"features.nc\")\n\n        # export segmented trial to netcdf\n        api.export_trial(trial_segmented, \"output_segments\")\n        api.export_trial(trial_normalized, \"output_norm\")\n\n    except ValueError as e:\n        print(e)\n..\n\nDocumentation\n-------------\nhttps://python-gaitalytics.readthedocs.org\n\nhttps://github.com/DART-Lab-LLUI/python-gaitalytics\n\nhttps://pypi.org/project/gaitalytics/\n\nhttps://anaconda.org/dartlab-llui/gaitalytics\n\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2024 Andr\u00e9 B\u00f6ni\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "easy gait-metrics for everyone",
    "version": "0.2.2",
    "project_urls": {
        "Changelog": "https://github.com/me/spam/blob/master/CHANGELOG.md",
        "Documentation": "https://python-gaitalytics.readthedocs.io",
        "Homepage": "https://github.com/DART-Lab-LLUI/python-gaitalytics",
        "Issues": "https://github.com/DART-Lab-LLUI/python-gaitalytics/issues",
        "Repository": "https://github.com/DART-Lab-LLUI/python-gaitalytics"
    },
    "split_keywords": [
        "gait-analysis",
        " mocap",
        " c3d",
        " gait-metrics",
        " biomechanics"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "42c3d844cd387586c71fd15c3e2ecb1ba48c446bd8131d5ee02af96b469b4722",
                "md5": "5e69cca9f4db65eb838794a1e5b80ab0",
                "sha256": "e45698fd0a29e455b7a00255299da591d219744d6a6600e426d7674f4cc8021e"
            },
            "downloads": -1,
            "filename": "gaitalytics-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e69cca9f4db65eb838794a1e5b80ab0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 31945,
            "upload_time": "2025-02-07T10:41:50",
            "upload_time_iso_8601": "2025-02-07T10:41:50.910179Z",
            "url": "https://files.pythonhosted.org/packages/42/c3/d844cd387586c71fd15c3e2ecb1ba48c446bd8131d5ee02af96b469b4722/gaitalytics-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "60c60fa57b48facab7ca500827da4d136814640c78d967f5ccac9c614916aca9",
                "md5": "027da33923494a4b12b79b4be381e63c",
                "sha256": "02fa69ade972c3d94c29796a090da7aa052d911d704184e732045c27f8a9409d"
            },
            "downloads": -1,
            "filename": "gaitalytics-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "027da33923494a4b12b79b4be381e63c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 5678756,
            "upload_time": "2025-02-07T10:41:52",
            "upload_time_iso_8601": "2025-02-07T10:41:52.679343Z",
            "url": "https://files.pythonhosted.org/packages/60/c6/0fa57b48facab7ca500827da4d136814640c78d967f5ccac9c614916aca9/gaitalytics-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-07 10:41:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "me",
    "github_project": "spam",
    "github_not_found": true,
    "lcname": "gaitalytics"
}
        
Elapsed time: 0.45732s