Skip to content

z new classes (develop version)

Emanuel Huber edited this page May 23, 2019 · 36 revisions

Type of GPR data

  • reflection
  • CMP
  • WAR

Transformed data:

  • CMP Analysis
  • Tensor (Jxx, Jyy, Jxy)
  • f-x-spectrum (f-x, phase-x)
  • f-k-spectrum
  • x-k-spectrum
  • eigenimage (a1I1 + a2I2 + ...)
  • inst. phase/frequency

Class GPRvirtual

setClass(
  Class = "GPRvirtual",
  contains = "VIRTUAL",
  slots = c(
    version      = "character",  # class version
    name         = "character",  # data name
    desc         = "character",  # data description
    path         = "character",  # data file path
    mode         = "character",  # reflection/CMP/CMPAnalysis/spectrum
    signal       = "character",  # amplitude/semblance/energy/orientation
    date         = "Date",       # survey date (format %Y-%m-%d)
    freq         = "numeric",    # antenna frequency
    
    data         = "array",      # 
    
    spunit       = "character",  # spatial unit
    crs          = "CRS",        # coordinate reference system of @coord
    # ? coordref = "numeric",    # coordinates references
    
    z            = "numeric",    # depth/time position (vertical)
    zunit        = "character",  # time/depth unit

    vel          = "function",   # velocity model (function of x, y, z)

    proc         = "list",       # processing steps
    delineations = "list",       # delineations
    hd           = "list"        # data from header file/meta-data
  )
)
  • slot `@signal' (what is measured, computed):
    • amplitude
    • phase
    • coherency
    • semblance
    • energy
    • orientation
    • anisotropy...
  • slot @mode to distinguish between:
    • ampl = f(depth, pos) -> relfection
    • ampl = f(depth, velocity) -> CMP/WARR
    • ampl = f(depth, antenna separation) -> CMPAnalysis
    • ampl = f(freq/phase, pos) -> f-x
    • ampl = f(depth, wavenumber/phase) f-k
    • ampl = f(freq/phase, wavenumber/phase) phase-x, ...

Empty slots:

  • @date: as.Date(NA) -> check = is.na(@date)
  • @crs: CRS() -> check = identical(x, CRS())
  • @name: character(0) -> check = length(@name) == 0
  • @freq: numeric(0) -> check = length(@freq) == 0
  • @data: array(0, dim = c(0,0,0)) -> check = length(@data) == 0
  • @proc: list() -> check = length(@proc) == 0
  • matrix(nrow = 0, ncol = 0) -> length(mat) == 0

Class GPR

setClass(
  Class = "GPR",
  contains = "GPRvirtual"

  slots = c(  
    # x            = "numeric",    # trace position
    time0        = "numeric",    # time-zero (first air-wave arrival)
    time         = "numeric",    # time of the trace recording
    antsep       = "numeric",    # antenna separation
    markers      = "character",  # fiducial marks/markers
    ann          = "character",  # annotation (e.g. intersections)
    
    coord        = "matrix",     # trace coordinates (x,y,z)
    rec          = "matrix",     # receiver coordinates (x,y,z)
    trans        = "matrix",     # transmitter coordinates (x,y,z)

    ypr          = "matrix       # yaw - pitch - roll
  )
)
if YLINE then
  set coord[, 2] <- xpos
else
  set coord[, 1] <- xpos

Class GPRstack

setClass(
  Class = "GPRstack",
  contains = "GPR"
  slots = c(
    formula  = "expression" # or "function" GPR = a*GPR1 + b*GPR2 + c*GPR3 + ....
  )
)

Class GPRcube

setClass(
  Class = "GPRcube",
  contains = "GPRvirtual",
  slots = c(

    x            = "numeric",    # trace position along x-axis
    y            = "numeric",    # trace position along y-axis
    time0        = "matrix",     # time-zero (first air-wave arrival)
    time         = "matrix",     # time of the trace recording
    antsep       = "matrix",     # antenna separation
    markers      = "matrix",     # mode = character, fiducial marks/markers
    ann          = "matrix",     # mode = character, annotation (e.g. intersections)
    
    coord        = "numeric",    # coordinate grid corner (x,y,z)
    transf       = "numeric",    # affine transformation parameters (or @rot??)    
  )
)

affine transformation parameters: check here

Class GPRslice

setClass(
  Class = "GPRslice",
  contains = "GPRcube"
)

Class GPRsurvey

setClass(
  Class="GPRsurvey",  
  slots=c(
    version  = "character",   # version of the class

    paths    = "character",   # filepath of the GPR data
    names    = "character",   # names of the GPR profiles
    desc     = "character",   # descriptions of the GPR profiles
    modes    = "character",   # survey mode (reflection/CMP)
    dates    = "Date",        # dates  of the GPR profiles
    antseps  = "numeric",     # antenna separation of the GPR profiles
    freqs    = "numeric",     # frequencies of the GPR profiles
    
    spunit   = "character",   # spatial unit   !!!length = 1!!!
    crs      = "CRS",         # coordinate reference system of @coords
    coords   = "list",        # (x,y,z) coordinates for each profiles
    intersec = "list",        # (x,y) position of the profile intersections
    # ? coordref = "numeric",  # coordinates references
    
    ntraces  = "integer",     # to control if nrow(@coord) == ncol(x[[i]])

    nz     = "integer",       # number of vertical samples
    dz     = "numeric",       # time/depth sampling
    zunit    = "character"    # time/depth unit   !!!length = 1!!!

    fids     = "list"          # fiducials of the GPR profiles
  )
)