Hyperbola fitting


Note:

Table of Contents

Objectives of this tutorial

Note that his tutorial will not explain you the math/algorithms behind the different processing methods.

Preliminary

Install/load RGPR

# install "devtools" if not already done
if(!require("devtools")) install.packages("devtools")
devtools::install_github("emanuelhuber/RGPR")
library(RGPR)       # load RGPR in the current R session

The GPR data

RPGR comes along with a GPR data called frenkeLine00. Because this name is long, we set x equal to frenkeLine00:

x <- frenkeLine00
plot(x)

plot(x)

Basic processing

We apply some basic processing to the data with the pipe operator (%>%):

x <- x %>%  estimateTime0(w = 5, method = "MER", FUN = mean) %>%
     time0Cor(method = "pchip")  %>%
     dewow(type = "Gaussian", w = 5)  %>%
     fFilter(f = c(200, 300), type = "low") %>%
     gainSEC(a = 0.003, t0 = 50)

plot(x)

proc

Hyperbola fitting

Interactive point selection and hyperbola fitting

Select points interactively on the plot with

xy <- locator(type = "l")
## $x
## [1] 11.8 15.0 17.7 20.3 24.4 27.4 30.9 35.2
##
## $y
## [1] 142.2 119.8 107.7  99.5  97.5 105.6 120.9 138.1

Fit the corresponding hyperbola with the function hyperbolaFit():

hyp <- hyperbolaFit(xy)

hyperbolaFit() returns:

Plot the fitted hyperbola

plot1a

plot1b

plot1c

Plot an hyperbola defined by its vertex position and the root-mean-square velocity

Define the hyperbola parameters

hyp2 <- list(x0 = hyp$x0, t0 = hyp$t0, vrms = hyp$vrms)

Plot the hyperbola

plot(x)
points(hyp$x0, hyp$t0, pch = 20, col = "red", cex = 1.3)
hyperbolaPlot(hyp2, col = "blue", lwd = 2, ann = TRUE)

hyp_parameters_plot

Simulate an hyperbola

sim1

sim2