Given a quadratic 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.
warpWindowSP(
iw,
jw,
iheight,
jheight,
iddate,
jddate,
profile.size,
profile.height,
window.size = 0.3,
ddate.window.size = Inf,
...
)
matrix of integers indicating their row number (cf., ?row
)
matrix of integers indicating their column number (cf., ?col
)
matrix of query height filled into the columns of the matrix
matrix of ref height filled into the rows of the matrix
same as iheight, but containing deposition date information
same as jheight, but containing deposition date information
number of layers in each of the profiles (scalar)
snow height of the profiles (scalar)
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)
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
Note that the function is designed for cost matrices derived from pairs of snow profiles that have equal numbers
of layers (cf., resampleSPpairs). The function takes many matrix-like inputs, all of which need to be of the size
(profile.size x profile.size)
, i.e., square matrices of the size 'number of layers'.