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.
For developers: Including new variables in the output of warped profiles can easily be done by inserting a respective command
at the end of this function. There are many example variables added already.