View source: R/interpolation.R
stress2grid | R Documentation |
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"),
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,
...
)
x |
|
stat |
whether the direction of interpolated SHmax is based on the
circular mean and standard deviation ( |
grid |
(optional) Point object of class |
lon_range , lat_range |
(optional) numeric vector specifying the minimum
and maximum longitudes and latitudes (ignored if |
gridsize |
numeric. Target spacing of the regular grid in decimal
degree. Default is |
min_data |
integer. If the number of observations within distance
|
max_data |
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 |
max_sd |
numeric. Threshold for deviation of direction in degrees; if exceeds, missing values will be generated. |
threshold |
|
min_dist_threshold |
numeric. Distance threshold for smallest distance
of the prediction location to the next observation location.
Default is |
arte_thres |
|
method_weighting |
logical. If a method weighting should be applied:
Default is |
quality_weighting |
logical. If a quality weighting should be applied:
Default is |
dist_weighting |
Distance weighting method which should be used. One of
|
idp , qp , mp |
numeric. The weighting power of inverse distance, quality
and method (the higher the value, the more weight).
Default is |
dist_threshold |
numeric. Distance weight to prevent overweight of data
nearby (0 to 1). Default is |
R_range |
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 |
... |
(optional) arguments to |
mode |
logical. Should the circular mode be included in the statistical summary (slow)? |
kappa |
numeric. von Mises distribution concentration parameter used
for the circular mode. Will be estimated using |
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()
).
sf
object containing
longitude and latitude in degrees
Mean od median SHmax in degree
Standard deviation or Quasi-IQR 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()
.
Ziegler, M. and Heidbach, O. (2019). Matlab Script Stress2Grid v1.1. GFZ Data Services. \Sexpr[results=rd]{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()
# Nearest Neighbor interpolation:
stress2grid(san_andreas, stat = "median", max_data = 5) |> head()
## Not run:
stress2grid_stats(san_andreas) |> head()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.