{ "info": { "author": "Merlin Neurotech", "author_email": "mnc@clubs.queensu.ca", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Human Machine Interfaces", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Visualization" ], "description": "\n# WizardHat\n![logo](https://github.com/merlin-neurotech/WizardHat/blob/master/WizardHatLogoSmall.jpg)\n\nWizardHat is a library for handling, transforming, and visualizing EEG data streamed from consumer-grade devices over the Lab Streaming Layer (LSL) protocol. WizardHat's purpose is to enable users to easily and flexibly build brain-computer interfaces (BCIs) using a high-level API, with technical details managed in the background. Paired with ble2lsl, WizardHat currently supports streaming from the Muse (2016) brain-sensing headband and the OpenBCI Ganglion. WizardHat is easy to use and only requires three lines of code to get started.\n\nWizardHat was built by Merlin Neurotech at Queen's University.\n\n## Note : Active Development\nOur dedicated team at Merlin Neurotech is continously working to improve WizardHat and add new functionality.\nCurrent on-going projects:\n- MNE Library Compatibility\n- Implementing simple filters\n\nCheck back soon if the feature you are looking for is under development!\n\n## Getting Started\n\nThe procedure for installing WizardHat depends on whether or not you will be contributing to its development. In either case, begin by creating and activating a new Python virtual environment.\n\n### Installing for use only\nSimply run\n\n\tpip install wizardhat\n\nThis will automatically install the most recent release of WizardHat along with the required dependencies, including ble2lsl.\n\n### Installing for development\nTo set up WizardHat for development, begin by forking the repository on GitHub, then clone your fork:\n\n\tgit clone https://github.com//WizardHat.git\n\nIf you are also developing for ble2lsl, fork and then clone the ble2lsl repository as well, and install its dependencies:\n\n\tgit clone https://github.com//ble2lsl.git\n\tcd ble2lsl\n\tpip install -e .\n\tcd ..\n\nWhether or not you cloned ble2lsl, install the remaining dependencies for WizardHat:\n\n cd WizardHat\n\tpip install -e .\n\nThe last command creates an editable install of WizardHat; i.e. after installation into an active virtual environment, running `import wizardhat` in any Python terminal/script will import the current (i.e. working) version of the modules from your fork's folder. \n\n### Finally\nTo ensure a bug free experience, open [your virtual env name]/lib/python3.6/site packages/pygatt/backends/bgapi/bgapi.py in a text or code editor and add:\n\n\ttime.sleep(0.25)\n\nbetween line 200 and 201 and save the file. This ensures that the Bluetooth protocol will be given adequate time to connect to the Muse before timing out.\n\nNow you are ready to use WizardHat!\n\n## Working with WizardHat\n\nOur library provides two options when building, debugging, or testing your BCI code:\n\n1) Streaming data from Muse or other EEG device\n2) Streaming randomly generated data for testing and debugging\n\nTo begin streaming, you will need first to import `ble2lsl` and `wizardhat.acquire` into your Python workspace. The BLE device parameters for different devices are stored in respective modules in `ble2lsl.devices`.\n\n\timport ble2lsl\n\tfrom ble2lsl.devices import muse2016\n\tfrom wizardhat import acquire\n\nYou then need to create a streaming outlet which establishes a Bluetooth connection with the EEG device:\n\n\tstreamer = ble2lsl.Streamer(muse2016)\n\nTo stream dummy data through an outlet that mimics (number of channels, sample rate, and metadata) the Muse 2016:\n\n\tdummy_streamer = ble2lsl.Dummy(muse2016)\n\nNext, to store and record the data, add the following line to capture the outlet stream:\n\n\treceiver = acquire.Receiver()\n\nNotice how you do not need to pass the outlet streamer as an argument to this function. LSL can stream over a local network, and `ble2lsl` doesn't need to run in the same process as `wizardhat`. Instead, `Receiver` automatically finds and connects to the LSL outlet; if multiple outlets are available, it will prompt you to choose from a list.\n\nNow that your streamer is receiving data, you can visualize and manipulate it online. Data is streamed into structured arrays with timestamps in their first columns and channel data in their remaining columns. By default, these arrays contain the last 10 s (to the nearest sample) of streamed data, and are accessed through the `streamer.buffers` dictionary. For example, the structured array of most recent timestamps and samples for the Muse 2016's EEG stream (labeled \"EEG\") is accessed by:\n\n\tstreamer.buffers[\"EEG\"].data\n\nThe available streams depend on the device, and are specified in the device's module in `ble2lsl.devices`. For example, the Muse 2016 headband provides the following stream types: \"EEG\", \"accelerometer\", \"gyroscope\", \"telemetry\", and \"status\". After each time window, data is saved to a CSV file in your directory under a folder called 'data' and is constantly updated while your stream is running. Each data buffer has an associated CSV file, accompanied by a JSON file of the same name providing metadata.\n\nTo gain a deeper understanding into how our framework operates, take a look under the hood.\n\n## Acknowledgements\nThis project was inspired by Alexander Barachant's [muse-lsl](https://github.com/alexandrebarachant/muse-lsl) from which some of the modules were originally based. The device specification for the OpenBCI Ganglion is largely derived from [OpenBCI_Python](https://github.com/OpenBCI/OpenBCI_Python).\n\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/merlin-neurotech/WizardHat", "keywords": "", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "WizardHat", "package_url": "https://pypi.org/project/WizardHat/", "platform": "", "project_url": "https://pypi.org/project/WizardHat/", "project_urls": { "Homepage": "https://github.com/merlin-neurotech/WizardHat" }, "release_url": "https://pypi.org/project/WizardHat/0.2.1/", "requires_dist": [ "ble2lsl (==0.1.3)", "matplotlib (>=2.2.0)", "mne (>=0.15.2)", "numpy (>=1.13.0)", "pylsl (>=1.10.5)", "scipy (>=1.0.0)", "bokeh (>=0.13.0)" ], "requires_python": ">=3.6.0", "summary": "Real-time processing and plotting of data streamed over LSL, with a focus on student-led BCI projects.", "version": "0.2.1" }, "last_serial": 4504777, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "77faa6ee79d2ea04ff05a9634126f4f6", "sha256": "b08c157de65864a878158a66720b58b7277b3e0815c40eacd1ea6e9b58a879fb" }, "downloads": -1, "filename": "WizardHat-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "77faa6ee79d2ea04ff05a9634126f4f6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5.0", "size": 36287, "upload_time": "2018-10-09T18:53:08", "url": "https://files.pythonhosted.org/packages/5c/77/dd78739a7dfba4f6f6b3ecf7359e16636ce75fd290cbb0aaab5fafbeaf51/WizardHat-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7dc23a67b99d370c1e095a978b8a0b1", "sha256": "1e671b53507a6aab60ea6100ac9a3427ae4217c37312e1293341cb807c4c5f39" }, "downloads": -1, "filename": "WizardHat-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e7dc23a67b99d370c1e095a978b8a0b1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 30194, "upload_time": "2018-10-09T18:53:09", "url": "https://files.pythonhosted.org/packages/55/81/549c9ec6450df0708c8fae4492c700c819ce380ff65db99975464aa7eec6/WizardHat-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "87db9e63288b35c30690e7934c96d2a2", "sha256": "0d266c1eb2e5ba6d59a6235cbfbc1c683fb0d013654adf1e41513453bc76f3d5" }, "downloads": -1, "filename": "WizardHat-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "87db9e63288b35c30690e7934c96d2a2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 25188, "upload_time": "2018-11-19T22:13:22", "url": "https://files.pythonhosted.org/packages/5c/6f/c0f34bfc3b29fc2b5f2c2b8a26e4ee0562e586fa63f968de6db9fba1bacf/WizardHat-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "230067e9aa10e5536fdd2200c0ed22bb", "sha256": "508c7c8e8e171c3f09ea7b2451de2eeb847aea91bcec4a11d2a21b7c4a012bed" }, "downloads": -1, "filename": "WizardHat-0.2.1.tar.gz", "has_sig": false, "md5_digest": "230067e9aa10e5536fdd2200c0ed22bb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 24495, "upload_time": "2018-11-19T22:13:23", "url": "https://files.pythonhosted.org/packages/b1/b5/0fdffa10d2fe7b054c2f41266479191b70be68cc8643badd4294353281f2/WizardHat-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "87db9e63288b35c30690e7934c96d2a2", "sha256": "0d266c1eb2e5ba6d59a6235cbfbc1c683fb0d013654adf1e41513453bc76f3d5" }, "downloads": -1, "filename": "WizardHat-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "87db9e63288b35c30690e7934c96d2a2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 25188, "upload_time": "2018-11-19T22:13:22", "url": "https://files.pythonhosted.org/packages/5c/6f/c0f34bfc3b29fc2b5f2c2b8a26e4ee0562e586fa63f968de6db9fba1bacf/WizardHat-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "230067e9aa10e5536fdd2200c0ed22bb", "sha256": "508c7c8e8e171c3f09ea7b2451de2eeb847aea91bcec4a11d2a21b7c4a012bed" }, "downloads": -1, "filename": "WizardHat-0.2.1.tar.gz", "has_sig": false, "md5_digest": "230067e9aa10e5536fdd2200c0ed22bb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 24495, "upload_time": "2018-11-19T22:13:23", "url": "https://files.pythonhosted.org/packages/b1/b5/0fdffa10d2fe7b054c2f41266479191b70be68cc8643badd4294353281f2/WizardHat-0.2.1.tar.gz" } ] }