Learn R Programming

eseis (version 0.8.1)

ncc_stretch: Estimate relativ wave velocity change (dv/v) by correlation stretching

Description

The function estimates the relative seismic wave velocity changes over time based on matching iteratively stretched master correlations to previously calculated correlograms (cf. ncc_correlate).

Usage

ncc_stretch(
  data,
  lag,
  master = "mean",
  normalise = TRUE,
  sides = "both",
  range = 0.01,
  steps = 100,
  method = "r",
  reject = 0,
  ...
)

Value

A data.frame, object with the time and relative wave velocity change estimate.

Arguments

data

eseis object of type correlation, output of aux_correlate.

lag

Numeric vector of length two, range of the time lage to analyse. If omitted, the time lag of the input data (x$CC$lag) is used.

master

Character vector or value, either a user defined master correlation function or a keyword denoting the method used to calculate master the correlation function. One out of "mean", "median" and "quantile". Default is "mean". if "quantile" is used, the quantile probability must be specified as well, e.g., "probs = 0.5".

normalise

Logical value, option to normalise the data set before calculating the master trace. Default is TRUE.

sides

Character value. One out of "both" (both sides of the input data), "left" (only negative time lags), "right" (only positive time lags) and single (only right side is used, expecting data from a single source and direction). Default is "both".

range

Numeric value, relative range of the stretch. Default is 0.01 (1 percent).

steps

Numeric value, number of stretch steps (step resolution). Default is 100.

method

Charcter value, method used to identify best match of cross correlation time slices with stretched master data set. One out of "rmse" (minimum root mean square error) and "r" (maximum R^2). Default is "r".

reject

Numeric value, rejection threshold for stretch values. This value defines up to which quantile matching stretch solutions will be treated as valid solutions. Default is 0 (Only the minimum RMSE value or the maximum R^2 value is returned, and the returned standard deviation will be NA). A change to 0.05 will return mean and standard deviation of the five best percent of the solutions.

...

Further arguments passed to the function.

Author

Michael Dietze

Examples

Run this code

if (FALSE) {

cc <- ncc_preprocess(start = "2017-04-09 00:30:00", 
                     stop = "2017-04-09 01:30:00", 
                     ID = c("RUEG1", "RUEG2"), 
                     component = c("Z", "Z"), 
                     dir = paste0(system.file("extdata", 
                                              package = "eseis"), "/"), 
                     window = 600, 
                     overlap = 0, 
                     lag = 20, 
                     deconvolve = TRUE, 
                     sensor = "TC120s",
                     logger = "Cube3extBOB",
                     gain = 1,
                     f = c(0.05, 0.1), 
                     sd = 1)
   
   ## estimate dv/v
   dv <- ncc_stretch(data = cc, range = 0.05)
   
   ## plot result
   plot(dv$time, dv$dvv, type = "l")
                     
}           
                                                              

Run the code above in your browser using DataLab