{ "info": { "author": "Marko Seslija", "author_email": "marko.seslija@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "# TiltX\n\n#### Feature extraction from mobile phone motion sensor data\n\nThis repository implements a method which extracts some of the key features from mobile phone motion sensor data.\n\nAt `t=0` a visual stimulus appears on the screen. As the response, a participant (person holding the phone) is required to tilt the phone in a specific direction (left, right, up, or down). Once the roll or picth angle reaches 0.5 radians (`t=T>0`), the movement is completed. `T` is the event time registered by the app. The rotaion along the third axis (yaw) *does not* affect the outcome of the task, hence it is neglected.\n\nThe features extracted by TiltX are: reaction time, L1 norms, maximal deviation, number of turning points, and sample entropy.\n\n## Usage\nThese steps introduce how to use `TiltX`.\n\n### Input data\nThe `DataGenerator` is a utility class that generates sample datasets. \n\n```python\nfrom tiltx.data_generator import DataGenerator\nt, alpha, beta = DataGenerator.example(1)\n```\n> Note: `t`, `alpha`, and `beta` need to be equal length arrays.\n\n### Extract features\nThe `FeatureExtractor` extracts key features from the data.\n```python\nfrom tiltx.feature_extractor import FeatureExtractor\nfeatures = FeatureExtractor(t,alpha,beta,RT_method='cumsum',correct='up')\n```\n> Note: `cumsum` is a method for reaction time detection and `correct` is the direction in which the phone should be tilted in order to successfully complete the task.\n\n```python\nprint('Reaction time: %.3f'%(features.RT))\nprint('L1-norm of the triggering axis: %.3f'%(features.L1_x))\nprint('L1-norm of the remaining (non-triggering) axis: %.3f'%(features.L1_y))\n\nReaction time: 0.669\nL1-norm of the triggering axis: 0.492\nL1-norm of the remaining (non-triggering) axis: 0.006\n```\n### Visualize\nBy calling `plot()` function in `FeatureExtractor`, we plot the roll and pitch angles from the moment the stimulus appears till the moment when the app registers the move as completed.\n\n```python\nfeatures.plot()\n```\n![](figures/figure_1.png)\n\n- `x` is a triggering angle (the one which reaches 0.5 radians first)\n- `y` is the remaining (non-triggering) angle\n- the shaded regions are proportional to L1 norms\n- the black dotted line marks the begining of the reaction\n\n### Documentation\nFor a tutorial and a brief note on signal features, check out [the notebooks folder](/notebooks).\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/marses/tiltx", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "tiltx", "package_url": "https://pypi.org/project/tiltx/", "platform": "", "project_url": "https://pypi.org/project/tiltx/", "project_urls": { "Homepage": "https://github.com/marses/tiltx" }, "release_url": "https://pypi.org/project/tiltx/0.0.1/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Feature extraction from mobile phone motion sensor data", "version": "0.0.1" }, "last_serial": 5911361, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b6fe2e8c17760549b3422279425800bb", "sha256": "5de6fee71444bd229fd4aca5b20c7f76cbbb2acd41bb28d9458e2ad09dbdc7b8" }, "downloads": -1, "filename": "tiltx-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b6fe2e8c17760549b3422279425800bb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 10203, "upload_time": "2019-10-01T09:38:56", "url": "https://files.pythonhosted.org/packages/39/8a/ca36487f44e61193a3120d2993380d3935629c82e32732d3ad5f7531baa2/tiltx-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5848bbd14e496563b0d165233fd25ee2", "sha256": "8b9555560f1c76b2528b45b3c9df9ba3802ac4dbc43bb3993cfe1824d1b04f19" }, "downloads": -1, "filename": "tiltx-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5848bbd14e496563b0d165233fd25ee2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8341, "upload_time": "2019-10-01T09:39:00", "url": "https://files.pythonhosted.org/packages/01/5b/be2eaaf89eb315760624976b29e5c9f1c99e23aaf939713962845460aba9/tiltx-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6fe2e8c17760549b3422279425800bb", "sha256": "5de6fee71444bd229fd4aca5b20c7f76cbbb2acd41bb28d9458e2ad09dbdc7b8" }, "downloads": -1, "filename": "tiltx-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b6fe2e8c17760549b3422279425800bb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 10203, "upload_time": "2019-10-01T09:38:56", "url": "https://files.pythonhosted.org/packages/39/8a/ca36487f44e61193a3120d2993380d3935629c82e32732d3ad5f7531baa2/tiltx-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5848bbd14e496563b0d165233fd25ee2", "sha256": "8b9555560f1c76b2528b45b3c9df9ba3802ac4dbc43bb3993cfe1824d1b04f19" }, "downloads": -1, "filename": "tiltx-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5848bbd14e496563b0d165233fd25ee2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8341, "upload_time": "2019-10-01T09:39:00", "url": "https://files.pythonhosted.org/packages/01/5b/be2eaaf89eb315760624976b29e5c9f1c99e23aaf939713962845460aba9/tiltx-0.0.1.tar.gz" } ] }