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.