Metadata-Version: 2.4
Name: tks-package
Version: 0.2.0
Summary: Boîte à outils de lecture et analyse de données biomécaniques - Technosport
Author-email: Jean Panchairi <jean.panchairi@univ-amu.fr>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Technosport/TKS-package
Project-URL: Repository, https://github.com/Technosport/TKS-package
Project-URL: Documentation, https://github.com/Technosport/TKS-package#readme
Project-URL: Bug Tracker, https://github.com/Technosport/TKS-package/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: matplotlib
Requires-Dist: plotly
Requires-Dist: lark
Requires-Dist: openpyxl
Requires-Dist: fitparse
Requires-Dist: pytz
Requires-Dist: ezc3d
Requires-Dist: pythonnet
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"

# Technosport (`tks-package`)

> Boîte à outils Python pour la lecture, le traitement et l'analyse de données biomécaniques et physiologiques, développée au sein du **Technosport / ISM (Aix-Marseille Université)**.

---

## Installation

```bash
# Depuis PyPI (une fois publié) :
pip install tks-package

# Ou directement depuis GitHub :
pip install git+https://github.com/Technosport/TKS-package.git
```

Pour les outils optionnels de développement et tests :
```bash
pip install "tks-package[dev] @ git+https://github.com/Technosport/TKS-package.git"
```

---

## Démarrage rapide

```python
import tks

# 1. Lecture de données (C3D, Delsys, QTM, Noraxon, Metalyzer, VO2 Master...)
data_c3d = tks.read_c3d("marche.c3d")
forces = data_c3d["Plateforms"]["PF_1"]["Force"]

# 2. Synchronisation de signaux
sig_synced, sig_ref, delta = tks.sync_two_signals(sig1, sig2, plot=True)

# 3. Analyse non-linéaire (Lyapunov & Floquet)
from tks.analysis import traitement_lyapunov_floquet
res = traitement_lyapunov_floquet(inlyap=data_kin, infloq=data_cycles, acq_freq=100.0)

# 4. Conversion Garmin FIT
from tks.converters import fit_to_df
df_fit = fit_to_df("activite.fit")

# 5. Thème graphique officiel ISM / Technosport pour figures Plotly
from tks.theme import setup_ism_theme
setup_ism_theme(target="powerpoint", logos=True)
```

> 💡 *Note de compatibilité :* Les anciens imports `import TKS_package` restent supportés pour assurer la rétrocompatibilité avec vos scripts existants.

---

## Équipements & Formats pris en charge

| Équipement / Logiciel | Formats supportés | Fonction principale |
| :--- | :--- | :--- |
| **Delsys** (EMGWorks, Trigno Discover) | `.delsys`, `.hpf`, `.shpf` | `tks.read_delsys` |
| **Metalyzer** (Cortex / Metasoft) | `.xml` (CPET) | `tks.read_xml_from_metasoft` |
| **Noraxon** (MR3 / MR4) | `.dat` (OpenData), `.csv` | `tks.read_noraxon_OpenData_from_MR4`, `tks.read_noraxon_csv_from_MR4` |
| **OpenSim** | `.sto` | `tks.load_sto` |
| **RunScribe** | Dossier d'export, `Run_Metrics.csv` | `tks.read_runscribe` |
| **Visual3D** | `.c3d`, `.json`, `.txt` ASCII | `tks.read_c3d`, `tks.read_json_from_v3d`, `tks.read_ascii_from_v3d` |
| **VO2 Master** | Dossier d'export, `DataAverage.csv`, `.xlsx` | `tks.read_VO2master` |
| **Qualisys (QTM)** | `.tsv` (2D, 3D, analogique, plateformes de force) | `tks.read_qtm_tsv` |
| **Moticon** | `.txt` | `tks.read_moticon_txt_to_dict` |
| **x-IMU3** | Dossier d'export / fichiers | `tks.read_ximu3` |
| **Garmin FIT** | `.fit` | `tks.converters.fit_to_df`, `tks.converters.fit_to_csv` |

---

## Modules du package

- **`tks.readers`** : Import vers `DataFrame` / `dict` pour tous les formats de capteurs.
- **`tks.analyzer`** : Fréquences d'échantillonnage, rééchantillonnage, synchronisation, détection de pics, métriques semelles Moticon.
- **`tks.analysis`** : Analyse dynamique non-linéaire et stabilité (Lyapunov, Floquet, AMI, GFNN, reconstruction d'espace des phases).
- **`tks.converters`** : Conversion de fichiers FIT vers CSV et Excel.
- **`tks.theme`** : Charte graphique officielle ISM & Technosport pour figures scientifiques Plotly.
- **`tks.utils`** : Gestion de fichiers, calculs de repères 3D locaux, export multi-formats de figures.

---
Pipelines et scripts Visual3D (`.v3s`) disponibles sur le dépôt dédié : [Technosport/Visual3D-Pipelines](https://github.com/Technosport/Visual3D-Pipelines).
