0001 function [t_out,c,G]=integrand_vel_B4(p,tw,kgrid)
0002
0003
0004
0005
0006
0007
0008 omega=p.w(tw);
0009 k=kgrid;
0010 SRC=p.source_type;
0011 OBS=0;
0012 FIXED_OBS=0;
0013 F=0;
0014 t_s=p.t_src;
0015 t_obs=p.t_obs;
0016
0017
0018 USE_OTF=0;
0019
0020 [t_out,G,c]=calc_green8(omega,k,USE_OTF,SRC,OBS,t_s,FIXED_OBS,p,F);
0021 G=squeeze(G);
0022
0023
0024
0025
0026 a=load([p.model_file]);
0027 m=a.m;
0028
0029 z=interp1(m.t,m.r,t_out);
0030 plot(z);
0031 for i=1:length(kgrid)
0032 G(:,i)=gradient(G(:,i),z);
0033 end
0034
0035
0036
0037
0038 SRC=p.source_type;
0039 OBS=1;
0040 t_s=p.t_src;
0041 t_obs=p.t_obs;
0042 FIXED_OBS=0;
0043 F=0;
0044
0045
0046
0047 [t_out,G_b,c]=calc_green8(omega,k,USE_OTF,SRC,OBS,t_s,FIXED_OBS,p,F);
0048
0049
0050
0051
0052 tmp=p;
0053 tmp.w=omega;
0054 tmp.k=k;
0055
0056
0057
0058 G_b=do_filter(G_b,tmp);
0059
0060
0061 g=my_interp(t_out,G_b,t_obs,0,1,2);
0062 g=squeeze(g).';
0063
0064
0065
0066
0067
0068
0069 for (j=1:length(t_out))
0070 G(j,:)=G(j,:).*conj(g);
0071 end;
0072
0073
0074
0075
0076 for (j=1:length(t_out))
0077 G(j,:)=G(j,:).*kgrid*1e-8;
0078 end
0079
0080
0081
0082
0083