A Modified DTW Algorithm for Stratigraphic Time Series Alignment
A dynamic time warping (DTW) algorithm for stratigraphic alignment, translated into R from the original published 'MATLAB' code by Hay et al. (2019) <doi:10.1130/G46019.1>. The DTW algorithm incorporates two geologically relevant parameters (g and edge) for augmenting the typical DTW cost matrix, allowing for a range of sedimentologic and chronologic conditions to be explored, as well as the generation of an alignment library (as opposed to a single alignment solution). The g parameter relates to the relative sediment accumulation rate between the two time series records, while the edge parameter relates to the amount of total shared time between the records. Note that this algorithm is used for all DTW alignments in the Align Shiny application, detailed in Hagen et al. (in review).