-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_par.m
executable file
·51 lines (43 loc) · 958 Bytes
/
test_par.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
%% generate input waveform
tic
gauss=6;
fs=2;
ln=1600;
gauss_mean=gauss/2;
gauss_sigma=gauss/6;
[wf,fs,ti]=gen_wf(gauss_mean,gauss_sigma,fs,ln);
inp_wf=[ti',wf'];
save('input_wf_.mat','inp_wf');
toc
%% compute reflect waveform
tic
% earthmodel='pem_-38.5_83.5';
% load('prem.mat');
load prem_uneft;
earth_model=gen_cake(prem,5);
% p=0;
p=0.0605;
[t,pp_wf]=ppwf(earth_model,p,wf,fs);
out_pp=[t',pp_wf'];
save(strcat('pp_prem','_.mat'),'out_pp');
toc
%% compute reflect waveform with global model
% list=dir('../earth_model/pem/*.mat');
% for i_model=1:5 %length(list)
% tic
% disp(i_model);
% ff=fullfile(list(i_model).folder,list(i_model).name);
% load(ff);
% [t,pp_wf]=ppwf(earth_model,p,wf,fs);
%
% out_pp=[t',pp_wf'];
% save(strcat('./pp_wf/pp_',num2str(lon),'_',num2str(lat),'_.mat'),...
% 'out_pp','lon','lat');
% toc
% end
%% plot_figure
% tic
% figure;hold on;
% plot(ti,wf);
% toc
% plot(t,pp_wf);