smoothing_ves: smoothing_ves

Description Usage Arguments Value Author(s) Examples

Description

Function to smooth the measurements of the apparent resistivity of a VES

Usage

1
2
smoothing_ves(ves, method = c("smooth.spline", "kernel.regression",
  "wavelet"), bw = 0.1, ...)

Arguments

ves

A Vertical Electric Sounding objet

method

A character string specifying the smoothing method. Currently the following methods are implemented:

  • smooth.spline

  • kernel.regression

bw

Bandwidth

...

Additional parameters required for the smoothing method

Value

This function returns a list with the following entries:

Author(s)

Oscar Garcia-Cabrejo khaors@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
library(ggplot2)
data("ves_data1")
ab2 <- ves_data1$ab2
apprho <- ves_data1$apprho
sev1a <- ves(id= "VES1", ab2 = ab2, apprho = apprho)
#Smoothing with smooth.spline
res.ss <- smoothing_ves(sev1a, method = "smooth.spline")
sev1ss <- ves(id = "Sounding 1-Smoothing Spline", ab2 = res.ss$ab2,
              apprho = res.ss$apprho)
rho <- c(40,70,30, 20)
thick <- c(2,10,50,500)
par0 <- c(rho, thick)
res.ss.nls <- calibrate_nls(sev1ss, par0, iterations = 20, trace = FALSE)
sev1ss$rhopar <- res.ss.nls$rho
sev1ss$thickpar <- res.ss.nls$thickness
sev1ss$interpreted <- TRUE
p1 <- plot(sev1ss, type = "ves")
p1 <- p1 + geom_point(aes(x = ab2, y = apprho), data = ves_data1)
print(p1)
#Smoothing with kernel regression
res.kr <- smoothing_ves(sev1a, method = "kernel.regression", bw = 0.5)
sev1kr <- ves(id = "Sounding 1-Kernel Regression", ab2 = res.kr$ab2,
              apprho = res.kr$apprho)
res.kr.nls <- calibrate_nls(sev1kr, par0, iterations = 20, trace = FALSE)
sev1kr$rhopar <- res.kr.nls$rho
sev1kr$thickpar <- res.kr.nls$thickness
sev1kr$interpreted <- TRUE
p2 <- plot(sev1kr, type = "ves")
p2 <- p2 + geom_point(aes(x = ab2, y = apprho), data = ves_data1)
print(p2)
#Smoothing using wavelet thresholding
res.wv <- smoothing_ves(sev1a, method = "wavelet")
sev1wv <- ves(id = "Sounding 1-Wavelet Thresholding", ab2 = res.wv$ab2,
              apprho = res.wv$apprho)
res.wv.nls <- calibrate_nls(sev1wv, par0, iterations = 20, trace = FALSE)
sev1wv$rhopar <- res.wv.nls$rho
sev1wv$thickpar <- res.wv.nls$thickness
sev1wv$interpreted <- TRUE
p3 <- plot(sev1wv, type = "ves")
p3 <- p3 + geom_point(aes(x = ab2, y = apprho), data = ves_data1)
print(p3)

khaors/rves documentation built on May 29, 2019, 3:07 a.m.