-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from neurogeriatricskiel/rename_toolbox
Rename toolbox
- Loading branch information
Showing
79 changed files
with
1,721 additions
and
2,687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,46 @@ | ||
[![codecov](https://codecov.io/gh/neurogeriatricskiel/NGMT/graph/badge.svg?token=L578RHZ699)](https://codecov.io/gh/neurogeriatricskiel/NGMT) | ||
[![build docs](https://github.com/neurogeriatricskiel/NGMT/actions/workflows/mkdocs.yml/badge.svg)](https://github.com/neurogeriatricskiel/NGMT/actions/workflows/mkdocs.yml) | ||
[![codecov](https://codecov.io/gh/neurogeriatricskiel/KielMAT/graph/badge.svg?token=L578RHZ699)](https://codecov.io/gh/neurogeriatricskiel/KielMAT) | ||
[![build docs](https://github.com/neurogeriatricskiel/KielMAT/actions/workflows/mkdocs.yml/badge.svg)](https://github.com/neurogeriatricskiel/KielMAT/actions/workflows/mkdocs.yml) | ||
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) | ||
![GitHub issues](https://img.shields.io/github/issues-raw/neurogeriatricskiel/NGMT) | ||
![GitHub contributors](https://img.shields.io/github/contributors/neurogeriatricskiel/NGMT) | ||
[![lint-and-test](https://github.com/neurogeriatricskiel/NGMT/actions/workflows/test-and-lint.yml/badge.svg)](https://github.com/neurogeriatricskiel/NGMT/actions/workflows/test-and-lint.yml) | ||
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ngmt) | ||
![GitHub issues](https://img.shields.io/github/issues-raw/neurogeriatricskiel/KielMAT) | ||
![GitHub contributors](https://img.shields.io/github/contributors/neurogeriatricskiel/KielMAT) | ||
[![lint-and-test](https://github.com/neurogeriatricskiel/KielMAT/actions/workflows/test-and-lint.yml/badge.svg)](https://github.com/neurogeriatricskiel/KielMAT/actions/workflows/test-and-lint.yml) | ||
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/kielmat) | ||
|
||
|
||
![NGMTLogo](ngmt_logo_transBG.png) | ||
![KielMATLogo](kielmat_logo_transBG.png) | ||
|
||
Welcome to the NeuroGeriatricsMotionToolbox (NGMT). We are a Python based toolbox for processing motion data. | ||
Welcome to the KielMotionAnalysisToolbox (KielMAT). We are a Python based toolbox for processing motion data. | ||
|
||
The toolbox is aimed at motion researchers who want to use python based open source software to process their data. | ||
We have implemented validated algorithms in modules to process motion data, such as: | ||
- Gait sequence detection (GSD) | ||
- Inital contact detection (ICD) | ||
- Physical activity monitoring (PAM) | ||
- Postural transition detection (SSD) | ||
- More to follow ... | ||
The toolbox is aimed at motion researchers who want to use Python-based open-source software to process their data. We have implemented validated algorithms in modules to process motion data, as shown in the table below: | ||
|
||
| Module | Description | Data | | ||
|--------------------------------|------------------------------------------------|----------------------------------------| | ||
| Gait sequence detection (GSD) | Detects gaits | 3D accelerations from the lower back | | ||
| Initial contact detection (ICD)| Detects initial contact during gait | 3D accelerations from the lower back | | ||
| Postural transition detection (SSD) | Detects sit-to-stand and stand-to-sit movements | 3D accelerations and gyroscope from the lower back | | ||
| Physical activity monitoring (PAM) | Monitors physical activity levels | 3D accelerations from the wrist | | ||
| More to follow... | Additional modules to be added | | | ||
|
||
The idea is that various motion data can be loaded into our dedicated dataclass which rely on principles from the [Motion-BIDS](https://bids-specification.readthedocs.io/en/latest/modality-specific-files/motion.html) standard. | ||
|
||
## Data classes | ||
### Data classes: conceptual framework | ||
|
||
Motion data is recorded with many different systems and modalities, each with their own proprietary data format. NGMT deals with this by organizing both data and metadata in a [BIDS-like format](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/motion.html). The BIDS format suggests that [motion recording data](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/motion.html#motion-recording-data) from a single tracking system is organized in a single `*_tracksys-<label>_motion.tsv` file. | ||
Motion data is recorded with many different systems and modalities, each with their own proprietary data format. KielMAT deals with this by organizing both data and metadata in a [BIDS-like format](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/motion.html). The BIDS format suggests that [motion recording data](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/motion.html#motion-recording-data) from a single tracking system is organized in a single `*_tracksys-<label>_motion.tsv` file. | ||
|
||
!!! note | ||
|
||
A tracking system is defined as a group of motion channels that share hardware properties (the recording device) and software properties (the recording duration and number of samples). | ||
|
||
In NGMT, data from a single tracking system is therefore loaded into a single `pandas.DataFrame`. The column headers of this `pandas.DataFrame` refer to the channels, and the corresponding [channels information](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/motion.html#channels-description-_channelstsv) is likewise available as a `pandas.DataFrame`. | ||
In KielMAT, data from a single tracking system is therefore loaded into a single `pandas.DataFrame`. The column headers of this `pandas.DataFrame` refer to the channels, and the corresponding [channels information](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/motion.html#channels-description-_channelstsv) is likewise available as a `pandas.DataFrame`. | ||
|
||
Similarly, if any [events](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/task-events.html) are available for the given recording, these are loaded into a single `pandas.DataFrame` for each tracking system as well. The events derived from the toolbox can be exported to a BIDS like '*_events.tsv' file. | ||
|
||
### Data classes: in practice | ||
These concepts are translated into a NGMT dataclass for each recording: `NGMTRecording`: | ||
These concepts are translated into a KielMAT dataclass for each recording: `KielMATRecording`: | ||
```mermaid | ||
classDiagram | ||
class NGMTRecording { | ||
class KielMATRecording { | ||
data: dict[str, pd.DataFrame] | ||
channels: dict[str, pd.DataFrame] | ||
info: None | dict[str, Any] = None | ||
|
@@ -50,9 +52,9 @@ classDiagram | |
} | ||
``` | ||
A recording consists of the motion data from one or more tracking systems, where each tracking system may consist motion data from one or more tracked points. Therefore, the motion data (`NGMTRecording.data`) are organized as a dictionary where the dictionary keys refer to the tracking systems, and the corresponding values the actual (raw) data as a `pandas.DataFrame`. The description of data channels (`NGMTRecording.channels`) is availabe as a dictionary with the same keys, and the values contain the channels description. | ||
A recording consists of the motion data from one or more tracking systems, where each tracking system may consist motion data from one or more tracked points. Therefore, the motion data (`KielMATRecording.data`) are organized as a dictionary where the dictionary keys refer to the tracking systems, and the corresponding values the actual (raw) data as a `pandas.DataFrame`. The description of data channels (`KielMATRecording.channels`) is availabe as a dictionary with the same keys, and the values contain the channels description. | ||
```python | ||
>>> from ngmt.datasets import mobilised | ||
>>> from kielmat.datasets import mobilised | ||
>>> file_name = "/mnt/neurogeriatrics_data/Mobilise-D/rawdata/sub-3011/Free-living/data.mat" | ||
>>> recording = mobilised.load_recording(file_name, tracking_systems=["SU", "SU_INDIP"], tracked_points=["LowerBack"]) | ||
>>> recording.data | ||
|
@@ -106,16 +108,19 @@ classDiagram | |
|
||
!!! note | ||
|
||
In the examples you find a [tutorial (the basics of NGMT)](https://neurogeriatricskiel.github.io/NGMT/examples/00_tutorial_basics/) that explains the basics of the dataclass and how to work with them. | ||
|
||
In the examples you find a [tutorial (the basics of KielMAT)](https://neurogeriatricskiel.github.io/KielMAT/examples/00_tutorial_basics/) that explains the basics of the dataclass and how to work with them. | ||
|
||
## Installation | ||
The toolbox has been released on [pypi](https://pypi.org/project/ngmt/) and can be installed via pip: | ||
The toolbox has been released on [pypi](https://pypi.org/project/kielmat/) and can be installed via pip: | ||
```bash | ||
pip install ngmt | ||
pip install kielmat | ||
``` | ||
It requires Python 3.10 or higher. | ||
|
||
## Contributing | ||
We welcome contributions to KielMAT! Please refer to our [contributing guide](https://neurogeriatricskiel.github.io/KielMAT/contributing) for more details. | ||
|
||
|
||
## Authors | ||
|
||
[Masoud Abedinifar](https://github.com/masoudabedinifar), [Julius Welzel](https://github.com/JuliusWelzel), [Walter Maetzler](mailto:[email protected]), [Clint Hansen](mailto:[email protected]) & [Robbin Romijnders](https://github.com/rmndrs89) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.