# Plot GPR data

Note:

• This R-package is still in development, and therefore some of the functions may change in a near future.
• If you have any questions, comments or suggestions, feel free to contact me (in english, french or german): emanuel.huber@alumni.ethz.ch.

# Objectives of this tutorial

• Learn how to plot GPR data.

## 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 A equal to frenkeLine00:

x <- frenkeLine00
x

## *** Class GPR ***
##  name        = LINE00
##  filepath    = data-raw/LINE00.DT1
##  1 fiducial(s)
##  description =
##  survey date = 2014-04-25
##  Reflection, 100 MHz, Window length = 399.6 ns, dz = 0.4 ns
##  223 traces, 55.5 m
##  ****************


# Plot the GPR data

To plot the GPR record as a raster image (default mode), enter

plot(x)


The green line indicates the position of time-zero. The yellow triangle indicates the position of a fiducial marker that was set during the survey to mark something (such as a specific object close to the GPR line, a change in morphology/topography/sedimentology or an intersection with another GPR line). These markers are very useful to add topographic data to the GPR profile, particularly when the fiducial markers correspond to the locations where the (x,y,z) coordinates were measured.

Plot wiggles

plot(x, type = "wiggles")


To plot only a part of the GPR data, use xlim and ylim.

plot(x, ylim = c(50, 100), xlim = c(30, 40))


To set the origin of the vertical axis at time-zero, set the argument relTime0 equal to TRUE.

plot(x, relTime0 = TRUE, ylim = c(0, 200), xlim = c(30, 50))


Another way to plot only a part of the GPR data is to extract a part of the GPR data. The object A can be manipulated in the same way as a matrix without losing the meta-data (e.g., trace coordinates, antenna separation).

To extract the samples 100 to 300 of the $15^{th}$ to $150^{th}$:

# extract the 100 to 300 samples of the traces 15 to 150
x0 <- x[100:300, 15:150]
x

## *** Class GPR ***
##  name        = LINE00
##  filepath    = data-raw/LINE00.DT1
##  1 fiducial(s)
##  description =
##  survey date = 2014-04-25
##  Reflection, 100 MHz, Window length = 399.6 ns, dz = 0.4 ns
##  223 traces, 55.5 m
##  ****************

x0

## *** Class GPR ***
##  name        = LINE00
##  filepath    = data-raw/LINE00.DT1
##  description =
##  survey date = 2014-04-25
##  Reflection, 100 MHz, Window length = 80 ns, dz = 0.4 ns
##  136 traces, 33.75 m
##  ****************


Check the depth/time and positions values

depth(x)
pos(x)


Plot a section/subset of the GPR record (like zooming)

# plot the 100 to 300 samples of the traces 15 to 150
plot(x[100:300, 15:150])


## 1D plot

### Single trace plot

Plot a signal trace, notice that the signal is clipped to $\pm50\,mV$ (between $0$ and $20\,ns$):

plot(x[, 15])      # plot the 15th trace of the GPR-line


Note: the @3.5m in the plot title indicate the relative position of the trace on the GPR profile.

To add another trace, use the function lines()

plot(x[, 15])      # plot the 15th trace of the GPR-line
lines(x[, 16], col = "red", lwd = 2)


Plot the first 40 trace samples:

# plot the first 40 samples of the 15th trace of the GPR profile
plot(x[1:40, 15])


### Multiple trace plot

Plot all the traces within a single plot:

trPlot(x, col = rgb(0.2, 0.2, 0.2, 7/100))     # plot all the traces


trPlot(x, col = rgb(0.2, 0.2, 0.2, 7/100))     # plot all the traces
lines(traceStat(x), lwd = "2", col = "red")


## Frequency plots

### Frequency/Phase-Amplitude (1D)

Let’s have a look at the amplitude-frequency and phase-frequency plot (the spectrum given by the Fourier decomposition):

spec(x)


## Frequency-wavenumber filter (f-k-filter)

The function spec() with the argument type = "f-k returns a list containing the frequencies (f), the wavenumbers (k), the amplitude of the GPR data.

spec(x, type = "f-k")


Check the help for more details on the plot() function:
?plot.GPR