How can I account for the magnitude of each event in this kernel density estimation?

3 次查看(过去 30 天)
I am trying to execute a two-part analysis on Earthquake distribution. The first is the Earthquake Kernel Density Estiamtion (Eqn.1) which is done already by the script beneath. The second part I'm struggling with is the Seismic Moment Kernel Density Estimation. In theory, the equations for both is almost identical, with only the seismic moment being added to the numerator (Eqn.3)
Principle (After Sharon et al., 2020):
A regional scan is carried out in a 1 km (0.009 decimal degrees) interval 2-D grid, in the horizontal coordinates. For each grid point, both parameters are calculated utilising all recorded events within a 6 km (0.05 decimal degrees) radius. The parameters are calculated based on the kernel density estimation as an approach to obtain the spatial distribution through a probability density function, using the distance to weight each event from a reference point (each grid point, the common centre of its adjacent events).
where N is the total number of events within the radius r, M0(n) is the seismic moment released from an event n ac- cording to Eq. (2), d(n) is the distance between an event n and the circle centre, σ is the standard deviation of the Gaussian function and T is the duration of the earthquake catalogue; units are joules per squared kilometre per year (J km2 yr1).
For simplicity, I have reduced my dataset to 10 events (attached in this post), which are long5 and lat5. These are coordinates of the earthquake events in decimal degrees (North and East). I have also attached a file that contains the seismic moment released by each of these events.
My question is: How to account for the seismic moment of each earthquake inside the script, to make it calculate the new density automatically while accounting for seismic moment?
clc,clear
% load latfull
% load longfull
% load longmatrix
% load latmatrix
% load coord
load long5
load lat5
% AA = importdata('completenondecl3.csv');
long = (long5);
lat = (lat5);
step = 0.009;
x = min(long):step:max(long);
y = min(lat):step:max(lat);
[X,Y]= ndgrid(x,y); % creates grid
R = 0.05; % circle radius
plot(long,lat,'.r') % plot data
P = X*0; % no. of points inside each circle
T = 2019-1916+1;
sig = 2;
scale = (pi/180*earthRadius/1000)^2;
hold on
for i= 1:length(x)
for j=1:length(y)
D2 = (long-x(i)).^2 + (lat-y(j)).^2;
ix = D2 < R^2; % find smaller distances
D(ix) = scale*D2(ix); % write smaller distances
P(i,j) = sum(exp(-D(ix)/2/sig^2))/T; %write ID
N(i,j) = sum(ix); % no. of points inside (i,j) circle
% plot(long(ix),lat(ix),'ob') %plot data inside circle (if exists)
if sum(ix) % if there are points inside
viscircles([x(i),y(j)], R,'edgeColor','g'); % plot circle
else
% viscircles([x(i),y(j)], R,'edgecolor','r'); % plot circle
end
end
end
p = P/(pi*6.^2);
G = rot90(flip(p),3);
imagesc(x,y,G);
colorbar
hold off
axis equal

采纳的回答

darova
darova 2020-4-12
编辑:darova 2020-4-13
I think the question is too hard. Don't know if someone on this forum could handle it
But i'll take a shot: what about this smart step?
EDITED:
It happens because of different sizes of arrays you multiplies
Here are some steps to success
  • step 1: transpose data
load Mo5
Mo5 = Mo5'; % sesmic moment is a column - make a row
% D(ix) is a row
  • step 2: do calculations only if data exists
  8 个评论
karim
karim 2022-11-10
Darova, please i dont have skills on coding, i need this code to calculate Kernel seismic moment density, can you please write me the full code, then i will copy it directly. Thank you so much

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Seismology 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by