Fix a discrepancy between the gear ratio of the motor arm used and the gear ratio recorded by software.
fix_GR(x, GR = 1)
Gear ratio, set to 1 by default
An object of the same class(es) as the input (
x). The function
Position by (1/GR) and multiply
Force by GR,
returning an object with new values in
Other columns and attributes are welcome and will simply be passed on
unchanged into the resulting object.
muscle_stim object can be of any type, including
If you have manually constructed the object via
muscle_stim object should have columns as follows:
Position: length change of the muscle;
Other tetanus functions:
library(workloopR) # import the workloop.ddf file included in workloopR wl_dat <-read_ddf(system.file("extdata", "workloop.ddf", package = 'workloopR'), phase_from_peak = TRUE) # apply a gear ratio correction of 2 # this will multiply Force by 2 and divide Position by 2 wl_fixed <- fix_GR(wl_dat, GR = 2) # quick check: max(wl_fixed$Force) / max(wl_dat$Force) # 5592.578 / 2796.289 = 2#>  2#>  0.5