-
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.
update docs for first public release
- Loading branch information
1 parent
0489fbc
commit fdbe066
Showing
8 changed files
with
149 additions
and
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,16 @@ | ||
# NGMT | ||
|
||
## NeuroGeriatricMotionToolbox | ||
|
||
Python based toolbox for processing motion data | ||
|
||
## Structure | ||
|
||
```markdown | ||
│ngmt <- Main folder. It is initialized as a Git | ||
│ repository with a reasonable .gitignore file. | ||
│ | ||
├── examples <- Various scripts, e.g. simulations, plotting, analysis, | ||
│ The scripts use the `ngmt` folder for their base code. | ||
| | ||
├── info <- Slides, Paper, basically any document related to the work in progress. | ||
│ | ||
├── ngmt <- Source code for use in this project. Contains functions, | ||
│ structures and modules that are used throughout | ||
│ the project and in multiple scripts. | ||
│ | ||
├── test <- Folder containing tests for `ngmt`. | ||
│ | ||
├── README.md <- Top-level README. | ||
├── LICENSE | ||
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g. | ||
│ generated with `pip freeze > requirements.txt`. Might be replaced by | ||
│ a `environment.yml` file for Anaconda. | ||
├── setup.py <- makes project pip installable (pip install -e .) so src can be imported | ||
| | ||
└── .gitignore <- focused on Python VS Code | ||
``` | ||
Welcome to the NeuroGeriatricMotionToolbox (NGMT). We are a Python based toolbox for processing motion data. | ||
|
||
> The toolbox is currently under development and is not yet ready for use. | ||
The toolbox is aimed at a wide variety of motion researchers who want to use open souce software to process their data. | ||
We have implemented a wide variety of functions to process motion data, such as: | ||
- Gait sequence detection (GSD) | ||
- Inital contact detection (ICD) | ||
- More to follow ... | ||
|
||
The idea is that various motion data can be loaded into our dedicated dataclasses which rely on principles from the [Motion-BIDS](https://bids-specification.readthedocs.io/en/latest/modality-specific-files/motion.html) standard. | ||
|
||
## Relation of data classes | ||
```mermaid | ||
|
@@ -99,10 +80,27 @@ The `RecordingData` object can also contain information about events. The `Event | |
|
||
The `ChannelData` object is used to store the channel name, the channel type, the channel units and the tracked point. | ||
|
||
## Formatting | ||
The code uploaded here follows the latest black style guide. Please make sure to format your code accordingly before uploading it. | ||
To do this, install black with `pip install black` and run `black .` in the root directory of the project. | ||
## Documentation | ||
The full documentation can be found here. | ||
|
||
## Installation | ||
After the first release, the toolbox can be installed via pip | ||
|
||
For now, the toolbox can be installed via the following steps: | ||
1. Clone the repository | ||
2. Create a virtual environment | ||
3. Install the requirements | ||
4. Install the toolbox | ||
|
||
```bash | ||
git clone https://github.com/neurogeriatricskiel/NGMT.git | ||
cd NeuroGeriatricMotionToolbox | ||
python -m venv venv_ngmt | ||
source venv_ngmt/bin/activate | ||
pip install -r environment.yml | ||
pip install -e . | ||
``` | ||
|
||
## Authors | ||
|
||
[Masoud Abedinifar](https://github.com/masoudabedinifar), [Robbin Romijnders](https://github.com/rmndrs89) & [Julius Welzel](https://github.com/JuliusWelzel) | ||
[Masoud Abedinifar](https://github.com/masoudabedinifar), [Clint Hansen](mailto:[email protected]), [Robbin Romijnders](https://github.com/rmndrs89) & [Julius Welzel](https://github.com/JuliusWelzel) |
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
In the following the NGMT dataclasses are described. | ||
The dataclasses are used to store motion data in a standardized way. We provide some small set of import functions, each of which returns a dataclass. | ||
User should easily be able to write their own import functions, to get the their data into the provided dataclasses (this step might take some thinking). | ||
After the data is in the dataclasses, running functions on the data from our toolbox should be really straight forward. | ||
|
||
## Relation of data classes | ||
```mermaid | ||
classDiagram | ||
class RawData { | ||
FilePath: str | ||
FileName: str | ||
} | ||
class FileInfo { | ||
SubjectID: str | ||
TaskName: str | ||
DatasetName: str | ||
FilePath: str | ||
} | ||
class ChannelData { | ||
name: List[str] | ||
component: List[str] | ||
ch_type: List[str] | ||
tracked_point: List[str] | ||
units: List[str] | ||
get_channel_units() | ||
} | ||
class EventData { | ||
name: List[str] | ||
onset: List[float] | ||
duration: List[float] | ||
trial_type: Optional[List[str]] = None | ||
} | ||
class RecordingData { | ||
name: str | ||
data: np.ndarray | ||
sampling_frequency: float | ||
times: np.1darray | ||
channels: ChannelData | ||
start_time: float | ||
types: List[str] | ||
GSD() | ||
ICD() | ||
} | ||
class MotionData { | ||
data: List[RecordingData] | ||
times: np.ndarray # Can be a 1D array representing timestamps | ||
info: List[FileInfo] | ||
ch_names: List[str] # Can be a list of channel names | ||
synchronise_recordings(self, systems: List[RecordingData]): | ||
} | ||
RecordingData --> MotionData: raw data with same sampling rate | ||
ChannelData --> RecordingData: info per channel | ||
EventData --> RecordingData: info about potential events | ||
FileInfo --> MotionData: indent on disk | ||
FileInfo --> ChannelData: info per channel | ||
FileInfo --> RecordingData: raw time series data | ||
FileInfo --> EventData: Include events if available in raw data | ||
RawData --> FileInfo: Get info from file | ||
``` | ||
|
||
This is the planned class structure for motion data. Data from any file format can ultimately be imported into the `MotionData` class. The `MotionData` object contains a `FileInfo` object. The `FileInfo` object contains information about the file, such as the subject ID, the task name, the project name and the file path. The `MotionData` class also contains a list of `RecordingData` objects. | ||
|
||
Each `RecordingData` object contains the raw data, the sampling rate, the time stamps and the channel info (`ChannelData`) of a tracking system. It is up to the user how to group the source data into a tracking system. | ||
The `RecordingData` object can also contain information about events. The `EventData` objects stores information about events such as onset or duration. | ||
|
||
The `ChannelData` object is used to store the channel name, the channel type, the channel units and the tracked point. | ||
|
||
::: utils.ngmt_data_classes |
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 |
---|---|---|
|
@@ -2,32 +2,16 @@ | |
|
||
Welcome to the NeuroGeriatricMotionToolbox (NGMT). We are a Python based toolbox for processing motion data. | ||
|
||
## Structure | ||
|
||
```markdown | ||
│ngmt <- Main folder. It is initialized as a Git | ||
│ repository with a reasonable .gitignore file. | ||
│ | ||
├── examples <- Various scripts, e.g. simulations, plotting, analysis, | ||
│ The scripts use the `ngmt` folder for their base code. | ||
| | ||
├── info <- Slides, Paper, basically any document related to the work in progress. | ||
│ | ||
├── ngmt <- Source code for use in this project. Contains functions, | ||
│ structures and modules that are used throughout | ||
│ the project and in multiple scripts. | ||
│ | ||
├── test <- Folder containing tests for `ngmt`. | ||
│ | ||
├── README.md <- Top-level README. | ||
├── LICENSE | ||
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g. | ||
│ generated with `pip freeze > requirements.txt`. Might be replaced by | ||
│ a `environment.yml` file for Anaconda. | ||
├── setup.py <- makes project pip installable (pip install -e .) so src can be imported | ||
| | ||
└── .gitignore <- focused on Python VS Code | ||
``` | ||
> The toolbox is currently under development and is not yet ready for use. | ||
The toolbox is aimed at a wide variety of motion researchers who want to use open souce software to process their data. | ||
We have implemented a wide variety of functions to process motion data, such as: | ||
|
||
- Gait sequence detection (GSD) | ||
- Inital contact detection (ICD) | ||
- More to follow ... | ||
|
||
The idea is that various motion data can be loaded into our dedicated dataclasses which rely on principles from the [Motion-BIDS](https://bids-specification.readthedocs.io/en/latest/modality-specific-files/motion.html) standard. | ||
|
||
## Relation of data classes | ||
```mermaid | ||
|
@@ -97,10 +81,27 @@ The `RecordingData` object can also contain information about events. The `Event | |
|
||
The `ChannelData` object is used to store the channel name, the channel type, the channel units and the tracked point. | ||
|
||
## Formatting | ||
The code uploaded here follows the latest black style guide. Please make sure to format your code accordingly before uploading it. | ||
To do this, install black with `pip install black` and run `black .` in the root directory of the project. | ||
## Documentation | ||
The full documentation can be found here. | ||
|
||
## Installation | ||
After the first release, the toolbox can be installed via pip | ||
|
||
For now, the toolbox can be installed via the following steps: | ||
1. Clone the repository | ||
2. Create a virtual environment | ||
3. Install the requirements | ||
4. Install the toolbox | ||
|
||
```bash | ||
git clone https://github.com/neurogeriatricskiel/NGMT.git | ||
cd NeuroGeriatricMotionToolbox | ||
python -m venv venv_ngmt | ||
source venv_ngmt/bin/activate | ||
pip install -r environment.yml | ||
pip install -e . | ||
``` | ||
|
||
## Authors | ||
|
||
[Masoud Abedinifar](https://github.com/masoudabedinifar), [Robbin Romijnders](https://github.com/rmndrs89) & [Julius Welzel](https://github.com/JuliusWelzel) | ||
[Masoud Abedinifar](https://github.com/masoudabedinifar), [Clint Hansen](mailto:[email protected]), [Robbin Romijnders](https://github.com/rmndrs89) & [Julius Welzel](https://github.com/JuliusWelzel) |
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