uw_unwrap_space_time.m

来自「StaMps最新测试版」· M 代码 · 共 81 行

M
81
字号
function []=uw_unwrap_space_time(day,unwrap_method,time_win,master_day)%UW_UNWRAP_SPACE_TIME smooth and unwrap phase diffs between neighboring data points in time%%   Andy Hooper, June 2006%%   ============================================================================%   04/2007 AH: Smoothing changed to time domain (better for non-uniform sampling)%   ============================================================================if nargin<1    help uw_unwrap_time    error('not enough arguments')endif nargin<4    master_day=0;endif nargin<3    time_win=180;endif nargin<2    unwrap_method='3D';endfprintf('Unwrapping in space-time...\n')uw=load('uw_grid');ui=load('uw_interp');day_pos_ix=find(day>0);[Y,I]=min(day(day_pos_ix));close_master_ix=day_pos_ix(I);if close_master_ix>1    close_master_ix=[close_master_ix-1;close_master_ix];enddph_space=(uw.ph(ui.edges(:,3),:).*conj(uw.ph(ui.edges(:,2),:)));if strcmpi(unwrap_method,'2D')    save('uw_space_time','dph_space');else        dph_smooth=zeros(ui.n_edge,uw.n_ifg,'single');    for i1=1:uw.n_ifg        time_diff=(day(i1)-day)';        weight_factor=exp(-(time_diff.^2)/2/time_win^2);        weight_factor=weight_factor/sum(weight_factor);                    %dph_smooth(:,i1)=sum(dph_space.*repmat(weight_factor,ui.n_edge,1),2);                dph_mean=sum(dph_space.*repmat(weight_factor,ui.n_edge,1),2);        dph_mean_adj=angle(dph_space.*repmat(conj(dph_mean),1,uw.n_ifg)); % subtract weighted mean        G=[weight_factor',(time_diff.*weight_factor)'];        m=double(G)\(repmat(double(weight_factor),ui.n_edge,1).*double(dph_mean_adj))'; % weighted least-sq to find best-fit line        dph_smooth(:,i1)=dph_mean.*exp(j*m(1,:)'); % add back weighted mean            end    dph_noise=angle(dph_space.*conj(dph_smooth));    dph_smooth_uw=cumsum([angle(dph_smooth(:,1)),angle(dph_smooth(:,2:end).*conj(dph_smooth(:,1:end-1)))],2);%%TESTING FIX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%load griddefo1%nmix=[1:close_master_ix(1),close_master_ix(2)+1:uw.n_ifg+1];%dph_smooth_uw=ph_defo(uw.edges(:,3),nmix)-ph_defo(uw.edges(:,2),nmix);%dph_noise=angle(dph_space.*exp(-j*dph_smooth_uw));%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    dph_close_master=mean(dph_smooth_uw(:,close_master_ix),2);    dph_smooth_uw=dph_smooth_uw-repmat(dph_close_master-angle(exp(j*dph_close_master)),1,uw.n_ifg);    dph_space_uw=dph_smooth_uw+(dph_noise);    fprintf('\n   ESTIMATES OF DIFF PHASE NOISE STD DEV\n')    fprintf('   =====================================\n')    for i=1:uw.n_ifg        fprintf('   %s  %4.1f deg\n',datestr(master_day+day(i)),std(dph_noise(:,i))*180/pi)    end    save('uw_space_time','dph_space','dph_space_uw','close_master_ix','dph_noise');end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?