gallvp / emggo Goto Github PK
View Code? Open in Web Editor NEWA toolbox for offline muscle activity onset/offset detection in multi-channel EMG data.
License: MIT License
A toolbox for offline muscle activity onset/offset detection in multi-channel EMG data.
License: MIT License
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,
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
Line 75 in 2e71bc9
However, in editFunc the processed data is fed in meaning that a number of channels are fed at once. Meaning that
Line 75 in 2e71bc9
Do you know how to go on about this problem?
Please let me know,
Thank you,
Kind regards,
Yong Kim
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.
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?
>> 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.
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)
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
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?
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?
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.