Learn R Programming

musclesyneRgies (version 1.2.5)

normEMG: To time-normalise filtered EMG

Description

To time-normalise filtered EMG

Usage

normEMG(x, trim = TRUE, cy_max = NA, cycle_div = NA)

Value

Object of class EMG with elements:

  • cycles data frame containing cycle timings, with as many columns as many cycle subdivisions are wanted

  • emg data frame containing filtered and time-normalised EMG data in columns, first column is time

Arguments

x

Object of class EMG with elements cycles and emg

trim

Logical: should first and last cycle be trimmed to remove filtering effects?

cy_max

Maximum number of cycles to be considered

cycle_div

A vector or one dimensional array with the number of points each cycle should be normalised to

Details

Lists in the correct format can be created with the function rawdata(). The first column of each emg element must be time in the same units as those used for cycles (e.g., [s] or [ms]).

References

Santuz, A., Ekizos, A., Janshen, L., Baltzopoulos, V. & Arampatzis, A. On the Methodological Implications of Extracting Muscle Synergies from Human Locomotion. Int. J. Neural Syst. 27, 1750007 (2017).

Examples

Run this code
# Load some data
data("RAW_DATA")
# Filter raw EMG
filtered_EMG <- lapply(RAW_DATA, function(x) {
  filtEMG(x, HPf = 50, HPo = 4, LPf = 20, LPo = 4)
})
# Time-normalise filtered EMG, including three cycles and trimming first and last
filt_norm_EMG <- lapply(filtered_EMG, function(x) {
  normEMG(
  x,
  cy_max = 3,
  cycle_div = c(100, 100))
})

Run the code above in your browser using DataLab