open-earable-python 0.0.1__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.
- open_earable_python-0.0.1/.github/workflows/publish-pypi.yml +56 -0
- open_earable_python-0.0.1/.gitignore +382 -0
- open_earable_python-0.0.1/CHANGELOG.md +4 -0
- open_earable_python-0.0.1/LICENSE +21 -0
- open_earable_python-0.0.1/PKG-INFO +128 -0
- open_earable_python-0.0.1/README.md +104 -0
- open_earable_python-0.0.1/pyproject.toml +40 -0
- open_earable_python-0.0.1/setup.cfg +4 -0
- open_earable_python-0.0.1/src/open_earable_python/__init__.py +9 -0
- open_earable_python-0.0.1/src/open_earable_python/dataset.py +362 -0
- open_earable_python-0.0.1/src/open_earable_python/parser.py +451 -0
- open_earable_python-0.0.1/src/open_earable_python/scheme.py +40 -0
- open_earable_python-0.0.1/src/open_earable_python.egg-info/PKG-INFO +128 -0
- open_earable_python-0.0.1/src/open_earable_python.egg-info/SOURCES.txt +15 -0
- open_earable_python-0.0.1/src/open_earable_python.egg-info/dependency_links.txt +1 -0
- open_earable_python-0.0.1/src/open_earable_python.egg-info/requires.txt +4 -0
- open_earable_python-0.0.1/src/open_earable_python.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on: push
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
name: Build distribution
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
steps:
|
|
11
|
+
- name: Check out repository
|
|
12
|
+
uses: actions/checkout@v6
|
|
13
|
+
with:
|
|
14
|
+
fetch-depth: 0
|
|
15
|
+
persist-credentials: false
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v6
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.*"
|
|
21
|
+
|
|
22
|
+
- name: Install build tooling
|
|
23
|
+
run: python -m pip install --upgrade pip build twine
|
|
24
|
+
|
|
25
|
+
- name: Build distributions
|
|
26
|
+
run: python -m build
|
|
27
|
+
|
|
28
|
+
- name: Check distributions
|
|
29
|
+
run: python -m twine check dist/*
|
|
30
|
+
|
|
31
|
+
- name: Upload distribution artifacts
|
|
32
|
+
uses: actions/upload-artifact@v6
|
|
33
|
+
with:
|
|
34
|
+
name: python-package-distributions
|
|
35
|
+
path: dist/
|
|
36
|
+
|
|
37
|
+
publish:
|
|
38
|
+
name: Publish to PyPI
|
|
39
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
40
|
+
needs: build
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
|
|
43
|
+
environment:
|
|
44
|
+
name: pypi
|
|
45
|
+
url: https://pypi.org/p/open-earable-python
|
|
46
|
+
permissions:
|
|
47
|
+
id-token: write
|
|
48
|
+
steps:
|
|
49
|
+
- name: Download distribution artifacts
|
|
50
|
+
uses: actions/download-artifact@v6
|
|
51
|
+
with:
|
|
52
|
+
name: python-package-distributions
|
|
53
|
+
path: dist/
|
|
54
|
+
|
|
55
|
+
- name: Publish to PyPI
|
|
56
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/windows,macos,linux,visualstudiocode,pycharm,python
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,macos,linux,visualstudiocode,pycharm,python
|
|
3
|
+
|
|
4
|
+
### Linux ###
|
|
5
|
+
*~
|
|
6
|
+
|
|
7
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
8
|
+
.fuse_hidden*
|
|
9
|
+
|
|
10
|
+
# KDE directory preferences
|
|
11
|
+
.directory
|
|
12
|
+
|
|
13
|
+
# Linux trash folder which might appear on any partition or disk
|
|
14
|
+
.Trash-*
|
|
15
|
+
|
|
16
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
17
|
+
.nfs*
|
|
18
|
+
|
|
19
|
+
### macOS ###
|
|
20
|
+
# General
|
|
21
|
+
.DS_Store
|
|
22
|
+
.AppleDouble
|
|
23
|
+
.LSOverride
|
|
24
|
+
|
|
25
|
+
# Icon must end with two \r
|
|
26
|
+
Icon
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Thumbnails
|
|
30
|
+
._*
|
|
31
|
+
|
|
32
|
+
# Files that might appear in the root of a volume
|
|
33
|
+
.DocumentRevisions-V100
|
|
34
|
+
.fseventsd
|
|
35
|
+
.Spotlight-V100
|
|
36
|
+
.TemporaryItems
|
|
37
|
+
.Trashes
|
|
38
|
+
.VolumeIcon.icns
|
|
39
|
+
.com.apple.timemachine.donotpresent
|
|
40
|
+
|
|
41
|
+
# Directories potentially created on remote AFP share
|
|
42
|
+
.AppleDB
|
|
43
|
+
.AppleDesktop
|
|
44
|
+
Network Trash Folder
|
|
45
|
+
Temporary Items
|
|
46
|
+
.apdisk
|
|
47
|
+
|
|
48
|
+
### macOS Patch ###
|
|
49
|
+
# iCloud generated files
|
|
50
|
+
*.icloud
|
|
51
|
+
|
|
52
|
+
### PyCharm ###
|
|
53
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
|
54
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
55
|
+
|
|
56
|
+
# User-specific stuff
|
|
57
|
+
.idea/**/workspace.xml
|
|
58
|
+
.idea/**/tasks.xml
|
|
59
|
+
.idea/**/usage.statistics.xml
|
|
60
|
+
.idea/**/dictionaries
|
|
61
|
+
.idea/**/shelf
|
|
62
|
+
|
|
63
|
+
# AWS User-specific
|
|
64
|
+
.idea/**/aws.xml
|
|
65
|
+
|
|
66
|
+
# Generated files
|
|
67
|
+
.idea/**/contentModel.xml
|
|
68
|
+
|
|
69
|
+
# Sensitive or high-churn files
|
|
70
|
+
.idea/**/dataSources/
|
|
71
|
+
.idea/**/dataSources.ids
|
|
72
|
+
.idea/**/dataSources.local.xml
|
|
73
|
+
.idea/**/sqlDataSources.xml
|
|
74
|
+
.idea/**/dynamic.xml
|
|
75
|
+
.idea/**/uiDesigner.xml
|
|
76
|
+
.idea/**/dbnavigator.xml
|
|
77
|
+
|
|
78
|
+
# Gradle
|
|
79
|
+
.idea/**/gradle.xml
|
|
80
|
+
.idea/**/libraries
|
|
81
|
+
|
|
82
|
+
# Gradle and Maven with auto-import
|
|
83
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
84
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
|
85
|
+
# auto-import.
|
|
86
|
+
# .idea/artifacts
|
|
87
|
+
# .idea/compiler.xml
|
|
88
|
+
# .idea/jarRepositories.xml
|
|
89
|
+
# .idea/modules.xml
|
|
90
|
+
# .idea/*.iml
|
|
91
|
+
# .idea/modules
|
|
92
|
+
# *.iml
|
|
93
|
+
# *.ipr
|
|
94
|
+
|
|
95
|
+
# CMake
|
|
96
|
+
cmake-build-*/
|
|
97
|
+
|
|
98
|
+
# Mongo Explorer plugin
|
|
99
|
+
.idea/**/mongoSettings.xml
|
|
100
|
+
|
|
101
|
+
# File-based project format
|
|
102
|
+
*.iws
|
|
103
|
+
|
|
104
|
+
# IntelliJ
|
|
105
|
+
out/
|
|
106
|
+
|
|
107
|
+
# mpeltonen/sbt-idea plugin
|
|
108
|
+
.idea_modules/
|
|
109
|
+
|
|
110
|
+
# JIRA plugin
|
|
111
|
+
atlassian-ide-plugin.xml
|
|
112
|
+
|
|
113
|
+
# Cursive Clojure plugin
|
|
114
|
+
.idea/replstate.xml
|
|
115
|
+
|
|
116
|
+
# SonarLint plugin
|
|
117
|
+
.idea/sonarlint/
|
|
118
|
+
|
|
119
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
120
|
+
com_crashlytics_export_strings.xml
|
|
121
|
+
crashlytics.properties
|
|
122
|
+
crashlytics-build.properties
|
|
123
|
+
fabric.properties
|
|
124
|
+
|
|
125
|
+
# Editor-based Rest Client
|
|
126
|
+
.idea/httpRequests
|
|
127
|
+
|
|
128
|
+
# Android studio 3.1+ serialized cache file
|
|
129
|
+
.idea/caches/build_file_checksums.ser
|
|
130
|
+
|
|
131
|
+
### PyCharm Patch ###
|
|
132
|
+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
|
133
|
+
|
|
134
|
+
# *.iml
|
|
135
|
+
# modules.xml
|
|
136
|
+
# .idea/misc.xml
|
|
137
|
+
# *.ipr
|
|
138
|
+
|
|
139
|
+
# Sonarlint plugin
|
|
140
|
+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
|
141
|
+
.idea/**/sonarlint/
|
|
142
|
+
|
|
143
|
+
# SonarQube Plugin
|
|
144
|
+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
|
145
|
+
.idea/**/sonarIssues.xml
|
|
146
|
+
|
|
147
|
+
# Markdown Navigator plugin
|
|
148
|
+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
|
149
|
+
.idea/**/markdown-navigator.xml
|
|
150
|
+
.idea/**/markdown-navigator-enh.xml
|
|
151
|
+
.idea/**/markdown-navigator/
|
|
152
|
+
|
|
153
|
+
# Cache file creation bug
|
|
154
|
+
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
|
155
|
+
.idea/$CACHE_FILE$
|
|
156
|
+
|
|
157
|
+
# CodeStream plugin
|
|
158
|
+
# https://plugins.jetbrains.com/plugin/12206-codestream
|
|
159
|
+
.idea/codestream.xml
|
|
160
|
+
|
|
161
|
+
# Azure Toolkit for IntelliJ plugin
|
|
162
|
+
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
|
|
163
|
+
.idea/**/azureSettings.xml
|
|
164
|
+
|
|
165
|
+
### Python ###
|
|
166
|
+
# Byte-compiled / optimized / DLL files
|
|
167
|
+
__pycache__/
|
|
168
|
+
*.py[cod]
|
|
169
|
+
*$py.class
|
|
170
|
+
|
|
171
|
+
# C extensions
|
|
172
|
+
*.so
|
|
173
|
+
|
|
174
|
+
# Distribution / packaging
|
|
175
|
+
.Python
|
|
176
|
+
build/
|
|
177
|
+
develop-eggs/
|
|
178
|
+
dist/
|
|
179
|
+
downloads/
|
|
180
|
+
eggs/
|
|
181
|
+
.eggs/
|
|
182
|
+
lib/
|
|
183
|
+
lib64/
|
|
184
|
+
parts/
|
|
185
|
+
sdist/
|
|
186
|
+
var/
|
|
187
|
+
wheels/
|
|
188
|
+
share/python-wheels/
|
|
189
|
+
*.egg-info/
|
|
190
|
+
.installed.cfg
|
|
191
|
+
*.egg
|
|
192
|
+
MANIFEST
|
|
193
|
+
|
|
194
|
+
# PyInstaller
|
|
195
|
+
# Usually these files are written by a python script from a template
|
|
196
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
197
|
+
*.manifest
|
|
198
|
+
*.spec
|
|
199
|
+
|
|
200
|
+
# Installer logs
|
|
201
|
+
pip-log.txt
|
|
202
|
+
pip-delete-this-directory.txt
|
|
203
|
+
|
|
204
|
+
# Unit test / coverage reports
|
|
205
|
+
htmlcov/
|
|
206
|
+
.tox/
|
|
207
|
+
.nox/
|
|
208
|
+
.coverage
|
|
209
|
+
.coverage.*
|
|
210
|
+
.cache
|
|
211
|
+
nosetests.xml
|
|
212
|
+
coverage.xml
|
|
213
|
+
*.cover
|
|
214
|
+
*.py,cover
|
|
215
|
+
.hypothesis/
|
|
216
|
+
.pytest_cache/
|
|
217
|
+
cover/
|
|
218
|
+
|
|
219
|
+
# Translations
|
|
220
|
+
*.mo
|
|
221
|
+
*.pot
|
|
222
|
+
|
|
223
|
+
# Django stuff:
|
|
224
|
+
*.log
|
|
225
|
+
local_settings.py
|
|
226
|
+
db.sqlite3
|
|
227
|
+
db.sqlite3-journal
|
|
228
|
+
|
|
229
|
+
# Flask stuff:
|
|
230
|
+
instance/
|
|
231
|
+
.webassets-cache
|
|
232
|
+
|
|
233
|
+
# Scrapy stuff:
|
|
234
|
+
.scrapy
|
|
235
|
+
|
|
236
|
+
# Sphinx documentation
|
|
237
|
+
docs/_build/
|
|
238
|
+
|
|
239
|
+
# PyBuilder
|
|
240
|
+
.pybuilder/
|
|
241
|
+
target/
|
|
242
|
+
|
|
243
|
+
# Jupyter Notebook
|
|
244
|
+
.ipynb_checkpoints
|
|
245
|
+
|
|
246
|
+
# IPython
|
|
247
|
+
profile_default/
|
|
248
|
+
ipython_config.py
|
|
249
|
+
|
|
250
|
+
# pyenv
|
|
251
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
252
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
253
|
+
# .python-version
|
|
254
|
+
|
|
255
|
+
# pipenv
|
|
256
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
257
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
258
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
259
|
+
# install all needed dependencies.
|
|
260
|
+
#Pipfile.lock
|
|
261
|
+
|
|
262
|
+
# poetry
|
|
263
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
264
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
265
|
+
# commonly ignored for libraries.
|
|
266
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
267
|
+
#poetry.lock
|
|
268
|
+
|
|
269
|
+
# pdm
|
|
270
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
271
|
+
#pdm.lock
|
|
272
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
273
|
+
# in version control.
|
|
274
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
275
|
+
.pdm.toml
|
|
276
|
+
|
|
277
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
278
|
+
__pypackages__/
|
|
279
|
+
|
|
280
|
+
# Celery stuff
|
|
281
|
+
celerybeat-schedule
|
|
282
|
+
celerybeat.pid
|
|
283
|
+
|
|
284
|
+
# SageMath parsed files
|
|
285
|
+
*.sage.py
|
|
286
|
+
|
|
287
|
+
# Environments
|
|
288
|
+
.env
|
|
289
|
+
.venv
|
|
290
|
+
env/
|
|
291
|
+
venv/
|
|
292
|
+
ENV/
|
|
293
|
+
env.bak/
|
|
294
|
+
venv.bak/
|
|
295
|
+
|
|
296
|
+
# Spyder project settings
|
|
297
|
+
.spyderproject
|
|
298
|
+
.spyproject
|
|
299
|
+
|
|
300
|
+
# Rope project settings
|
|
301
|
+
.ropeproject
|
|
302
|
+
|
|
303
|
+
# mkdocs documentation
|
|
304
|
+
/site
|
|
305
|
+
|
|
306
|
+
# mypy
|
|
307
|
+
.mypy_cache/
|
|
308
|
+
.dmypy.json
|
|
309
|
+
dmypy.json
|
|
310
|
+
|
|
311
|
+
# Pyre type checker
|
|
312
|
+
.pyre/
|
|
313
|
+
|
|
314
|
+
# pytype static type analyzer
|
|
315
|
+
.pytype/
|
|
316
|
+
|
|
317
|
+
# Cython debug symbols
|
|
318
|
+
cython_debug/
|
|
319
|
+
|
|
320
|
+
# PyCharm
|
|
321
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
322
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
323
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
324
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
325
|
+
#.idea/
|
|
326
|
+
|
|
327
|
+
### Python Patch ###
|
|
328
|
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
|
329
|
+
poetry.toml
|
|
330
|
+
|
|
331
|
+
# ruff
|
|
332
|
+
.ruff_cache/
|
|
333
|
+
|
|
334
|
+
# LSP config files
|
|
335
|
+
pyrightconfig.json
|
|
336
|
+
|
|
337
|
+
### VisualStudioCode ###
|
|
338
|
+
.vscode/*
|
|
339
|
+
!.vscode/settings.json
|
|
340
|
+
!.vscode/tasks.json
|
|
341
|
+
!.vscode/launch.json
|
|
342
|
+
!.vscode/extensions.json
|
|
343
|
+
!.vscode/*.code-snippets
|
|
344
|
+
|
|
345
|
+
# Local History for Visual Studio Code
|
|
346
|
+
.history/
|
|
347
|
+
|
|
348
|
+
# Built Visual Studio Code Extensions
|
|
349
|
+
*.vsix
|
|
350
|
+
|
|
351
|
+
### VisualStudioCode Patch ###
|
|
352
|
+
# Ignore all local history of files
|
|
353
|
+
.history
|
|
354
|
+
.ionide
|
|
355
|
+
|
|
356
|
+
### Windows ###
|
|
357
|
+
# Windows thumbnail cache files
|
|
358
|
+
Thumbs.db
|
|
359
|
+
Thumbs.db:encryptable
|
|
360
|
+
ehthumbs.db
|
|
361
|
+
ehthumbs_vista.db
|
|
362
|
+
|
|
363
|
+
# Dump file
|
|
364
|
+
*.stackdump
|
|
365
|
+
|
|
366
|
+
# Folder config file
|
|
367
|
+
[Dd]esktop.ini
|
|
368
|
+
|
|
369
|
+
# Recycle Bin used on file shares
|
|
370
|
+
$RECYCLE.BIN/
|
|
371
|
+
|
|
372
|
+
# Windows Installer files
|
|
373
|
+
*.cab
|
|
374
|
+
*.msi
|
|
375
|
+
*.msix
|
|
376
|
+
*.msm
|
|
377
|
+
*.msp
|
|
378
|
+
|
|
379
|
+
# Windows shortcuts
|
|
380
|
+
*.lnk
|
|
381
|
+
|
|
382
|
+
# End of https://www.toptal.com/developers/gitignore/api/windows,macos,linux,visualstudiocode,pycharm,python
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 OpenEarable
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: open-earable-python
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Reader and utilities for multi-sensor OpenEarable recordings.
|
|
5
|
+
Author-email: "Karlsruhe Institut of Technology (KIT)" <open-earable@lists.kit.edu>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Source, https://github.com/OpenEarable/open-earable-python
|
|
8
|
+
Project-URL: Issues, https://github.com/OpenEarable/open-earable-python/issues
|
|
9
|
+
Keywords: openearable,earable,sensors,imu,ppg,audio,wearables,.oe
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: numpy
|
|
20
|
+
Requires-Dist: pandas
|
|
21
|
+
Requires-Dist: ipython
|
|
22
|
+
Requires-Dist: scipy
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
# Open Earable Python
|
|
26
|
+
|
|
27
|
+
A Python toolkit for parsing and analyzing multi-sensor recordings from an OpenEarable device. The library provides pandas-friendly accessors for IMU, barometer, PPG, bone accelerometer, optical temperature, and microphone data, along with audio utilities.
|
|
28
|
+
|
|
29
|
+
## Features
|
|
30
|
+
- Load `.oe` recordings into a single time-aligned pandas DataFrame.
|
|
31
|
+
- Convenient attribute and key-based accessors for grouped sensors and individual channels.
|
|
32
|
+
- Play or export microphone audio directly from notebooks.
|
|
33
|
+
- Export combined sensor data to CSV for downstream analysis.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
The package targets Python 3.9+.
|
|
37
|
+
|
|
38
|
+
Once published to PyPI:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install open-earable-python
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
From source (for development):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
git clone https://github.com/OpenEarable/open-earable-python.git
|
|
48
|
+
cd open-earable-python
|
|
49
|
+
python -m venv .venv
|
|
50
|
+
source .venv/bin/activate
|
|
51
|
+
pip install -e .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Quickstart
|
|
55
|
+
Load a recording and explore the combined DataFrame:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from open_earable_python import SensorDataset
|
|
59
|
+
|
|
60
|
+
# Load a single .oe file
|
|
61
|
+
recording = SensorDataset("my_recording.oe")
|
|
62
|
+
|
|
63
|
+
# Time-indexed dataframe containing all available sensors
|
|
64
|
+
full_df = recording.get_dataframe()
|
|
65
|
+
print(full_df.head())
|
|
66
|
+
|
|
67
|
+
# Export to CSV
|
|
68
|
+
recording.save_csv("my_recording.csv")
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Sensor access patterns
|
|
72
|
+
Each sensor has an accessor exposing both grouped views and individual channels using attribute or key syntax. For IMU data:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
imu = recording.imu
|
|
76
|
+
|
|
77
|
+
# Full IMU dataframe (original column names retained)
|
|
78
|
+
imu.df # or imu.to_dataframe()
|
|
79
|
+
imu["acc.x"] # Column-style access
|
|
80
|
+
|
|
81
|
+
# Accelerometer
|
|
82
|
+
imu.acc # Accelerometer dataframe
|
|
83
|
+
imu.acc["x"] # Accelerometer X channel
|
|
84
|
+
imu.acc["y"]
|
|
85
|
+
imu.acc["z"]
|
|
86
|
+
|
|
87
|
+
# Gyroscope
|
|
88
|
+
imu.gyro # Gyroscope dataframe
|
|
89
|
+
imu.gyro["x"]
|
|
90
|
+
imu.gyro["y"]
|
|
91
|
+
imu.gyro["z"]
|
|
92
|
+
|
|
93
|
+
# Magnetometer
|
|
94
|
+
imu.mag # Magnetometer dataframe
|
|
95
|
+
imu.mag["x"]
|
|
96
|
+
imu.mag["y"]
|
|
97
|
+
imu.mag["z"]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
PPG channels follow the same pattern:
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
ppg = recording.ppg
|
|
104
|
+
ppg.df # Full PPG dataframe
|
|
105
|
+
ppg["ppg.red"] # Column-style access
|
|
106
|
+
ppg["red"] # Channel shortcut
|
|
107
|
+
ppg.ir
|
|
108
|
+
ppg.green
|
|
109
|
+
ppg.ambient
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Working with multiple recordings
|
|
113
|
+
Load several files at once and iterate over them:
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
from open_earable_python.dataset import load_recordings
|
|
117
|
+
|
|
118
|
+
paths = ["session1.oe", "session2.oe"]
|
|
119
|
+
recordings = load_recordings(paths)
|
|
120
|
+
|
|
121
|
+
# Access a specific recording
|
|
122
|
+
first = recordings[0]
|
|
123
|
+
print(first.list_sensors())
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Audio utilities
|
|
127
|
+
- `play_audio(sampling_rate=48000)`: play stereo microphone data in a Jupyter environment.
|
|
128
|
+
- `save_audio(path, sampling_rate=48000)`: export microphone audio to WAV.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Open Earable Python
|
|
2
|
+
|
|
3
|
+
A Python toolkit for parsing and analyzing multi-sensor recordings from an OpenEarable device. The library provides pandas-friendly accessors for IMU, barometer, PPG, bone accelerometer, optical temperature, and microphone data, along with audio utilities.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
- Load `.oe` recordings into a single time-aligned pandas DataFrame.
|
|
7
|
+
- Convenient attribute and key-based accessors for grouped sensors and individual channels.
|
|
8
|
+
- Play or export microphone audio directly from notebooks.
|
|
9
|
+
- Export combined sensor data to CSV for downstream analysis.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
The package targets Python 3.9+.
|
|
13
|
+
|
|
14
|
+
Once published to PyPI:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install open-earable-python
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
From source (for development):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git clone https://github.com/OpenEarable/open-earable-python.git
|
|
24
|
+
cd open-earable-python
|
|
25
|
+
python -m venv .venv
|
|
26
|
+
source .venv/bin/activate
|
|
27
|
+
pip install -e .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Quickstart
|
|
31
|
+
Load a recording and explore the combined DataFrame:
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from open_earable_python import SensorDataset
|
|
35
|
+
|
|
36
|
+
# Load a single .oe file
|
|
37
|
+
recording = SensorDataset("my_recording.oe")
|
|
38
|
+
|
|
39
|
+
# Time-indexed dataframe containing all available sensors
|
|
40
|
+
full_df = recording.get_dataframe()
|
|
41
|
+
print(full_df.head())
|
|
42
|
+
|
|
43
|
+
# Export to CSV
|
|
44
|
+
recording.save_csv("my_recording.csv")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Sensor access patterns
|
|
48
|
+
Each sensor has an accessor exposing both grouped views and individual channels using attribute or key syntax. For IMU data:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
imu = recording.imu
|
|
52
|
+
|
|
53
|
+
# Full IMU dataframe (original column names retained)
|
|
54
|
+
imu.df # or imu.to_dataframe()
|
|
55
|
+
imu["acc.x"] # Column-style access
|
|
56
|
+
|
|
57
|
+
# Accelerometer
|
|
58
|
+
imu.acc # Accelerometer dataframe
|
|
59
|
+
imu.acc["x"] # Accelerometer X channel
|
|
60
|
+
imu.acc["y"]
|
|
61
|
+
imu.acc["z"]
|
|
62
|
+
|
|
63
|
+
# Gyroscope
|
|
64
|
+
imu.gyro # Gyroscope dataframe
|
|
65
|
+
imu.gyro["x"]
|
|
66
|
+
imu.gyro["y"]
|
|
67
|
+
imu.gyro["z"]
|
|
68
|
+
|
|
69
|
+
# Magnetometer
|
|
70
|
+
imu.mag # Magnetometer dataframe
|
|
71
|
+
imu.mag["x"]
|
|
72
|
+
imu.mag["y"]
|
|
73
|
+
imu.mag["z"]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
PPG channels follow the same pattern:
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
ppg = recording.ppg
|
|
80
|
+
ppg.df # Full PPG dataframe
|
|
81
|
+
ppg["ppg.red"] # Column-style access
|
|
82
|
+
ppg["red"] # Channel shortcut
|
|
83
|
+
ppg.ir
|
|
84
|
+
ppg.green
|
|
85
|
+
ppg.ambient
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Working with multiple recordings
|
|
89
|
+
Load several files at once and iterate over them:
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from open_earable_python.dataset import load_recordings
|
|
93
|
+
|
|
94
|
+
paths = ["session1.oe", "session2.oe"]
|
|
95
|
+
recordings = load_recordings(paths)
|
|
96
|
+
|
|
97
|
+
# Access a specific recording
|
|
98
|
+
first = recordings[0]
|
|
99
|
+
print(first.list_sensors())
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Audio utilities
|
|
103
|
+
- `play_audio(sampling_rate=48000)`: play stereo microphone data in a Jupyter environment.
|
|
104
|
+
- `save_audio(path, sampling_rate=48000)`: export microphone audio to WAV.
|