title: YAMS emoji: 🍠 colorFrom: purple colorTo: purple sdk: gradio sdk_version: 5.15.0 app_file: yams/main.py pinned: false license: mit
YAMS
Yet Another Motionsense Service utility
Code | PyPI | 🤗 Demo (UI only)
Quickstart
Pre-compiled version
- Download the latest release from here
Development
- (optional) create a dedicated conda environment
conda create -n yams python=3.12conda activate yams
- Clone this repository
git clone https://github.com/SenSE-Lab-OSU/YAMS.gitcd yams
- Install dependencies
pip install -r requirements.txt
- Config
liblslconda install -c conda-forge liblsl
- Lauch YAMS
python -m yams
(Deprecated) Windows
Python 3.12 or newer is needed
- Download setup scripts
- Download the scripts/windows folder and save it in your desired folder
- Run the installation script
- Run the script by double-click the
install.batfile - The script will perform any necessary setup
- Run the script by double-click the
- Start the app
- by double-click the
start_yams.batfile - Once the initialization is completed, you will see a messge similar to:
* Running on local URL: http://127.0.0.1:7860
- by double-click the
- Access the application
- Open a web browser and navigate to http://127.0.0.1:7860 or the URL displayed in the prompt.
(Deprecated) MacOS / Linux
- Download scripts/unix to a desired location
- Run
run.shto install and start the app
General usage
Download onboard data
Refer to Extract onboard data
Extract raw data
Refer to Data Extraction Feature
Emergency stop
Terminating data collection is also available in YAMS web app under
bluetooth scanner - collection control - stop
To halt all on-going collection on the MotionSenSE wristbands,
- On windows, go to your folder where the setup scripts are located as in Quickstart-Windows part
- Locate and double-click
emergency_stop.bat - Wait until all operations are completed
Installation
pip install -U yams-utilpython -m yams
Development guide
- Clone the repository
git clone https://github.com/SenSE-Lab-OSU/YAMS.git
- Install dependencies
pip install -r requirements.txt
- Launch the application
python -m yams
- Visit http://127.0.0.1:7860 (by default, check on-screen prompt)
Build guide
- Install pyinstaller via
pip install pyinstaller - Create .spec by
pyi-makespec --collect-data=gradio_client --collect-data=gradio --collect-data=safehttpx --collect-data=groovy --onefile app.py - Manually add the following in
a = analysis ...
module_collection_mode={
'gradio': 'py', # Collect gradio package as source .py files
},
- Build the app:
pyinstaller app.spec
MacOS
pyi-makespec --collect-data=gradio_client --collect-data=gradio --collect-data=safehttpx --collect-data=groovy --onefile --osx-bundle-identifier 'com.yams' --icon yams/resources/icons/yams.icns app.py
Instructions
(advanced) running data extraction in command line
Run from the project root:
python -m yams.data_extraction -i "data_in" -o "data_out"
All options:
| Flag | Default | Description |
|---|---|---|
-i, --in_dir |
(required) | Directory containing .bin files |
-o, --out_dir |
./ |
Output directory |
--save_format |
csv |
Output format: csv or pickle |
--ignore_id |
off | Skip subject/session ID parsing; use raw filenames |
--legacy_fs |
off | Use 25 Hz clock for CDCT (uncommon, old devices) |
--force_new_format |
off | Force v4.7.0+ binary layout regardless of uuid.txt version |
--mode |
dir |
dir: single folder of .bin files; batch: folder of .zip archives |
Data type detection — the extractor scans the input folder and processes whichever file types are present:
| File pattern | Sensor | Output |
|---|---|---|
[id]ac*.bin |
IMU (AccX/Y/Z, QuatX/Y/Z, ENMO) | [id]ac.csv |
[id]ppg*.bin |
PPG (ir1, ir2, g1, g2) | [id]ppg.csv |
[id]ecg*.bin |
MAX30001 ECG (ECG, ETAG, PTAG) | [id]ecg.csv |
A single run extracts all types present. Missing types are silently skipped.
Examples:
# Wristband (AC + PPG) — firmware auto-detected from uuid.txt
python -m yams.data_extraction -i "data/subject01" -o "out/subject01"
# Wristband on v4.7.0+ firmware (force if uuid.txt is absent or reports wrong version)
python -m yams.data_extraction -i "data/subject01" -o "out/subject01" --force_new_format
# ECG only folder (e.g. data/260708_ecg containing ecg*.bin)
python -m yams.data_extraction -i "data/260708_ecg" -o "out/ecg" --ignore_id
# Mixed folder with both wristband and ECG files
python -m yams.data_extraction -i "data/session01" -o "out/session01" --force_new_format --ignore_id
# Save as pickle, skip ID parsing
python -m yams.data_extraction -i "data/subject01" -o "out/subject01" --save_format pickle --ignore_id
# Batch extract a folder of zip archives
python -m yams.data_extraction -i "data_in" --mode batch
Notes:
- The device version is read automatically from
uuid.txt. If v4.7.0+, the new binary layout (uint32 PPG, quaternion IMU, 32-bit counter at 512 Hz) is used for AC/PPG; otherwise the legacy layout is used. Use--force_new_formatto override. - ECG binary format (
ecg*.bin) is always parsed the same way regardless of firmware version — it uses 12-byte CRC-validated frames with a 512 Hz sequence counter. - ECG output columns:
ECG(signed 18-bit ADC count),ETAG(0 = valid sample, 2 = leads off),PTAG,Counter,CDCT,Datetime.
Roadmap
- Device data transfer
- Device data post processing
- format conversion
- visualization
- simple data collection utilities
- LSL support
- Auto reconnect
- Selected file download
- Advanced device monitoring [ ] global state: active connection, active outlet, ctl status [ ] BAT monitoring [ ] storage monitoring
Acknowledgement
- Conceptualization: MPADA
- BT control adapted from MotionSenseHRV-BioImpedance-Interface .
- icon designed by Mihimihi
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yams_util-1.5.0.tar.gz.
File metadata
- Download URL: yams_util-1.5.0.tar.gz
- Upload date:
- Size: 38.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7768aaf2d42c6ec030bf088776e3d5cee8c0caa8a8a068cdccc03bf82777b1cb
|
|
| MD5 |
efef712a6290197b6dc0b93e7531b0c2
|
|
| BLAKE2b-256 |
5a5090e4813d84c89e0313a0c83e1bc3b7b4c16567efaff555b932f64a375dec
|
Provenance
The following attestation bundles were made for yams_util-1.5.0.tar.gz:
Publisher:
python-publish.yml on SenSE-Lab-OSU/YAMS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yams_util-1.5.0.tar.gz -
Subject digest:
7768aaf2d42c6ec030bf088776e3d5cee8c0caa8a8a068cdccc03bf82777b1cb - Sigstore transparency entry: 2348774701
- Sigstore integration time:
-
Permalink:
SenSE-Lab-OSU/YAMS@8d2a0d964292d45f9385bf23bcdcb185ec7265aa -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/SenSE-Lab-OSU
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8d2a0d964292d45f9385bf23bcdcb185ec7265aa -
Trigger Event:
release
-
Statement type:
File details
Details for the file yams_util-1.5.0-py3-none-any.whl.
File metadata
- Download URL: yams_util-1.5.0-py3-none-any.whl
- Upload date:
- Size: 37.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
618cdd3ec9e3c5d39945306d268801314257a1de974487fa2126df3ec29b1463
|
|
| MD5 |
26325873cc4bb76217ba19fcf29c8eec
|
|
| BLAKE2b-256 |
2aa7c04b9c65d8af59842c9929d89e4e49553b1fc6d01c75a1863af4aea57757
|
Provenance
The following attestation bundles were made for yams_util-1.5.0-py3-none-any.whl:
Publisher:
python-publish.yml on SenSE-Lab-OSU/YAMS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yams_util-1.5.0-py3-none-any.whl -
Subject digest:
618cdd3ec9e3c5d39945306d268801314257a1de974487fa2126df3ec29b1463 - Sigstore transparency entry: 2348775687
- Sigstore integration time:
-
Permalink:
SenSE-Lab-OSU/YAMS@8d2a0d964292d45f9385bf23bcdcb185ec7265aa -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/SenSE-Lab-OSU
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8d2a0d964292d45f9385bf23bcdcb185ec7265aa -
Trigger Event:
release
-
Statement type: