Stress field interpolation and wavelength analysis using a kernel (weighted) mean/median and standard deviation/IQR of stress data. Parameters can be adjusted to have inverse-distance-weighting (IDW) or nearest-neighbor interpolations (NN).
stress2grid(
x,
stat = c("mean", "median", "tensor"),
grid = NULL,
lon_range = NULL,
lat_range = NULL,
gridsize = 2,
min_data = 3L,
max_data = Inf,
max_sd = Inf,
threshold = deprecated(),
min_dist_threshold = 200,
arte_thres = deprecated(),
method_weighting = FALSE,
quality_weighting = TRUE,
dist_weighting = c("inverse", "linear", "none"),
idp = 1,
qp = 1,
mp = 1,
dist_threshold = 0.1,
R_range = seq(50, 1000, 50),
...
)stress2grid_stats(
x,
grid = NULL,
lon_range = NULL,
lat_range = NULL,
gridsize = 2,
min_data = 4L,
max_data = Inf,
threshold = deprecated(),
min_dist_threshold = 200,
arte_thres = deprecated(),
method_weighting = FALSE,
quality_weighting = TRUE,
dist_weighting = c("inverse", "linear", "none"),
idp = 1,
qp = 1,
mp = 1,
dist_threshold = 0.1,
R_range = seq(50, 1000, 50),
mode = FALSE,
kappa = 10,
...
)
sf object containing
longitude and latitude in degrees
Circular mean od median SHmax in degree
Circular standard deviation or Quasi-IQR on the Circle of SHmax in degrees
Search radius in km
Mean distance between grid point and datapoints per search radius
Number of data points in search radius
When stress2grid_stats(), azi and sd are replaced by the output of
circular_summary().
sf object containing
SHmax in degree
(optional) Uncertainties of SHmax in degree
(optional) Methods used for the determination of the direction of SHmax
whether the direction of interpolated SHmax is based on the
circular mean and standard deviation ("mean", the default), the
quasi-circular median and quasi-interquartile range ("median"), or the
orientation tensor based principal direction and dispersion ("tensor").
(optional) Point object of class sf.
(optional) numeric vector specifying the minimum
and maximum longitudes and latitudes (ignored if grid is specified).
numeric. Target spacing of the regular grid in decimal
degree. Default is 2.5. (is ignored if grid is specified)
integer. If the number of observations within distance
R_range is less than min_data, a missing value NA will be generated.
Default is 3 for stress2grid() and 4 for stress2grid_stats().
integer. The number of nearest observations that should be
used for prediction, where "nearest" is defined in terms of the space of the
spatial locations. Default is Inf.
numeric. Threshold for deviation of direction in degrees; if exceeds, missing values will be generated.
numeric. Distance threshold for smallest distance
of the prediction location to the next observation location.
Default is 200 km.
logical. If a method weighting should be applied:
Default is FALSE. If FALSE, overwrites mp.
logical. If a quality weighting should be applied:
Default is TRUE. If FALSE, overwrites qp.
Distance weighting method which should be used. One of
"none", "linear", or "inverse" (the default).
numeric. The weighting power of inverse distance, quality
and method (the higher the value, the more weight).
Default is 1. When set to 0, no weighting is applied. Only effective when
dist_weighting=="inverse".
numeric. Distance weight to prevent overweight of data
nearby (0 to 1). Default is 0.1
numeric value or vector specifying the kernel half-width(s)
search radii,
i.e. the maximum distance from the prediction location to be used for
prediction (in km). Default is seq(50, 1000, 50). If combined with
max_data, both criteria apply.
(optional) arguments to dist_greatcircle()
logical. Should the circular mode be included in the statistical summary (slow)?
numeric. von Mises distribution concentration parameter used
for the circular mode. Will be estimated using est.kappa() if not provided.
stress2grid() is originally based on the MATLAB script
"stress2grid" by Ziegler and Heidbach (2019):
https://github.com/MorZieg/Stress2Grid.
The tectonicr version has been significantly modified to provide better
performance and more flexibility.
stress2grid_stats() is based on stress2grid() but calculates circular
summary statistics (see circular_summary()).
Ziegler, M. and Heidbach, O. (2019). Matlab Script Stress2Grid v1.1. GFZ Data Services. tools:::Rd_expr_doi("10.5880/wsm.2019.002")
dist_greatcircle(), PoR_stress2grid(), compact_grid(),
circular_mean(), circular_median(), circular_sd(), circular_summary()
data("san_andreas")
# Inverse Distance Weighting interpolation:
stress2grid(san_andreas, stat = "median") |> head()
stress2grid(san_andreas, stat = "tensor") |> head()
# Nearest Neighbor interpolation:
stress2grid(san_andreas, stat = "median", max_data = 5) |> head()
if (FALSE) {
stress2grid_stats(san_andreas) |> head()
}
Run the code above in your browser using DataLab