trRmDuplicates: Remove traces with duplicated trace positions

trRmDuplicatesR Documentation

Remove traces with duplicated trace positions

Description

checks for duplicates trace positions (up to precision defined by 'tol') and remove them from 'x' (object of the class GPR or GPRsurvey). If there is a series of consecutive traces with an inter-distance smaller than the tolerance threshold defined by the computer precision, the function starts by removing traces every two traces and repeat the procedure until the trace inter-distances are larger that the threshold. Example with 5 traces:

  • distance between trace 1 and 2 < tol

  • distance between trace 2 and 3 < tol

  • distance between trace 3 and 4 < tol

  • distance between trace 4 and 5 < tol

The algorithm first remove trace 2 and 4 and recompute the inter-trace distances:

  • distance between trace 1 and 3 < tol

  • distance between trace 3 and 5 > tol

The algorithm remove trace 3. END!

Usage

## S4 method for signature 'GPR'
trRmDuplicates(x, tol = NULL, verbose = TRUE)

Arguments

x

An object of the class GPR

tol

Length-one numeric vector: if the horizontal distance between two consecutive traces is smaller than tol, then the second trace is removed. If tol = NULL, tol is set equal to sqrt(.Machine$double.eps).

verbose

Logical. TRUE: a message will be thrown, FALSE: no message will be thrown.


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