spatial_amplitude {eseis} | R Documentation |
Locate the source of a seismic event by modelling amplutide attenuation
Description
The function fits a model of signal amplitude attenuation for all grid cells of the distance data sets and returns the residual sum as measure of the most likely source location of an event.
Usage
spatial_amplitude(
data,
coupling,
d_map,
aoi,
v,
q,
f,
a_0,
normalise = TRUE,
output = "variance",
cpu
)
Arguments
data |
|
coupling |
|
d_map |
|
aoi |
|
v |
|
q |
|
f |
|
a_0 |
|
normalise |
|
output |
|
cpu |
|
Value
A raster object with the location output metrics for each grid cell.
Author(s)
Michael Dietze
Examples
## Not run:
## create synthetic DEM
dem <- terra::rast(xmin = 0, xmax = 10000,
ymin= 0, ymax = 10000,
res = c(500, 500),
vals = rep(0, 400))
## define station coordinates
sta <- data.frame(x = c(1000, 9000, 5000),
y = c(1000, 1000, 9000),
ID = c("A", "B", "C"))
## create synthetic signal (source in towards lower left corner of the DEM)
s <- rbind(dnorm(x = 1:1000, mean = 500, sd = 50) * 100,
dnorm(x = 1:1000, mean = 500, sd = 50) * 2,
dnorm(x = 1:1000, mean = 500, sd = 50) * 1)
## plot DEM and stations
terra::plot(dem)
text(x = sta$x,
y = sta$y,
labels = sta$ID)
## calculate spatial distance maps and inter-station distances
D <- eseis::spatial_distance(stations = sta[,1:2],
dem = dem)
## locate signal
e <- eseis::spatial_amplitude(data = s,
d_map = D$maps,
v = 500,
q = 50,
f = 10)
## get most likely location coordinates (example contains two equal points)
e_max <- spatial_pmax(data = e)
## plot output
terra::plot(e)
points(e_max[1],
e_max[2],
pch = 20)
points(sta[,1:2])
## End(Not run)