% MATLAB HELP: % % this script sets up the inputs for and runs single_xcorr % % see codes.ps or codes.pdf for details % aaron birch may 21 2002 % % the name of the solar model file % solar_model_name='/scr96/aaronb/solar_model/solar_model'; % % set to one to remove the f mode from computation % EXCLUDE_F=1; % % observation point, this is an index into the radius grid % OBS=964; % % source depth, this is an index into the radius grid % DEPTH=913; % % the distances to compute at, in radians % delta=[4.2:20:63.6]*pi/180; % minium time, maximum time, and number of time steps to compute % the xcorr for % % T_MIN and T_MAX are in seconds T_MIN=0; T_MAX=150 * 60; T_STEPS=T_MAX/10; % % the first time in any session that you run this script % get the solar model from the disk % if (~exist('FIRST_TIME_SINGLE_XCORR')) % % define this variable % FIRST_TIME_SINGLE_XCORR=1; % % load the solar model % [R,r,c,rho,n,l,w,gamma,U,V]=load_solar_model(EXCLUDE_F,solar_model_name); % % get the radial displacement eigenfunction at OBS % and the divergence at DEPTH % % [UR,DS]=extract_eigenfunctions(U,V,OBS,DEPTH,l,r,R); end; % % the mode amplitudes % a=abs(OTF(l)).^2 .* UR.^2 .* DS.^2 ; % % allocate space for the cross-correlation % f=zeros(length(delta),T_STEPS); % % the time grid % time=linspace(T_MIN,T_MAX,T_STEPS); % % loop over distances, computing a cross-correlation for each one % for (i=1:length(delta)) i, [f(i,:)]=single_xcorr(w,gamma,a,l,delta(i),time); end; %% end for i