Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] processEMG.m Inappropriate EMG Normalization #240

Open
bfregly opened this issue Jul 12, 2023 · 1 comment
Open

[BUG] processEMG.m Inappropriate EMG Normalization #240

bfregly opened this issue Jul 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@bfregly
Copy link
Contributor

bfregly commented Jul 12, 2023

Describe the bug
The function processEMG.m which is used in preprocessing normalizes EMG data to maximum value over the current motion cycle. This normalization means that the same EMG channel will be normalized by different values for different motion trials. We need to remove the EMG normalization line

% Normalize by maximum value for each channel
emgData = emgData ./ max(emgData, [], 2);

and allow the user to normalize EMG data to maximum value over MULTIPLE trials using any desired combination of processed EMG trials.

To Reproduce
Nothing to reproduce - just need to remove one line of code.

Expected behavior
Output EMG data will not be normalized

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: All
  • OpenSim Version: Any
  • MATLAB Version: Any
  • NMSM Pipeline Version: 1.0beta

Additional context
Add any other context about the problem here.

@bfregly bfregly added the bug Something isn't working label Jul 12, 2023
@cvhammond
Copy link
Member

processEMG.m should be run before splitIntoTrials.m so it normalizes over the entire motion not over the individual motion cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants