View source: R/dynamic_extraction.R
dynamic_extraction | R Documentation |
Interactively select points in a wavelet scalogram to trace the upper and
lower period of an cycle. The dynamic_extraction
function plots a wavelet scalogram in which points peaks can selected
allowing one to track the lower and upper period of a cycle. First track the upper or lower period of the to
be extracted cycle and then track the other boundary. Tracking points can be selected in the Interactive interface and will be shown as white dots
connected by a black line. When one wants to deselect a point the white dots can be re-clicked/re-selected and will turn red which
indicates that the previously selected point is deselected. Deselecting points can be quite tricky.
After tracking the lower and upper boundaries of the cycle the dynamic_extraction
function
will extract the signal in between the boundaries. the output can then used as input for the
minimal_tuning
function to create an age model.
dynamic_extraction(
wavelet = NULL,
n.levels = 100,
add_peaks = FALSE,
periodlab = "Period (metres)",
x_lab = "depth (metres)",
palette_name = "rainbow",
color_brewer = "grDevices",
plot_horizontal = TRUE,
smooth = FALSE,
add_mean = TRUE
)
wavelet |
Wavelet object created using the |
n.levels |
Number of color levels |
add_peaks |
Setting which indicates whether spectral peaks should be
added to the tracking plot |
periodlab |
label for the y-axis |
x_lab |
label for the x-axis |
palette_name |
Name of the color palette which is used for plotting.
The color palettes than can be chosen depends on which the R package is specified in
the color_brewer parameter. The included R packages from which palettes can be chosen
from are; the 'RColorBrewer', 'grDevices', 'ColorRamps' and 'Viridis' R packages.
There are many options to choose from so please
read the documentation of these packages |
color_brewer |
Name of the R package from which the color palette is chosen from.
The included R packages from which palettes can be chosen
are; the RColorBrewer, grDevices, ColorRamps and Viridis R packages.
There are many options to choose from so please
read the documentation of these packages. " |
plot_horizontal |
plot the wavelet horizontal or vertical eg y axis is depth or y axis power |
smooth |
smooth the tracked period using the "loess_auto" function |
add_mean |
add the mean to the extracted signal |
Results of the tracking of a cycle in the wavelet spectra is a matrix with 3 columns. The first column is depth/time The second column is the extracted tracked cycle The third column is upper tracked period The fourth column is lower tracked period
The function is based/inspired on the traceFreq function of the 'astrochron' R package
Routines for astrochronologic testing, astronomical time scale construction, and time series analysis <doi:10.1016/j.earscirev.2018.11.015>
## Not run:
#Track the 405kyr upper and lower periods of the eccentricity cycle in the
#magnetic susceptibility record of the Sullivan core of Pas et al., (2018)
mag_wt <- analyze_wavelet(
data = mag,
dj = 1 / 100,
lowerPeriod = 0.1,
upperPeriod = 254,
verbose = FALSE,
omega_nr = 10
)
mag_ext <- dynamic_extraction(
wavelet = mag_wt,
n.levels = 100,
add_peaks = FALSE,
periodlab = "Period (metres)",
x_lab = "depth (metres)",
palette_name = "rainbow",
color_brewer = "grDevices",
plot_horizontal = TRUE,
smooth = TRUE,
add_mean = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.