forked from pieropoli/Seismic_Matlab_Functions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReflectionCoeff.m
executable file
·65 lines (52 loc) · 1.87 KB
/
ReflectionCoeff.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function [PP, SP] = ReflectionCoeff(iypP, iysP, alfax, betax)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ReflectionCoeff.m
%
% Perez-Campos, Xyoli - 04/17/98
%
% This program calculates the free-surface reflection coefficients (PP and SP)
% given the take-off-angle, the P-wave and the S-wave velocities at the
% receiver (Aki and Richards, 1980, p. 140).
%
% Variables:
% alfax = P-wave velocity at the receiver
% betax = S-wave velocity at the receiver
% ci = coeffients to calculate PP and SP (i is a counter)
% ix = take-off-angle at the receiver
% na = vertical slowness for alfa
% nb = vertical slowness for beta
% p = slowness parameter
% PP = Reflection coefficient for reflected P
% SP = Reflection coefficient for reflected S, including spherical
% correction
% spherCorr = Spherical correction = etha_alfa / etha_beta
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
% For an incident P wave %
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Horizontal slowness %%%
i = deg2rad(180) - iypP; % for pP wave
ppP = sin(i)/alfax;
j = asin(betax*ppP); % for SV wave
%% Coefficients to make easier the calculations %%
c1pP = 4*ppP.^2.*(cos(i)/alfax).*(cos(j)/betax);
c2pP = ((1/betax).^2 - 2*ppP.^2).^2;
%%% Reflected P %%%
PP = (c1pP - c2pP) ./ (c1pP + c2pP);
%%%%%%%%%%%%%%%%%%%%%%%%%%
% For an incident S wave %
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Horizontal slowness %%%
j = deg2rad(180) - iysP; % for sP wave
psP = sin(j)/betax;
i = asin(alfax*psP); % for P wave
%% Coefficients to make easy the calculations %%
c1sP = 4*psP.^2.*(cos(i)/alfax).*(cos(j)/betax);
c2sP = ((1/betax).^2 - 2*psP.^2).^2;
c3sP = 4 * (betax/alfax) * psP .* (cos(j)/betax) .* sqrt(c2sP);
%% Spehricity coerrection %%
spherCorr = betax*cos(i)./(alfax*cos(j));
%%% Reflected S %%%
SP = c3sP ./ (c1sP + c2sP);
SP = spherCorr .* SP;