warpWindowSP {sarp.snowprofile.alignment} | R Documentation |
Restrict the DTW warping window for snow profiles alignment
Description
Given a matrix, this function sets all elements of the matrix that are outside the so-called warping
window to NA
. The warping window is a slanted band of constant width around the main diagonal
(i.e., Sakoe-Chiba-band), and it's size can be controlled with function arguments.
Usage
warpWindowSP(
iw,
jw,
iheight,
jheight,
iddate,
jddate,
profile.size,
profile.height,
window.size = 0.3,
window.size.abs = NA,
ddate.window.size = Inf,
...
)
Arguments
iw |
matrix of integers indicating their row number (cf., |
jw |
matrix of integers indicating their column number (cf., |
iheight |
matrix of query height filled into the columns of the matrix |
jheight |
matrix of ref height filled into the rows of the matrix |
iddate |
same as iheight, but containing deposition date information (i.e., POSIXct data converted to numeric through matrix call!) |
jddate |
same as jheight, but containing deposition date information (i.e., POSIXct data converted to numeric through matrix call!) |
profile.size |
number of layers in the longer one of the two profiles (scalar) |
profile.height |
snow height of the deeper one of the two profiles (scalar) |
window.size |
percentage of profile.size or profile.height defining the size of the warping window (i.e., the most restrictive of the two will be applied) |
window.size.abs |
Instead of a |
ddate.window.size |
number of days that exclude layers from the warping window if their deposition dates differ by more than these days |
... |
unused—but important to be able to provide other warping functions to distMatSP |