Skip to content

Commit

Permalink
reordering of example
Browse files Browse the repository at this point in the history
  • Loading branch information
masoudabedinifar committed Nov 13, 2024
1 parent 7026ba2 commit 3a21b36
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Tutorial: Load data into an `KielMATRecording` object

**Author:** Julius Welzel

**Last update:** Fri 22 Mar 2024

## Learning objectives
By the end of this tutorial:

- you can load data and channel information into an `KielMATRecording` object
- you can add Recording specific information to the `KielMATRecording` object
- you are educated about the relationship between a `KielMATRecording` object and the [BIDS standard](https://bids-specification.readthedocs.io/en/stable/).
Expand Down Expand Up @@ -141,7 +143,7 @@ print(recording.events)



![png](basic_00_load_Data_into_KielMAT_files/basic_00_load_Data_into_KielMAT_1.png)
![png](basic_01_load_Data_into_KielMAT_files/basic_01_load_Data_into_KielMAT_1.png)



Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ This section contains a series of examples designed to demonstrate key features

The `DataClass` is the central data structure in KielMAT, which stores and organizes motion data along with associated events. The following examples guide you through the process of loading and structuring your data.

### [Example 1: Load data into KielMAT](basic_00_load_Data_into_KielMAT.md)
### [Example 1: Load data into KielMAT](basic_01_load_Data_into_KielMAT.md)
In this example, you will learn how to load motion data into `KielMAT`'s `DataClass`. This step is essential for processing any motion capture data, whether it's from IMUs, C3D files, or other data formats.

### [Example 2: Load datasets](basic_01_load_dataset.md)
### [Example 2: Load datasets](basic_02_load_dataset.md)
This example demonstrates how to load datasets into `KielMAT`. You will learn how to import data from different sources, handle multiple datasets, and integrate them into a unified structure for analysis.

### [Example 3: Events in DataClass](basic_02_events.md)
### [Example 3: Events in DataClass](basic_03_events.md)
The `DataClass` not only stores motion data but also provides functionality to mark and organize events (such as gait sequences, initial contacts, or other notable movement occurrences). This example shows how to tag specific events within the `DataClass`, allowing you to analyze them in the context of the motion data.

## Run Modules

KielMAT includes several pre-built modules to analyze motion data for different tasks. The following examples demonstrate how to apply each module to extract meaningful information from your data.

### [Example 1: Gait Sequence Detection](modules_01_gsd.md)
### [Example 4: Gait Sequence Detection](modules_04_gsd.md)
This example introduces the [Gait Sequence Detection](https://neurogeriatricskiel.github.io/KielMAT/modules/gsd/) module. This module identifies gait sequences using 3D accelerometer data from a lower back sensor.

### [Example 2: Initial Contact Detection](modules_02_icd.md)
### [Example 5: Initial Contact Detection](modules_05_icd.md)
This example introduces the [Initial Contact Detection](https://neurogeriatricskiel.github.io/KielMAT/modules/icd/) module. It identifies and characterizes initial contacts within each detected gait sequence using the gait sequence detection module.

### [Example 3: Physical Activity Monitoring](modules_03_pam.md)
### [Example 6: Physical Activity Monitoring](modules_06_pam.md)
This example introduces the [Physical Activity Monitoring](https://neurogeriatricskiel.github.io/KielMAT/modules/pam/) module. The example shows how the module is implemented on sample 3D acceleration data from an IMU sensor to monitor physical activity levels.

### [Example 4: Postural Transition Detection](modules_04_ptd.md)
### [Example 7: Postural Transition Detection](modules_07_ptd.md)
This example introduces the [Postural Transition Detection](https://neurogeriatricskiel.github.io/KielMAT/modules/ptd/) module. It demonstrates how the module is implemented on sample 3D acceleration and 3D angular velocity data from a lower back IMU sensor to detect postural transitions, such as sit-to-stand or stand-to-sit.

### [Example 5: Turn Detection](modules_05_td.md)
### [Example 8: Turn Detection](modules_08_td.md)
This example introduces the [Turn Detection](https://neurogeriatricskiel.github.io/KielMAT/modules/td/) module. It demonstrates how the module is implemented on sample 3D acceleration and 3D angular velocity data from a lower back IMU sensor to detect turns.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ plt.show()



![](modules_01_gsd_files/modules_01_gsd_7_0.png)
![](modules_04_gsd_files/modules_04_gsd_7_0.png)



Expand Down Expand Up @@ -210,7 +210,7 @@ plt.show()



![](modules_01_gsd_files/modules_01_gsd_9_0.png)
![](modules_04_gsd_files/modules_04_gsd_9_0.png)



Expand Down Expand Up @@ -250,7 +250,7 @@ print(recording.events)



![](modules_01_gsd_files/modules_01_gsd_11_1.png)
![](modules_04_gsd_files/modules_04_gsd_11_1.png)



Expand Down Expand Up @@ -352,6 +352,6 @@ plt.show()



![](modules_01_gsd_files/modules_01_gsd_13_1.png)
![](modules_04_gsd_files/modules_04_gsd_13_1.png)


Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ plt.show()



![png](modules_02_icd_files/modules_02_icd_8_0.png)
![png](modules_05_icd_files/modules_05_icd_8_0.png)



Expand Down Expand Up @@ -326,6 +326,6 @@ plt.show()



![png](modules_02_icd_files/modules_02_icd_14_1.png)
![png](modules_05_icd_files/modules_05_icd_14_1.png)


File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ fig.tight_layout()
plt.show()
```

![](modules_04_ptd_files/04_tutorial_postural_transition_detection_1.png)
![](modules_07_ptd_files/07_tutorial_postural_transition_detection_1.png)


## Applying Pham Postural Transition Detection Algorithm
Expand Down Expand Up @@ -253,7 +253,7 @@ pham = pham.detect(
plot_results=True,
)
```
![](modules_04_ptd_files/04_tutorial_postural_transition_detection_2.png)
![](modules_07_ptd_files/07_tutorial_postural_transition_detection_2.png)

The outputs are stored in the `postural_transitions_` attribute, which is a pandas DataFrame in BIDS format with the following columns:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fig.tight_layout()
plt.show()
```

![](modules_05_td_files/modules_05_td_1.png)
![](modules_08_td_files/modules_08_td_1.png)


## Applying Pham Turn Detection Algorithm
Expand Down Expand Up @@ -254,7 +254,7 @@ pham = pham.detect(
plot_results=True,
)
```
![](modules_05_td_files/modules_05_td_2.png)
![](modules_08_td_files/modules_08_td_2.png)

The outputs are stored in the 'turns_' attribute, which is a pandas DataFrame in BIDS format with the following columns:

Expand Down
16 changes: 8 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ nav:
- Home: index.md
- Examples:
- examples/index.md
- Load data into KielMAT: examples/basic_00_load_Data_into_KielMAT.md
- Load datasets: examples/basic_01_load_dataset.md
- Events in dataclass: examples/basic_02_events.md
- Gait Sequence Detection: examples/modules_01_gsd.md
- Initial Contact Detection: examples/modules_02_icd.md
- Physical Activity Monitoring: examples/modules_03_pam.md
- Postural Transition Detection: examples/modules_04_ptd.md
- Turn Detection: examples/modules_05_td.md
- Load data into KielMAT: examples/basic_01_load_Data_into_KielMAT.md
- Load datasets: examples/basic_02_load_dataset.md
- Events in dataclass: examples/basic_03_events.md
- Gait Sequence Detection: examples/modules_04_gsd.md
- Initial Contact Detection: examples/modules_05_icd.md
- Physical Activity Monitoring: examples/modules_06_pam.md
- Postural Transition Detection: examples/modules_07_ptd.md
- Turn Detection: examples/modules_08_td.md
- Dataclass: dataclass.md
- Modules:
- modules/index.md
Expand Down

0 comments on commit 3a21b36

Please sign in to comment.