Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/onoff_singlethres.R
Automatic detection algorithm to determine the times at which muscles “turn on” (activity periods) and “turn off” (silence periods) in an EMG signal.
1 | onoff_singlethres(data, channel, eemg, t = 0.05, data.name)
|
data |
an ‘emg’ object. |
channel |
in case of multi-channel data, |
eemg |
an ‘emg’ object containing an envelope. |
t |
a threshold value to determine if a datum reresent activity (above the threshold) or silence (below the threshold) in a signal. |
data.name |
a string specifying the name of the variable which will appears on the plots. If empty or not provided is taken from the object given as |
In this procedure, on and off time estimation is determined by the times at which the envelope of the signal (eemg
or determined using envelope
) exceeds a threshold.
A numeric vector with values 0 (silence) and 1 (activity).
J.A. Guerrero jaguerrero@correo.uaa.mx
Rose W. (2014) Electromyogram Analysis. Mathematics and Signal Processing for Biomechanics. http://www.udel.edu/biology/rosewc/kaap686/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Load a data.frame with EMG data
data(emg95306000)
# Coerce a data.frame into an 'emg' object
x <- as.emg(emg95306000, samplingrate = 1000, units = "mV")
# change graphical parameters to show multiple plots
op <- par(mfrow = c(2, 1))
# Detect the phases of activation in x
b <- onoff_singlethres(x, t = 0.1)
# Plot 'x' and the detected phases
plot(x, main = "Sample EMG")
plot(b, type = "l", main = "Detected phases (single thresholding)")
# reset graphical parameters
par(op)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.