After the DTW alignment of two profiles, the maps between the two profiles can be used to warp one profile onto the other profile. In other words, the layer thicknesses of the warped profile are adjusted to optimally align with the corresponding layers of the other profile.
DTW alignment object from dtwSP containing the two profiles (i.e., called
whom to warp? "query" (= "jmin"), "imin", "queryTopDown" (= "jminTopDown"), "iminTopDown", "ref"; if 'NA' the routine determines that itself from the structure of the alignment object. (see Details)
After this procedure, the thickness of some layers can be zero, which leads to the layers disappearing.
This function is automatically called in
dtwSP(..., keep.internals = TRUE) to warp the query profile
onto the reference profile.
Whom to warp: There exist 8 different options, 4 for warping the query onto the ref and 4 for vice versa. The 4 options for warping the query onto the ref are:
global alignment / partial alignment where entire query is matched to subsequence of ref ("jmin")
partial alignment where entire ref is matched to subsequence of query ("imin")
partial top down alignment where entire query is matched to subsequence of ref ("jminTopDown")
partial top down alignment where entire ref is matched to subsequence of query ("iminTopDown")
For the other case, warping the ref onto the query, only the equivalent of the first option is implemented.
Returns the input alignment object including the element alignment$queryWarped (or $referenceWarped), which are the warped snow profiles. The class of the alignment object is altered to "dtwSP", but still inherits "dtw".
1 2 3 4 5 6 7 8 9 10
## first align profiles alignment <- dtwSP(SPpairs$A_modeled, SPpairs$A_manual, open.end = FALSE) ## warp reference profile onto query profile: refWarped <- warpSP(alignment, whom = "ref")$referenceWarped opar <- par(no.readonly =TRUE) par(mfrow = c(1, 2)) plot(alignment$query, main = "query") plot(refWarped, main = "warped reference") par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.