Skip to contents

Stress field interpolation and wavelength analysis using a kernel (weighted) mean/median and standard deviation/IQR of stress data

Usage

stress2grid(
  x,
  stat = c("mean", "median"),
  grid = NULL,
  lon_range = NULL,
  lat_range = NULL,
  gridsize = 2,
  min_data = 3L,
  threshold = 25,
  arte_thres = 200,
  method_weighting = FALSE,
  quality_weighting = TRUE,
  dist_weight = c("inverse", "linear", "none"),
  idp = 1,
  qp = 1,
  mp = 1,
  dist_threshold = 0.1,
  R_range = seq(50, 1000, 50),
  ...
)

Arguments

x

sf object containing

azi

SHmax in degree

unc

(optional) Uncertainties of SHmax in degree

type

(optional) Methods used for the determination of the direction of SHmax

stat

whether the direction of interpolated SHmax is based on the circular mean and standard deviation ("mean", the default) or the circular median and interquartile range ("median")

grid

(optional) Point object of class sf.

lon_range, lat_range

(optional) numeric vector specifying the minimum and maximum longitudes and latitudes (ignored if grid is specified).

gridsize

numeric. Target spacing of the regular grid in decimal degree. Default is 2.5. (is ignored if grid is specified)

min_data

integer. Minimum number of data per bin. Default is 3

threshold

numeric. Threshold for deviation of direction. Default is 25

arte_thres

numeric. Maximum distance (in km) of the grid point to the next data point. Default is 200

method_weighting

logical. If a method weighting should be applied: Default is FALSE. If FALSE, overwrites mp.

quality_weighting

logical. If a quality weighting should be applied: Default is TRUE. If FALSE, overwrites qp.

dist_weight

Distance weighting method which should be used. One of "none", "linear", or "inverse" (the default).

idp, qp, mp

numeric. The weighting power of inverse distance, quality and method. Default is 1. The higher the value, the more weight it will put. When set to 0, no weighting is applied. idp is only effective if inverse distance weighting (dist_weight="inverse") is applied.

dist_threshold

numeric. Distance weight to prevent overweight of data nearby (0 to 1). Default is 0.1

R_range

numeric value or vector specifying the kernel half-width(s), i.e. the search radius (in km). Default is seq(50, 1000, 50)

...

(optional) arguments to dist_greatcircle()

Value

sf object containing

lon,lat

longitude and latitude in degrees

azi

Mean SHmax in degree

sd

Standard deviation of SHmax in degrees

R

Search radius in km

mdr

Mean distance of datapoints per search radius

N

Number of data points in search radius

Details

This is a modified version of the MATLAB script "stress2grid"

References

Ziegler, M. and Heidbach, O. (2019). Matlab Script Stress2Grid v1.1. GFZ Data Services. doi:10.5880/wsm.2019.002

Examples

data("san_andreas")
stress2grid(san_andreas, stat = "median")
#> Simple feature collection with 1070 features and 7 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: -124.82 ymin: 24.08 xmax: -108.82 ymax: 40.08
#> Geodetic CRS:  WGS 84
#> # A tibble: 1,070 × 8
#>      lon   lat   azi    sd     R     N   mdr        geometry
#>  * <dbl> <dbl> <dbl> <dbl> <dbl> <int> <dbl>     <POINT [°]>
#>  1 -113.  24.1  141.   3.5   150     4 0.822 (-112.82 24.08)
#>  2 -113.  24.1  141.   3.5   200     4 0.617 (-112.82 24.08)
#>  3 -113.  24.1  147    3.5   250     7 0.679 (-112.82 24.08)
#>  4 -113.  24.1  163    0.5   300    17 0.779 (-112.82 24.08)
#>  5 -113.  24.1  163    0     350    73 0.879 (-112.82 24.08)
#>  6 -113.  24.1  165    0     400   127 0.840 (-112.82 24.08)
#>  7 -113.  24.1  168    0     450   161 0.786 (-112.82 24.08)
#>  8 -113.  24.1  168    0     500   169 0.718 (-112.82 24.08)
#>  9 -113.  24.1  168    0     550   177 0.667 (-112.82 24.08)
#> 10 -113.  24.1  168    0     600   182 0.621 (-112.82 24.08)
#> # ℹ 1,060 more rows