readGPR: Read a GPR data file

View source: R/readFiles.R

readGPRR Documentation

Read a GPR data file

Description

Note: argument fPath is depreacted. Use dsn instead.

Usage

readGPR(
  dsn,
  desc = "",
  dsn2 = NULL,
  format = NULL,
  Vmax = NULL,
  fPath,
  ch = 1,
  verbose = TRUE,
  interp_pos = TRUE,
  toUTM = TRUE,
  method = c("linear", "linear", "linear"),
  endian = .Platform$endian
)

Arguments

dsn

data source name: either the filepath to the GPR data (character), or an open file connection (can be a list of filepahts or open file connections)

desc

Short description of the file (character).

dsn2

deprecated

format

lenth-one character vector required if the file extension is not appearent in the filepath or the connection (either dt1, rad, dzt, sgy, iprb, txt, rds)

Vmax

length-one numeric vector: nominal analog input voltage used for the bits to volt transformation. It assumes that Vmin = -Vmax. If Vmax = NULL, the default values depending on the file format and given by the GPR device manufacturer will be used. If Vmax = FALSE, no bits to Volt transformation is applied (i.e., the bit values are returned).

fPath

Filepath (character). DEPRECATED. Use dsn instead.

ch

For multi-frequency GSSI files (*.dzt), which channel is red.

verbose

(boolean). If FALSE, all messages and warnings are suppressed (use with care).

interp_pos

logical: should the trace position be interpolated if possible? TRUE or FALSE

toUTM

logical: if TRUE project GPS coordinates (WGS84) to the corresponding UTM coordinate reference system.

method

A length-three character vector defining the interpolation methods (same methods as in signal::interp1: "linear", "nearest", "pchip", "cubic", and "spline"). First element for the interpolation of the inter-trace distances, second element for the interpolation of the horizontal trace positions, and third element for the interpolation of the vertical trace positions.

endian

The endian-ness ("big" or "little") of the target system for the file. Default value is .Platform$endian. If the endianness is not correct, RGPR will automatically detect it and try the other endianness. That means that it is not necessary to set the correct endianness (but if you do so, 'readGPR()' will be faster).

Details

Supported file format

  • Sensors & Software file format (*.dt1 , *.hd, *.gps). readGPR(dsn = 'xline.dt1')

  • MALA file format (*.rd3/*.rd7, *.rad, *.cor). readGPR(dsn = 'xline.rd3')

  • ImpulseRadar file format (*.iprb, *.iprh, *.cor, *.time). readGPR(dsn = 'xline.iprb')

  • GSSI file format (*.dzt, *.dzx, *.dzg). readGPR(dsn = 'xline.dzt')

  • Geomatrix Earth Science Ltd file format (*.sgpr). readGPR(dsn = 'xline.sgpr')

  • Transient Technologies (*.dat, *.hdr, *.gpt, *.gps).

  • IDS (*.dt, *.gec). readGPR(dsn = 'xline.dt')

  • SEG-Y file format (*.sgy/*.segy). readGPR(dsn = 'xline.sgy')

  • SEG-2 file format (*.sg2/*.seg2). readGPR(dsn = 'xline.sg2')

  • RadSys Zond GPR device (*.sgy). Note: it is not the SEG-Y file format). readGPR(dsn = 'xline.sgy')

  • US Radar (*.RA1*, *RA2*, *RAD*). readGPR(dsn = 'xline.RA1')

  • ASCII file format (*.txt): either 4-column format (x,t,amplitude) or matrix-format (without header/rownames). readGPR(dsn = 'xline.txt')

  • GPRmax file format (*.out): hdf5

  • R object file format (*rds). These files are created by saving the GPR object with writeGPR(x, fPath = 'xline.rds', type = "rds"). readGPR(dsn = 'xline.txt')

Value

The GPR data as object of the class RGPR.

GSSI files (*.dzt)

The first trace sample is constant and does not belong to the signal (no idea what is does mean). That is why RGPR removes the first sample of each trace. The second sample of each trace is used to indicate if there is a fiducial marker. RGPR extracts this information (maybe not always correctly) and removes the second sample of each trace. That is the reason why the *.dzt files exported by RGPR have two samples/trace less.

Mala files (*.rd3/rd7, *.rad)

RGPR check the dimension of the data against the number of traces and samples specified in the *.rad file and try to find the correct setup.

See Also

writeGPR

Examples

## Not run: 
# argument dsn is a file path
x1 <- readGPR(dsn = "data/RD3/DAT_0052.rd3")
y1 <- readGPR("data/FILE____050.DZT")

# argument dsn is a connection
con <- file("data/RD3/DAT_0052.rd3", "rb")   # binary mode
con2 <- file("data/RD3/DAT_0052.rad", "rt")  # text mode
x2 <- readGPR(dsn = con, dsn2 = con2)
close(con)
close(con2)

con <- file(dsn = "data/FILE____050.DZT", "rb")
y1 <- readGPR(con)
close(con)

## End(Not run)

emanuelhuber/RGPR documentation built on May 13, 2024, 9:31 p.m.