explorepy 4.1.0__tar.gz → 4.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. {explorepy-4.1.0 → explorepy-4.2.0}/.bumpversion.cfg +1 -1
  2. {explorepy-4.1.0 → explorepy-4.2.0}/CHANGELOG.rst +9 -0
  3. {explorepy-4.1.0 → explorepy-4.2.0}/PKG-INFO +9 -23
  4. {explorepy-4.1.0 → explorepy-4.2.0}/README.rst +8 -22
  5. {explorepy-4.1.0 → explorepy-4.2.0}/docs/conf.py +1 -1
  6. {explorepy-4.1.0 → explorepy-4.2.0}/docs/installation.rst +4 -17
  7. {explorepy-4.1.0 → explorepy-4.2.0}/docs/requirements.txt +1 -1
  8. {explorepy-4.1.0 → explorepy-4.2.0}/docs/usage.rst +0 -32
  9. {explorepy-4.1.0 → explorepy-4.2.0}/pyproject.toml +1 -1
  10. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/__init__.py +1 -1
  11. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/cli.py +0 -43
  12. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/command.py +0 -43
  13. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/explore.py +0 -71
  14. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/serial_client.py +1 -2
  15. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/stream_processor.py +1 -20
  16. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/tools.py +20 -217
  17. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy.egg-info/PKG-INFO +9 -23
  18. {explorepy-4.1.0 → explorepy-4.2.0}/.cookiecutterrc +0 -0
  19. {explorepy-4.1.0 → explorepy-4.2.0}/.coveragerc +0 -0
  20. {explorepy-4.1.0 → explorepy-4.2.0}/.editorconfig +0 -0
  21. {explorepy-4.1.0 → explorepy-4.2.0}/AUTHORS.rst +0 -0
  22. {explorepy-4.1.0 → explorepy-4.2.0}/CONTRIBUTING.rst +0 -0
  23. {explorepy-4.1.0 → explorepy-4.2.0}/LICENSE +0 -0
  24. {explorepy-4.1.0 → explorepy-4.2.0}/MANIFEST.in +0 -0
  25. {explorepy-4.1.0 → explorepy-4.2.0}/docs/authors.rst +0 -0
  26. {explorepy-4.1.0 → explorepy-4.2.0}/docs/changelog.rst +0 -0
  27. {explorepy-4.1.0 → explorepy-4.2.0}/docs/contributing.rst +0 -0
  28. {explorepy-4.1.0 → explorepy-4.2.0}/docs/explore_legacy_devices.rst +0 -0
  29. {explorepy-4.1.0 → explorepy-4.2.0}/docs/index.rst +0 -0
  30. {explorepy-4.1.0 → explorepy-4.2.0}/docs/logo.jpg +0 -0
  31. {explorepy-4.1.0 → explorepy-4.2.0}/docs/readme.rst +0 -0
  32. {explorepy-4.1.0 → explorepy-4.2.0}/docs/reference/explorepy.rst +0 -0
  33. {explorepy-4.1.0 → explorepy-4.2.0}/docs/reference/index.rst +0 -0
  34. {explorepy-4.1.0 → explorepy-4.2.0}/docs/spelling_wordlist.txt +0 -0
  35. {explorepy-4.1.0 → explorepy-4.2.0}/setup.cfg +0 -0
  36. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/BLEClient.py +0 -0
  37. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/BTClient.py +0 -0
  38. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/_exceptions.py +0 -0
  39. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/bt_mock_client.py +0 -0
  40. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/bt_mock_server.py +0 -0
  41. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/debug.py +0 -0
  42. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/filters.py +0 -0
  43. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/log_config.py +0 -0
  44. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/packet.py +0 -0
  45. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/parser.py +0 -0
  46. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy/settings_manager.py +0 -0
  47. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy.egg-info/SOURCES.txt +0 -0
  48. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy.egg-info/dependency_links.txt +0 -0
  49. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy.egg-info/entry_points.txt +0 -0
  50. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy.egg-info/requires.txt +0 -0
  51. {explorepy-4.1.0 → explorepy-4.2.0}/src/explorepy.egg-info/top_level.txt +0 -0
  52. {explorepy-4.1.0 → explorepy-4.2.0}/tests/README.md +0 -0
  53. {explorepy-4.1.0 → explorepy-4.2.0}/tests/__init__.py +0 -0
  54. {explorepy-4.1.0 → explorepy-4.2.0}/tests/conftest.py +0 -0
  55. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/calibration_info +0 -0
  56. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/calibration_info_usbc +0 -0
  57. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/cmd_rcv +0 -0
  58. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/cmd_stat +0 -0
  59. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/device_info +0 -0
  60. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/device_info_ble +0 -0
  61. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/device_info_v2 +0 -0
  62. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/device_info_v2_2 +0 -0
  63. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/disconnect +0 -0
  64. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/eeg16_ble +0 -0
  65. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/eeg32 +0 -0
  66. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/eeg94 +0 -0
  67. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/eeg98 +0 -0
  68. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/eeg98_ble +0 -0
  69. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/eeg98_usbc +0 -0
  70. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/eeg98_usbc_2 +0 -0
  71. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/env +0 -0
  72. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/orn +0 -0
  73. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/orn_2 +0 -0
  74. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/orn_matrix.txt +0 -0
  75. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/push_marker +0 -0
  76. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/in/trigger_in +0 -0
  77. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/axis_and_angle.txt +0 -0
  78. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/calibration_info_out.txt +0 -0
  79. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/calibration_info_usbc_out.txt +0 -0
  80. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/cmd_rcv_out.txt +0 -0
  81. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/cmd_stat_out.txt +0 -0
  82. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/device_info_ble_out.txt +0 -0
  83. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/device_info_out.txt +0 -0
  84. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/device_info_v2_2_out.txt +0 -0
  85. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/device_info_v2_out.txt +0 -0
  86. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/disconnect_out.txt +0 -0
  87. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/eeg16_ble_out.txt +0 -0
  88. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/eeg32_out.txt +0 -0
  89. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/eeg94_out.txt +0 -0
  90. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/eeg98_ble_out.txt +0 -0
  91. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/eeg98_out.txt +0 -0
  92. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/eeg98_out_fake.txt +0 -0
  93. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/eeg98_usbc_out.txt +0 -0
  94. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/eeg98_usbc_out_2.txt +0 -0
  95. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/env_out.txt +0 -0
  96. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/orn_2_out.txt +0 -0
  97. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/orn_out.txt +0 -0
  98. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/push_marker_out.txt +0 -0
  99. {explorepy-4.1.0 → explorepy-4.2.0}/tests/res/out/trigger_in_out.txt +0 -0
  100. {explorepy-4.1.0 → explorepy-4.2.0}/tests/test_packet.py +0 -0
  101. {explorepy-4.1.0 → explorepy-4.2.0}/tox.ini +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.1.0
2
+ current_version = 4.2.0
3
3
  commit = False
4
4
  tag = False
5
5
 
@@ -2,6 +2,15 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ 4.2.0 (15.7.2025)
6
+ ------------------
7
+ * Add ExplorePy and Arduino interfacing example
8
+ * Add fieldtrip integration example
9
+ * Add live exg and impedance acquisition example
10
+ * Update MNE integration
11
+ * Remove deprecated functions
12
+ * Update documentation
13
+
5
14
  4.1.0 (31.3.2025)
6
15
  ------------------
7
16
  * Improve bluetooth connection UX
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: explorepy
3
- Version: 4.1.0
3
+ Version: 4.2.0
4
4
  Author-email: MentaLab Hub <support@mentab.org>
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/Mentalab-hub/explorepy
@@ -43,7 +43,7 @@ Requires-Dist: flake8==4.0.1; extra == "test"
43
43
  Requires-Dist: isort==5.10.1; extra == "test"
44
44
  Dynamic: license-file
45
45
 
46
- .. image:: logo.png
46
+ .. image:: https://raw.githubusercontent.com/Mentalab-hub/explorepy/master/docs/logo.jpg
47
47
  :scale: 100 %
48
48
  :align: left
49
49
 
@@ -62,9 +62,9 @@ Dynamic: license-file
62
62
  :target: https://pypi.org/project/explorepy
63
63
 
64
64
 
65
- .. |commits-since| image:: https://img.shields.io/github/commits-since/Mentalab-hub/explorepy/v4.1.0.svg
65
+ .. |commits-since| image:: https://img.shields.io/github/commits-since/Mentalab-hub/explorepy/v4.2.0.svg
66
66
  :alt: Commits since latest release
67
- :target: https://github.com/Mentalab-hub/explorepy/compare/v4.1.0...master
67
+ :target: https://github.com/Mentalab-hub/explorepy/compare/v4.2.0...master
68
68
 
69
69
 
70
70
  .. |wheel| image:: https://img.shields.io/pypi/wheel/explorepy.svg
@@ -82,6 +82,7 @@ Dynamic: license-file
82
82
 
83
83
  .. end-badges
84
84
 
85
+
85
86
  =========================
86
87
  ``explorepy`` overview
87
88
  =========================
@@ -89,18 +90,11 @@ Dynamic: license-file
89
90
  ``explorepy`` is an open-source Python API designed to collect and process ExG data using Mentalab's Explore device. Amongst other things, ``explorepy`` provides the following features:
90
91
 
91
92
  * Real-time streaming of ExG, orientation and environmental data.
92
- * Real-time visualization of ExG, orientation and environmental data.
93
93
  * Data recording in CSV and BDF+ formats.
94
94
  * Integration with LabStreaming Layer.
95
95
  * Electrode impedance measurements.
96
96
  * Explore device configuration.
97
97
 
98
- Quick installation
99
- ==================
100
- For Windows users, the best way to install ``explorepy`` is to download the latest ``explorepy`` version from the `release page <https://github.com/Mentalab-hub/explorepy/releases>`_. Please note that dependencies will install automatically from the release page.
101
-
102
- For other operating systems, or to build the package manually on Windows, please refer to the information below.
103
-
104
98
 
105
99
  Requirements
106
100
  ------------
@@ -121,7 +115,7 @@ To install ``explorepy`` from PyPI run:
121
115
  To install the latest development version (git must be installed before running this command):
122
116
  ::
123
117
 
124
- pip install git+https://github.com/Mentalab-hub/explorepy
118
+ pip install git+https://github.com/Mentalab-hub/explorepy.git@develop
125
119
 
126
120
 
127
121
  Get started
@@ -147,17 +141,9 @@ In Python you can connect to the Explore device and print data using:
147
141
 
148
142
  import explorepy
149
143
  explorer = explorepy.Explore()
150
- explorer.connect(device_name="Explore_XXXX") # Put your device Bluetooth name
144
+ explorer.connect(device_name="Explore_XXXX") # Use correct device ID here
151
145
  explorer.acquire()
152
146
 
153
- You can also visualize the data in real-time.
154
-
155
- ::
156
-
157
- import explorepy
158
- explorer = explorepy.Explore()
159
- explorer.connect(device_name="Explore_XXXX") # Put your device Bluetooth name
160
-
161
147
  Documentation
162
148
  =============
163
149
 
@@ -185,7 +171,7 @@ Authors
185
171
  - `Sonja Stefani`_
186
172
  - `Alex Platt`_
187
173
  - `Andreas Gutsche`_
188
- - `Masooma Fazelian`_
174
+ - `Masoome Fazelian`_
189
175
  - `Philipp Jakovleski`_
190
176
  - `Florian Sesser`_
191
177
  - `Sebastian Herberger`_
@@ -197,7 +183,7 @@ Authors
197
183
  .. _Sonja Stefani: https://github.com/SonjaSt
198
184
  .. _Alex Platt: https://github.com/Nujanauss
199
185
  .. _Andreas Gutsche: https://github.com/andyman410
200
- .. _Masooma Fazelian: https://github.com/fazelian
186
+ .. _Masoome Fazelian: https://github.com/fazelian
201
187
  .. _Philipp Jakovleski: https://github.com/philippjak
202
188
  .. _Florian Sesser : https://github.com/hacklschorsch
203
189
  .. _Sebastian Herberger: https://github.com/SHerberger
@@ -1,4 +1,4 @@
1
- .. image:: logo.png
1
+ .. image:: https://raw.githubusercontent.com/Mentalab-hub/explorepy/master/docs/logo.jpg
2
2
  :scale: 100 %
3
3
  :align: left
4
4
 
@@ -17,9 +17,9 @@
17
17
  :target: https://pypi.org/project/explorepy
18
18
 
19
19
 
20
- .. |commits-since| image:: https://img.shields.io/github/commits-since/Mentalab-hub/explorepy/v4.1.0.svg
20
+ .. |commits-since| image:: https://img.shields.io/github/commits-since/Mentalab-hub/explorepy/v4.2.0.svg
21
21
  :alt: Commits since latest release
22
- :target: https://github.com/Mentalab-hub/explorepy/compare/v4.1.0...master
22
+ :target: https://github.com/Mentalab-hub/explorepy/compare/v4.2.0...master
23
23
 
24
24
 
25
25
  .. |wheel| image:: https://img.shields.io/pypi/wheel/explorepy.svg
@@ -37,6 +37,7 @@
37
37
 
38
38
  .. end-badges
39
39
 
40
+
40
41
  =========================
41
42
  ``explorepy`` overview
42
43
  =========================
@@ -44,18 +45,11 @@
44
45
  ``explorepy`` is an open-source Python API designed to collect and process ExG data using Mentalab's Explore device. Amongst other things, ``explorepy`` provides the following features:
45
46
 
46
47
  * Real-time streaming of ExG, orientation and environmental data.
47
- * Real-time visualization of ExG, orientation and environmental data.
48
48
  * Data recording in CSV and BDF+ formats.
49
49
  * Integration with LabStreaming Layer.
50
50
  * Electrode impedance measurements.
51
51
  * Explore device configuration.
52
52
 
53
- Quick installation
54
- ==================
55
- For Windows users, the best way to install ``explorepy`` is to download the latest ``explorepy`` version from the `release page <https://github.com/Mentalab-hub/explorepy/releases>`_. Please note that dependencies will install automatically from the release page.
56
-
57
- For other operating systems, or to build the package manually on Windows, please refer to the information below.
58
-
59
53
 
60
54
  Requirements
61
55
  ------------
@@ -76,7 +70,7 @@ To install ``explorepy`` from PyPI run:
76
70
  To install the latest development version (git must be installed before running this command):
77
71
  ::
78
72
 
79
- pip install git+https://github.com/Mentalab-hub/explorepy
73
+ pip install git+https://github.com/Mentalab-hub/explorepy.git@develop
80
74
 
81
75
 
82
76
  Get started
@@ -102,17 +96,9 @@ In Python you can connect to the Explore device and print data using:
102
96
 
103
97
  import explorepy
104
98
  explorer = explorepy.Explore()
105
- explorer.connect(device_name="Explore_XXXX") # Put your device Bluetooth name
99
+ explorer.connect(device_name="Explore_XXXX") # Use correct device ID here
106
100
  explorer.acquire()
107
101
 
108
- You can also visualize the data in real-time.
109
-
110
- ::
111
-
112
- import explorepy
113
- explorer = explorepy.Explore()
114
- explorer.connect(device_name="Explore_XXXX") # Put your device Bluetooth name
115
-
116
102
  Documentation
117
103
  =============
118
104
 
@@ -140,7 +126,7 @@ Authors
140
126
  - `Sonja Stefani`_
141
127
  - `Alex Platt`_
142
128
  - `Andreas Gutsche`_
143
- - `Masooma Fazelian`_
129
+ - `Masoome Fazelian`_
144
130
  - `Philipp Jakovleski`_
145
131
  - `Florian Sesser`_
146
132
  - `Sebastian Herberger`_
@@ -152,7 +138,7 @@ Authors
152
138
  .. _Sonja Stefani: https://github.com/SonjaSt
153
139
  .. _Alex Platt: https://github.com/Nujanauss
154
140
  .. _Andreas Gutsche: https://github.com/andyman410
155
- .. _Masooma Fazelian: https://github.com/fazelian
141
+ .. _Masoome Fazelian: https://github.com/fazelian
156
142
  .. _Philipp Jakovleski: https://github.com/philippjak
157
143
  .. _Florian Sesser : https://github.com/hacklschorsch
158
144
  .. _Sebastian Herberger: https://github.com/SHerberger
@@ -28,7 +28,7 @@ project = 'explorepy'
28
28
  year = '2018-2025'
29
29
  author = 'Mentalab GmbH.'
30
30
  copyright = '{0}, {1}'.format(year, author)
31
- version = release = '4.1.0'
31
+ version = release = '4.2.0'
32
32
  pygments_style = 'trac'
33
33
  templates_path = ['.']
34
34
  extlinks = {
@@ -19,25 +19,12 @@ Recommended Requirements
19
19
  How to install
20
20
  --------------
21
21
 
22
- Option 1: Installing via installer file (basic)
23
- """""""""""""""""""""""""""""""""""""""""""""""
24
-
25
- Windows and Mac
26
- ^^^^^^^^^^^^^^^
27
-
28
- *This option is best for users who only intend to use functionalities offered by* ``explorepy`` *via a graphical user interface*
29
-
30
- For example, if you want to quickly visualize and record data and don't need the command line interface or to use it in your own Python script, use this option.
31
-
32
- If you intend to call ``explorepy`` from the command line or a Python script (e.g. from an experiment script), install ``explorepy`` via Anaconda/pip instead.
33
-
34
- For Windows and Mac, the standalone desktop software ExploreDesktop can be installed using the installer files uploaded to the
35
- `release page <https://github.com/Mentalab-hub/explore-desktop-release/releases/latest/>`_. Please note that the dependencies will be installed automatically and bundled locally with the installed software.
36
-
37
-
38
- Option 2: Installing from Python Package Index (PyPI) and pip (advanced)
22
+ Installing from Python Package Index (PyPI)
39
23
  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
40
24
 
25
+ .. note::
26
+ For Windows, Mac and Linux the standalone desktop software ExploreDesktop can be installed using the installer files uploaded to the
27
+ `release page <https://github.com/Mentalab-hub/explore-desktop-release/releases/latest/>`_.
41
28
 
42
29
  .. note::
43
30
 
@@ -8,7 +8,7 @@ pylsl==1.16.1
8
8
  PyYAML==6.0.1
9
9
  PyYAML==6.0.1
10
10
  scipy==1.11.1
11
- tornado==6.4.2
11
+ tornado==6.5.1
12
12
  sentry_sdk==2.8.0
13
13
  sphinx-rtd-theme==1.3.0
14
14
  sphinx==7.2.4
@@ -27,14 +27,6 @@ For example to get help about the visualize command, run: ``explorepy push2lsl -
27
27
  Available Commands
28
28
  """"""""""""""""""
29
29
 
30
- find-device
31
- %%%%
32
- Scans for nearby Mentalab Explore devices. Prints out the Name and MAC address of found devices.
33
-
34
- Options:
35
- -h, --help Show this message and exit.
36
-
37
-
38
30
  acquire
39
31
  %%%%
40
32
  Connects to a device with selected name or address. Only one input is necessary.
@@ -135,18 +127,6 @@ Example (overwrite):
135
127
  ::
136
128
  explorepy bin2edf -f input_file.BIN -ow
137
129
 
138
- calibrate-orn
139
- %%%%
140
-
141
- Calibrates the orientation module of a device. This module stores calibration parameters in ``explorepy``'s configuration file. Once calibrated, ``explorepy`` computes the device's orientation (degree and rotation axis).
142
- ::
143
-
144
- Options:
145
- -a, --address TEXT Explore device's MAC address
146
- -n, --name TEXT Name of the device
147
- -ow, --overwrite Overwrite existing file
148
- -h, --help Show this message and exit.
149
-
150
130
 
151
131
  format-memory
152
132
  %%%%
@@ -181,18 +161,6 @@ Example:
181
161
  ::
182
162
  explorepy set-sampling-rate -n Explore_XXXX -sr 500
183
163
 
184
- disable-module
185
- %%%%
186
-
187
- Disables a device module (orientation, environment and ExG).
188
- ::
189
-
190
- Options:
191
- -a, --address TEXT Explore device's MAC address
192
- -n, --name TEXT Name of the device
193
- -m, --module TEXT Module name to be disabled, options: ORN, ENV, EXG
194
- [required]
195
-
196
164
 
197
165
  soft-reset
198
166
  %%%%
@@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'
4
4
 
5
5
  [project]
6
6
  name = 'explorepy'
7
- version = "4.1.0"
7
+ version = "4.2.0"
8
8
  license = { text = "MIT" }
9
9
  readme = { file = "README.rst", content-type = "text/markdown" }
10
10
  authors = [
@@ -20,7 +20,7 @@ from .explore import Explore # noqa
20
20
 
21
21
 
22
22
  __all__ = ["Explore", "command", "tools", "log_config"]
23
- __version__ = '4.1.0'
23
+ __version__ = '4.2.0'
24
24
 
25
25
  this = sys.modules[__name__]
26
26
  # TODO appropriate library
@@ -56,13 +56,6 @@ def verify_inputs(func):
56
56
  return update_wrapper(wrapper, func)
57
57
 
58
58
 
59
- @cli.command()
60
- def find_device():
61
- """List available Explore devices"""
62
- explorepy.set_bt_interface(default_bt_backend)
63
- explorepy.tools.run_ble_scanner()
64
-
65
-
66
59
  @cli.command()
67
60
  @click.option("--address", "-a", type=str, help="Explore device's MAC address")
68
61
  @click.option("--name", "-n", type=str, help="Name of the device")
@@ -174,39 +167,3 @@ def set_channels(address, name, channel_mask):
174
167
  explore = explorepy.explore.Explore()
175
168
  explore.connect(mac_address=address, device_name=name)
176
169
  explore.set_channels(channel_mask)
177
-
178
-
179
- @cli.command()
180
- @click.option("--address", "-a", type=str, help="Explore device's MAC address")
181
- @click.option("--name", "-n", type=str, help="Name of the device")
182
- @click.option("-m", "--module", required=True, type=str, help="Module name to be disabled, options: ORN, ENV, EXG")
183
- @verify_inputs
184
- def disable_module(address, name, module):
185
- """Disable a module of Explore device"""
186
- explore = explorepy.explore.Explore()
187
- explore.connect(mac_address=address, device_name=name)
188
- explore.disable_module(module)
189
-
190
-
191
- @cli.command()
192
- @click.option("--address", "-a", type=str, help="Explore device's MAC address")
193
- @click.option("--name", "-n", type=str, help="Name of the device")
194
- @click.option("-m", "--module", required=True, type=str, help="Module name to be enabled, options: ORN, ENV, EXG")
195
- @verify_inputs
196
- def enable_module(address, name, module):
197
- """Enable a module of Explore device"""
198
- explore = explorepy.explore.Explore()
199
- explore.connect(mac_address=address, device_name=name)
200
- explore.enable_module(module)
201
-
202
-
203
- @cli.command()
204
- @click.option("--address", "-a", type=str, help="Explore device's MAC address")
205
- @click.option("--name", "-n", type=str, help="Name of the device")
206
- @click.option("-ow", "--overwrite", is_flag=True, help="Overwrite existing file")
207
- @verify_inputs
208
- def calibrate_orn(address, name, overwrite):
209
- """Calibrate the orientation module"""
210
- explore = explorepy.explore.Explore()
211
- explore.connect(mac_address=address, device_name=name)
212
- explore.calibrate_orn(do_overwrite=overwrite)
@@ -242,49 +242,6 @@ class MemoryFormat(Command2B):
242
242
  return "Format memory command"
243
243
 
244
244
 
245
- class ModuleDisable(Command2B):
246
- """Module disable command"""
247
-
248
- def __init__(self, module_name):
249
- """
250
-
251
- Args:
252
- module_name (str): Module name to be disabled. Options: "EXG", "ORN", "ENV"
253
- """
254
- super().__init__()
255
- self.opcode = OpcodeID.CMD_MODULE_DISABLE
256
- if module_name == "ENV":
257
- self.param = b'\x01'
258
- elif module_name == "ORN":
259
- self.param = b'\x02'
260
- elif module_name == "EXG":
261
- self.param = b'\x03'
262
-
263
- def __str__(self):
264
- return "Module disable command"
265
-
266
-
267
- class ModuleEnable(Command2B):
268
- """Module enable command"""
269
-
270
- def __init__(self, module_name):
271
- """
272
- Args:
273
- module_name (str): Module name to be disabled. Options: "EXG", "ORN", "ENV"
274
- """
275
- super().__init__()
276
- self.opcode = OpcodeID.CMD_MODULE_ENABLE
277
- if module_name == "ENV":
278
- self.param = b'\x01'
279
- elif module_name == "ORN":
280
- self.param = b'\x02'
281
- elif module_name == "EXG":
282
- self.param = b'\x03'
283
-
284
- def __str__(self):
285
- return "Module enable command"
286
-
287
-
288
245
  class ZMeasurementDisable(Command2B):
289
246
  """Enables Z measurement mode"""
290
247
 
@@ -20,13 +20,10 @@ import time
20
20
  from threading import Timer
21
21
 
22
22
  import numpy as np
23
- from appdirs import user_cache_dir
24
23
 
25
24
  import explorepy
26
25
  from explorepy.command import (
27
26
  MemoryFormat,
28
- ModuleDisable,
29
- ModuleEnable,
30
27
  SetChTest,
31
28
  SetSPS,
32
29
  SoftReset
@@ -39,7 +36,6 @@ from explorepy.stream_processor import (
39
36
  )
40
37
  from explorepy.tools import (
41
38
  LslServer,
42
- PhysicalOrientation,
43
39
  check_bin_compatibility,
44
40
  create_exg_recorder,
45
41
  create_marker_recorder,
@@ -559,73 +555,6 @@ class Explore:
559
555
  SettingsManager(self.device_name).set_adc_mask(channel_mask)
560
556
  return True
561
557
 
562
- def disable_module(self, module_name):
563
- """Disable module
564
-
565
- Args:
566
- module_name (str): Module to be disabled (options: 'ENV', 'ORN', 'EXG')
567
-
568
- Examples:
569
- >>> from explorepy.explore import Explore
570
- >>> explore = Explore()
571
- >>> explore.connect(device_name='Explore_2FA2')
572
- >>> explore.disable_module('ORN')
573
-
574
- Returns:
575
- bool: True for success, False otherwise
576
- """
577
- if module_name not in ['ORN', 'ENV', 'EXG']:
578
- raise ValueError('Module name must be one of ORN, ENV or EXG.')
579
- self._check_connection()
580
- cmd = ModuleDisable(module_name)
581
- return self.stream_processor.configure_device(cmd)
582
-
583
- def enable_module(self, module_name):
584
- """Enable module
585
-
586
- Args:
587
- module_name (str): Module to be disabled (options: 'ENV', 'ORN', 'EXG')
588
-
589
- Examples:
590
- >>> from explorepy.explore import Explore
591
- >>> explore = Explore()
592
- >>> explore.connect(device_name='Explore_2FA2')
593
- >>> explore.enable_module('ORN')
594
-
595
- Returns:
596
- bool: True for success, False otherwise
597
- """
598
- if module_name not in ['ORN', 'ENV', 'EXG']:
599
- raise ValueError('Module name must be one of ORN, ENV or EXG.')
600
- self._check_connection()
601
- cmd = ModuleEnable(module_name)
602
- return self.stream_processor.configure_device(cmd)
603
-
604
- def calibrate_orn(self, do_overwrite=False):
605
- """Calibrate orientation module
606
-
607
- This method calibrates orientation sensors in order to get the real physical orientation in addition to raw
608
- sensor data. While running this function you would need to move and rotate the device. This function will store
609
- calibration info in the configuration file which will be used later during streaming to calculate physical
610
- orientation from raw sensor data.
611
-
612
- Args:
613
- do_overwrite: to overwrite the calibration data if already exists or not
614
-
615
- """
616
- assert not (PhysicalOrientation.check_calibre_data(device_name=self.device_name) and not do_overwrite), \
617
- "Calibration data already exists!"
618
- PhysicalOrientation.init_dir()
619
- logger.info("Start recording for 100 seconds, "
620
- "please move the device around during this time, in all directions")
621
- file_name = user_cache_dir(
622
- appname="explorepy", appauthor="Mentalab") + '//temp_' + self.device_name
623
- self.record_data(file_name, do_overwrite=do_overwrite,
624
- duration=100, file_type='csv')
625
- time.sleep(105)
626
- PhysicalOrientation.calibrate(
627
- cache_dir=file_name, device_name=self.device_name)
628
-
629
558
  def _activate_test_sig(self, channel_mask):
630
559
  """ Activate the internal ADS test signals
631
560
  """
@@ -134,8 +134,7 @@ class SerialStream:
134
134
  chunk.append(self.copy_buffer.popleft())
135
135
  return chunk
136
136
  except Exception as error:
137
- logger.debug('Got error or read request: {}'.format(error))
138
- print('maziar Got error or read request: {}'.format(error))
137
+ logger.debug('Got error on read request: {}'.format(error))
139
138
 
140
139
  def send(self, data):
141
140
  """Send data to the device
@@ -39,7 +39,6 @@ from explorepy.parser import Parser
39
39
  from explorepy.settings_manager import SettingsManager
40
40
  from explorepy.tools import (
41
41
  ImpedanceMeasurement,
42
- PhysicalOrientation,
43
42
  get_local_time,
44
43
  is_explore_pro_device,
45
44
  is_usb_mode
@@ -47,7 +46,7 @@ from explorepy.tools import (
47
46
 
48
47
 
49
48
  TOPICS =\
50
- Enum('Topics', 'raw_ExG filtered_ExG device_info marker raw_orn mapped_orn cmd_ack env cmd_status imp packet_bin')
49
+ Enum('Topics', 'raw_ExG filtered_ExG device_info marker raw_orn cmd_ack env cmd_status imp packet_bin')
51
50
  logger = logging.getLogger(__name__)
52
51
  lock = Lock()
53
52
 
@@ -68,7 +67,6 @@ class StreamProcessor:
68
67
  self.imp_calculator = None
69
68
  self.is_connected = False
70
69
  self._is_imp_mode = False
71
- self.physical_orn = PhysicalOrientation()
72
70
  self._last_packet_timestamp = 0
73
71
  self._last_packet_rcv_time = 0
74
72
  self.is_bt_streaming = True
@@ -124,7 +122,6 @@ class StreamProcessor:
124
122
  callback=self._device_configurator.update_ack, topic=TOPICS.cmd_ack)
125
123
  self.subscribe(
126
124
  callback=self._device_configurator.update_cmd_status, topic=TOPICS.cmd_status)
127
- self.orn_initialize(device_name)
128
125
 
129
126
  def open_file(self, bin_file, progress_callback=None):
130
127
  """Open the binary file and read until it gets device info packet
@@ -267,10 +264,6 @@ class StreamProcessor:
267
264
  def _process_orientation_batch(self, packets: List[Tuple]):
268
265
  raw_packets = [packet for packet, _ in packets]
269
266
  self.dispatch(topic=TOPICS.raw_orn, packet=raw_packets)
270
- for packet, _ in packets:
271
- if self.physical_orn.status == "READY":
272
- processed_packet = self.physical_orn.calculate(packet=packet)
273
- self.dispatch(topic=TOPICS.mapped_orn, packet=processed_packet)
274
267
 
275
268
  def _process_device_info_batch(self, packets: List[Tuple]):
276
269
  for packet, _ in packets:
@@ -317,9 +310,6 @@ class StreamProcessor:
317
310
  self.dispatch(topic=TOPICS.packet_bin, packet=packet)
318
311
  elif isinstance(packet, Orientation):
319
312
  self.dispatch(topic=TOPICS.raw_orn, packet=packet)
320
- if self.physical_orn.status == "READY":
321
- packet = self.physical_orn.calculate(packet=packet)
322
- self.dispatch(topic=TOPICS.mapped_orn, packet=packet)
323
313
  elif isinstance(packet, EEG):
324
314
  self.last_exg_packet_timestamp = get_local_time()
325
315
  missing_timestamps = self.fill_missing_packet(packet)
@@ -483,15 +473,6 @@ class StreamProcessor:
483
473
  "Please restart your device manually.")
484
474
  return False
485
475
 
486
- def orn_initialize(self, device_name):
487
- res = self.physical_orn.read_calibre_data(device_name)
488
- if res:
489
- self.physical_orn.status = "READY"
490
- else:
491
- self.physical_orn.status = "NOT READY"
492
- logger.debug('Calibration coefficients for physical orientation do not exist. '
493
- 'If you need physical orientation, calibrate the device first.')
494
-
495
476
  def set_marker(self, code):
496
477
  """Set a marker in the stream"""
497
478
  logger.info(f"Setting a software marker with code: {code}")