Aligns waveforms by estimating and removing phase variation. Uses landmark registration or continuous registration.
Usage
registerCurves(
x,
method = c("continuous", "landmark"),
landmarks = NULL,
template = NULL
)Value
A list containing:
- registered
Registered waveforms
- warping
Warping functions
- template
Template used for registration
Details
Phase variation (timing differences) can obscure amplitude differences in biomechanical data. Registration separates phase and amplitude variation.
See also
fPCA() for functional PCA after registration,
plotGaitCycle() (in PhysioMoCap) for plotting registered gait waveforms.
Examples
# Simulate data with phase variation
set.seed(123)
t <- seq(0, 100, length.out = 100)
data <- sapply(1:20, function(i) {
phase_shift <- rnorm(1, 0, 10)
t_shifted <- t + phase_shift
sin(2 * pi * t_shifted / 100) * 30 + rnorm(100, 0, 2)
})
pe <- PhysioExperiment(assays = list(values = data), samplingRate = 100)
reg_result <- registerCurves(pe, method = "continuous")