Skip to content

Commit

Permalink
Merge pull request #64 from GiacomoValliPhD/Towards_v0.1.0
Browse files Browse the repository at this point in the history
Towards v0.1.0
  • Loading branch information
GiacomoValliPhD authored Apr 5, 2024
2 parents ff21ee9 + 02bfc1e commit d464be6
Show file tree
Hide file tree
Showing 74 changed files with 7,305 additions and 3,358 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ openhdemg.egg-info/
openhdemg/.DS_Store
prove.py
prove_storage.py
openhdemg/tests/fixtures/*
!openhdemg/tests/fixtures/__init__.py
7 changes: 5 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ include LICENSE
include requirements.txt

# Add all the non .py files in openhdemg
include openhdemg/gui/gui_files/Icon.ico
include openhdemg/gui/gui_files/Icon_transp.ico
include openhdemg/gui/gui_files/Cite.png
include openhdemg/gui/gui_files/Contact.png
include openhdemg/gui/gui_files/Gear.png
include openhdemg/gui/gui_files/Info.png
include openhdemg/gui/gui_files/logo.png
include openhdemg/gui/gui_files/Logo_high_res.png
include openhdemg/gui/gui_files/Matrix.png
include openhdemg/gui/gui_files/Online.png
include openhdemg/gui/gui_files/Redirect.png
include openhdemg/gui/gui_files/Error.png
include openhdemg/gui/gui_files/gui_color_theme.json

include openhdemg/library/decomposed_test_files/otb_testfile.mat
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ python -m openhdemg.gui.openhdemg_gui

Once opened, it will look like this. It is cool, isn't it?

![gui_preview](https://www.giacomovalli.com/openhdemg/md_graphics/index/gui_preview.png)
![gui_preview](https://www.giacomovalli.com/openhdemg/md_graphics/index/gui_preview_v2.png)

## Why openhdemg
The *openhdemg* project was born in 2022 with the aim to provide the HD-EMG community with a free and open-source framework to analyse motor units' properties.
Expand Down
7 changes: 7 additions & 0 deletions docs/api_muap.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ This module contains functions to produce and analyse MUs anction potentials

<br/>

::: openhdemg.library.muap.estimate_cv_via_mle
options:
show_root_full_path: False
show_root_heading: True

<br/>

::: openhdemg.library.muap.MUcv_gui
options:
show_root_full_path: False
Expand Down
2 changes: 1 addition & 1 deletion docs/cite-us.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
If you use *openhdemg* for your reaserch, please cite our [tutorial article](/isek_jek_tutorials/#jek-tutorial-article). Any citation will help us to continue our work.
If you use *openhdemg* for your reaserch, please cite our [tutorial article](isek_jek_tutorials.md#jek-tutorial-article). Any citation will help us to continue our work.

Cite us as:

Expand Down
39 changes: 24 additions & 15 deletions docs/gui_advanced.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,56 @@
# Graphical Interface

This is the toturial for the `Advanced Tools` in the *openhdemg* GUI. Great that you made it this far! In the next few sections we will take a look at the more advanced functions implemented in the GUI. But first of all, you need to click the `Advanced Tools`button in the main window of the GUI to get to the respective adavanced analysis. The `Advanced Tools Window` will open.
This is the toturial for the `Advanced Tools` in the *openhdemg* GUI. Great that you made it this far! In the next few sections we will take a look at the more advanced functions implemented in the GUI. But first of all, you need to click the `Advanced Tools` button in the main window of the GUI to get to the respective adavanced analysis. The `Advanced Tools Window` will open.

![advanced_analysis](md_graphics/gui/advanced_tools_window_v2.png)

Please note, the `Advanced Tools` might not be available for all the files, as some of them might not have a sufficient number of electrodes to directly perform the advanced analyses. If you want to use the advanced tools anyway, you can still do so from the library.

![advanced_analysis](md_graphics/gui/advanced_analysis_window.png)
## Start a Specific Tool

So far, we have included three advanced analyses in the *openhdemg* GUI.

- `Motor Unit Tracking`
- `Duplicate Removal`
- `Conduction Velocity Estimation`

For all of those, the specification of a `Matrix Orientation` and a `Matrix Code` is required. The `Matrix Orientaion` must match the one of your matrix during acquisition. You can find a reference image for the `Orientation` at the bottom in the right side of the `Plot Window` when using the `Plot EMG`function. The `Matrix Orientation` can be either **0** or **180** and must be chosen from the dropdown list.
For all of those, the specification of a `Matrix Code` and a `Matrix Orientation` is required.

The `Matrix Code` must be specified according to the one you used during acquisition. So far, the implemented codes are:

The `Matrix Code` must be specified according to the one you used during acquisition. So far, the codes
- `Custom order`
- `None`
- `GR08MM1305`
- `GR04MM1305`
- `GR10MM0808`

- `GR08MM1305`
- `GR04MM1305`
- `GR10MM0808`
- `None`
In case you selected `Custom order`, you must also specify the custom order in the GUI settings. Please refer to [this tutorial](gui_settings.md/#electrodes) for further instructions on how to do so.

are implemented. You must choose one from the respective dropdown list. In case you selected `None`, the entrybox `Rows, Columns` will appear. Please specify the number of rows and columns of your used matrix since you now bypass included matrix codes. `Orientation` is ignored when `Matrix Code` is `None`. In example, specifying
In case you selected `None`, the entrybox `Rows, Columns` will appear. Please specify the number of rows and columns of your used matrix since you now bypass included matrix codes. In example, specifying

```Python
Rows, Columns: 13, 5
```
means that your File has 65 channels.
means that your File has 65 channels organised over 13 rows and 5 columns.

If you selected one of the built-in sorting orders (e.g., `GR08MM1305`, `GR04MM1305`, `GR10MM0808`), you need to specify also the `Orientation` in row two and column four in the left side of the `Plot Window`. The `Orientaion` must match the one of your matrix during acquisition. You can find a reference image for the `Orientation` at the bottom in the right side of the `Plot Window`. `Orientation` is ignored when `Matrix Code` is `None` or `Custom order`.

Once you specified these parameter, you can click the `Advaned Analysis` button to start your analysis.

-----------------------------------------

## Motor Unit Tracking
When you want to track MUs across two different files, you need to select the `Motor Unit Tracking` options and specify the `Matrix Code` and `Matrix Orentation` in the `Advanced Tools Window`. Once you clicked the `Advanced Analysis` button, the `MUs Tracking Window` will pop-up.

![mus_tracking](md_graphics/gui/mu_tracking_window.png)
When you want to track MUs across two different files, you need to select the `Motor Unit Tracking` option and specify the `Matrix Code` and `Matrix Orentation` in the `Advanced Tools Window`. Once you clicked the `Advanced Analysis` button, the `MUs Tracking Window` will pop-up.

![mus_tracking](md_graphics/gui/mu_tracking_window_v2.png)

1. You need to specify the `Type of file` you want to track MUs across in the respective dropdown. The available filetypes are:

- `OTB` (.mat file exportable by OTBiolab+)
- `DEMUSE` (.mat file used in DEMUSE)
- `OPENHDEMG` (emgfile or reference signal stored in .json format)
- `CUSTOMCSV` (custom data from a .csv file)
- `OTB` (.mat file exportable by OTBiolab+)
- `DEMUSE` (.mat file used in DEMUSE)

Each filetype corresponds to a distinct datatype that should match the file you want to analyse. So, select the **Type of file** corresponding to the type of your file. In case you selected `OTB`, specify the `extension factor` in the dropdown.

Expand All @@ -61,9 +69,10 @@ When you want to track MUs across two different files, you need to select the `M
8. By clicking the `Track` button, you can start the analysis. The tracking results will be displayed in the `MUs Tracking Resul` output in the right side of the `MUs Tracking Window`.

## Duplicate Removal

When you want to remove MUs duplicates across different files, you need to select the `Duplicate Removal` options and specify the `Matrix Code` and `Matrix Orentation` in the `Advanced Tools Window`. Once you clicked the `Advanced Analysis` button, the `Duplicate Removal Window` will pop-up. `Duplicate Removal` requires similar input as `Motor Unit Tracking`, so please take a look at the [`Motor Unit Tracking`](#motor-unit-tracking) section. However, you need to do two more things.

![duplicate_removal](md_graphics/gui/duplicate_removal_window.png)
![duplicate_removal](md_graphics/gui/duplicate_removal_window_v2.png)

1. You should specify How to remove the duplicated MUs in the `Which` dropdown. You can choose between

Expand Down
Loading

0 comments on commit d464be6

Please sign in to comment.