Git Product home page Git Product logo

emggo's Introduction

emggo's People

Contributors

gallvp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

emggo's Issues

AutoTune Function

Thank you Usman,

I am quite curious about your "AutoTune" function. I am trying to utilise this function but I am not too sure if I understood this correctly.

I should apply this function after Onset/offsets have been adjusted either by manually or using the "AutoFind". However, if I adjusted Onsets/offsets using the function, the corresponding parameters are already updated. Therefore, if I adjusted the dataset manually which does not update the parameters so I should then use this function to apply the parameter settings shoudln't I?

Originally posted by @ykuk0906 in #3 (comment)

GUI: Applying Algorithm Parameters to Multiple Channels

I am trying to run your code under for loop with the appropriate parameter settings.

The detection works smoothly, which is amazing. However, I have a question regards to running the code with for loop.

The for loop will not go through to the next section unless I close the figure manually, is there a way for me to change this setting?

I would like to change this setting so that it goes through every data with 14 channels, figures being saved and closed so that the next data can be processed.

If this is possible, let me know.

Thank you,

Pipeline for Process

Dear Usman,

I am not too sure whether I am correct with this problem, but using the edit function may only work for one channel of EMG.

For instance, I have four channels of EMG to edit and if this can be manually adjusted on emgEventsDetectTool as the vars.channelNum gets updated for emgEventsManageTool hence having only one index for

vars.eventMarkerY = (max(vars.emgData) - min(vars.emgData)) / 4;

However, in editFunc the processed data is fed in meaning that a number of channels are fed at once. Meaning that

vars.eventMarkerY = (max(vars.emgData) - min(vars.emgData)) / 4;
, the Index exceeds the number of array elements as vars.eventMarkerY only has value for the first channel.

Do you know how to go on about this problem?

Please let me know,

Thank you,

Kind regards,

Yong Kim

Troubleshooting the rank order logic in the estimateBaseline function

Inside the emgGO/algorithms/extendedDTA/estimateBaseline.m function, a rank order is created from the movingAverages of the input signal. Following logic is used to do so:

% Take the moving average of the signal
movingAverage = movmean(abs(inputSignal), baselineLength, 'Endpoints', 'discard');

% Create a rank order of the moving averages
% Make sure moving average is a double
movingAverage = double(movingAverage);
% Round the moving average to 10 decimal places
movingAverage = round(movingAverage, 10);
% Run the uniquetol function with default tolerance of 1e-12
[~, IA, ~] = uniquetol(movingAverage);

In the past a different logic was used to create the rank order resulting in bugs. It is hoped that the above logic solves this problem. To troubleshoot this logic in case of new bugs, following plot can be used.

plot(movingAverage(IA));

If the rank order logic is working properly, the result of the above command should look like the one shown below. It should be a monotonically increasing trend. The reason being that the rank order is returned in ascending order, and, thus, should rank the movingAverage vector as such.

rankOder_diag

Optimization Toolboxes

>> plotEMG(EMG);
>> EMG.channelData=filterStream(EMG.channelData,EMG.fs,2,100,10,1);
>> plotEMG(EMG);
>> [resultEmg,optimalParams]=emgEventsDetectTool(EMG);
Error using optimoptions (line 124)
Invalid solver specified. Provide a solver name or handle (such as 'fmincon' or
@fminunc).
Type DOC OPTIMOPTIONS for a list of solvers.

Error in autoFindActivations (line 58)
        optimOptions = optimoptions('particleswarm',...

Error in emgEventsDetectTool/autoFind (line 289)
        paramsVector = autoFindActivations(vars.channelStream(:, vars.channelNum),
        vars.fs,...
 
Error using uiwait (line 81)
Error while evaluating UIControl Callback.

Rectification and Filtering Procedures

Dear Rashid,

Your emgGo is an awesome work and definitely helpful, but there are some parts I do not quite understand. If you could help me out, this will be helpful!

In the paper published(2.2.1)

This rectified signal was then passed through a moving average filter with a window length of Lb seconds. Using this moving average of the rectified signal, a baseline segment of length Lb seconds was selected from the rectified sEMG signal such that the rank of the corresponding moving average was Kbth

  1. Where is the rectification of the signal performed? is it here?

https://github.com/ykuk0906/emgGO/blob/2d19ea978428883178cba1faa9f39aca6b88ad63/emgEventsDetectTool.m#L337-L343

In addition, it is said that it is passed through a moving average filter but in the code, I cannot quite find where this is happening, could you point it out to me perhaps?

  1. The length of Lb seconds is mentioned twice, a window length and a baseline segment of length Lb, I do not quite understand how the value of Lb is selected, for the window length is it the length of the data or do you arbitrarily choose the value? if so, where is this carried out?

  2. Lastly,

the rank of the corresponding moving average was Kbth

I assume this is performed in filterstream(), where Butterworth filter and **filtfilt() **is carried out twice. However, I do not quite understand the steps of the process. How do you determine the value of K? is this the coefficient we get after running the filtfilt()?

https://github.com/ykuk0906/emgGO/blob/2d19ea978428883178cba1faa9f39aca6b88ad63/Helpers/filterStream.m#L35-L41

Thank you for your help in advance!

Applying algorithm to linear envelope

Hi,

First of all, thanks for sharing your GUI! It looks great and everything is working. However, when I use my EMG data it just does not identifies the right on- and offset moments of muscle activation. When I tried importing the linear envelope of my EMG data, it works quite well at first glance (in my opinion). Do you know if using the linear envelope will distort my outcomes?
Schermafbeelding 2023-02-06 120307
Schermafbeelding 2023-02-06 115854

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.