Skip to content

Commit 7f3b03d

Browse files
committed
updated graph labels; small README changes for pybind
1 parent f86d789 commit 7f3b03d

8 files changed

Lines changed: 5 additions & 3 deletions

File tree

pybind/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Running EmotiBit Brainflow SpO2 Algorithm using `pybind`
22
## Requirements
33
- Python
4-
- Python virtual environment (refer to the Emotibit Plugins [repo](https://github.com/EmotiBit/EmotiBit_Plugins/blob/main/README_py.md#setting-up-python-virtual-environment) for specific instructions on how to setup)
4+
- Python virtual environment (refer to the Emotibit Plugins [repo](https://github.com/EmotiBit/EmotiBit_Plugins/blob/main/README_py.md#Creating-python-env-with-pybind11) for specific instructions on how to setup)
55
- CMake
66
- [EmotiBit ArduinoFilters](https://github.com/EmotiBit/EmotiBit_ArduinoFilters)
77
- **Option 1:** Library Manager
@@ -27,9 +27,11 @@
2727
- Open `run.py` and uncomment lines 6-7 (if on linux/macOS), or uncomment lines 10-11 (if on Windows)
2828

2929
## Testing
30+
- Unzip the `.zip` file in `tests/simulated-unobstructed-airway_v0.0.0/ip900ap`
3031
- Run the EmotiBit Data Parser on `tests/simulated-unobstructed-airway_v0.0.0/ip900ap/EmotiBit.csv`
3132
- Verify that `EmotiBit_PI.csv`, `EmotiBit_PR.csv`, and `EmotiBit_UN.csv` exist under `tests/simulated-unobstructed-airway_v0.0.0/ip900ap`
3233
- Switch to the terminal window in the `pybind` directory
3334
- Run `python run.py ../tests/simulated-unobstructed-airway_v0.0.0/ip900ap`
3435
- `matplotlib` will need to be installed for the script to run successfully
3536
- A plot of the raw PPG data overlayed with the calculated SpO2 should appear
37+
**Note:** The timestamp used by `run.py` is the `EmotiBitTimestamp` column in the `Emotibit.csv` file

pybind/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def main():
5959
print(f"Found PI file: {pi_file}")
6060

6161
ppg_red = read_column_from_csv(pr_file, 7)
62-
ppg_red_ts = read_column_from_csv(pr_file, 0)
62+
ppg_red_ts = read_column_from_csv(pr_file, 1)
6363
ppg_ir = read_column_from_csv(pi_file, 7)
64-
ppg_ir_ts = read_column_from_csv(pi_file, 0)
64+
ppg_ir_ts = read_column_from_csv(pi_file, 1)
6565

6666
# Split ppg_red and ppg_ir into chunks
6767
ppg_red_chunks = split_into_chunks(ppg_red, chunk_size)
3.95 KB
Loading
-53.9 KB
Loading
-2.18 KB
Loading
16.1 KB
Loading
12.8 KB
Loading
14.1 KB
Loading

0 commit comments

Comments
 (0)