Metadata-Version: 2.4
Name: openbalance
Version: 0.1.0
Summary: A hardware-agnostic Python library for processing and analyzing posturography data.
Author-email: Otto Hofstätter <otto.hofstatter@miun.se>
Project-URL: Homepage, https://github.com/dryride/OpenBalance
Project-URL: Repository, https://github.com/dryride/OpenBalance
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: pandas
Requires-Dist: matplotlib
Requires-Dist: fpdf2
Dynamic: license-file

# OpenBalance ⚖️🔓

### An Open-Platform, Multi-Cell Framework for Unconstrained Posturography and Balance Assessment

OpenBalance is an open-source, hardware-agnostic framework designed to democratize advanced biomechanical balance assessment. By breaking the vendor lock-in of proprietary, high-cost medical devices, OpenBalance enables research laboratories, sports facilities, and clinical institutions to implement a highly precise, flexible posturography system using customizable distributed force cells.

Unlike conventional monolithic force plates or rigid four-quadrant systems (such as Tetrax), OpenBalance introduces a novel methodological approach using a multi-cell array (e.g., 4x4 matrix). This architecture allows for **unconstrained foot placement**, ensuring subjects can adopt their natural, anthropometrically comfortable stance—which is particularly crucial in orthopedic rehabilitation (e.g., post-operative hip and knee arthroplasty).

---

## 🚀 Key Features

* **Open Architecture & No Vendor Lock-In:** Pure open-source software (Python/NumPy) and flexible hardware principles. No encrypted data structures, no hidden subscription walls.
* **Unconstrained Stance & Variable Geometry:** Supports custom-positioned, mechanically decoupled sub-platforms. The software dynamically handles coordinate transformation via geometric offsets.
* **Cascading Mathematical Framework:** Implements a rigorous two-stage Center of Pressure (COP) calculation (localized sub-segment COPs fused into a global COP) based on established biomechanical models (Winter, 2009).
* **Decoupled Clinical Metrics:** Independently quantifies static postural alignment/deficits via the **Weight Distribution Index (WDI)** and dynamic equilibrium stability (*Postural Sway*).
* **High Dynamic Precision:** Designed for discrete, low-mass load cells to bypass the inertial mass artifacts of heavy force plates and the shear-force limitations of pressure-sensing mats under dynamic perturbations.

---

## 📐 Mathematical Principle

OpenBalance handles the spatial data fusion of distributed force cell arrays. The global COP is computed as a force-weighted average of the localized sub-platform coordinates, mapped into a unified global coordinate system:

$$X_{global} = \frac{\sum_{i=1}^{4} \left( (X_{i,local} + X_{off,i}) \cdot F_i \right)}{F_{total}}$$

Where $X_{off,i}$ represents the deterministic geometric offset of the independent sub-platform from the absolute geometric origin $(0,0)$.

---

## 🛠️ Repository Contents

This repository contains the core methodological framework and open-source assets:
* `/data` : Testdatasets.
* `/docs` : Published Paper.
* `/hardware_concept` : PDF Document for the dimension.
* `/src` : Python algorithms utilizing NumPy for element-wise, vectorized data processing (localized/global COP calculation, and WDI extraction).

## 🤝 Contributing & Open Science

This project is a scientific initiative to open up posturography for researchers and sports scientists worldwide. We welcome contributions regarding:
* Signal processing pipelines (e.g., advanced filtering techniques).
* Real-time visualization dashboards (Python/Dash/Streamlit).
* Hardware interface integrations (ADC data streaming, firmware).

## 📄 License

This project is licensed under the MIT License - see the LICENSE file for details.
