Changeset 1118
- Timestamp:
- Jun 2, 2022, 12:22:11 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/stereo_civ.m
r1107 r1118 149 149 j2_series_Civ2=j2_series_Civ1; 150 150 151 % if isempty(j1_series_Civ1)152 % FrameIndex_A_Civ1=i1_series_Civ1;153 % FrameIndex_B_Civ1=i2_series_Civ1;154 % j1_series_Civ1=ones(size(i1_series_Civ1));155 % j2_series_Civ1=ones(size(i1_series_Civ1));156 % else157 % FrameIndex_A_Civ1=j1_series_Civ1;158 % FrameIndex_B_Civ1=j2_series_Civ1;159 % end160 151 if isempty(PairCiv2) 161 152 FrameIndex_A_Civ2=FrameIndex_A_Civ1; … … 289 280 290 281 Civ1Dir=OutputDir; 291 292 % ncfile=fullfile_uvmat(RootPath_A,Civ1Dir,[RootFile_A,'_All'],'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...293 % j1_series_Civ1(ifield),j2_series_Civ1(ifield));294 295 282 296 283 ncfile2=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.nc',NomTypeNc,i2_series_Civ1(ifield),[],... … … 527 514 mask=imread(par_civ2.Mask); 528 515 end 529 % ibx2=ceil(par_civ2.CorrBoxSize(1)/2);530 % iby2=ceil(par_civ2.CorrBoxSize(2)/2);531 516 par_civ2.SearchBoxShift=[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)]; 532 517 par_civ2.Grid=[par_civ2.Grid(nbval>=1,1)-par_civ2.SearchBoxShift(:,1)/2 par_civ2.Grid(nbval>=1,2)-par_civ2.SearchBoxShift(:,2)/2];% grid taken at the extrapolated origin of the displacement vectors … … 685 670 mask=imread(par_civ3.Mask); 686 671 end 687 % ibx2=ceil(par_civ3.CorrBoxSize(1)/2);688 % iby2=ceil(par_civ3.CorrBoxSize(2)/2);689 672 par_civ3.SearchBoxShift=[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)]; 690 673 par_civ3.Grid=[par_civ3.Grid(nbval>=1,1)-par_civ3.SearchBoxShift(:,1)/2 par_civ3.Grid(nbval>=1,2)-par_civ3.SearchBoxShift(:,2)/2];% grid taken at the extrapolated origin of the displacement vectors … … 755 738 end 756 739 757 758 740 %% Patch3 759 741 if isfield (Param.ActionInput,'Patch3') … … 785 767 Data.Civ3_FF(ind_good)=FFres; 786 768 Data.CivStage=Data.CivStage+1; 787 788 789 % get z from u and v (displacements) 790 769 770 % get z from u and v (displacements) 791 771 Data.Xmid=Rangx(1)+(Rangx(2)-Rangx(1))*(Data.Civ3_X-0.5)/(Npx-1);%temporary coordinate (velocity taken at the point middle from imgae 1 and 2) 792 772 Data.Ymid=Rangy(2)+(Rangy(1)-Rangy(2))*(Data.Civ3_Y-0.5)/(Npy-1);%temporary coordinate (velocity taken at the point middle from imgae 1 and 2) … … 803 783 804 784 %% write result in a netcdf file if requested 805 %if LSM ~= 1 % store all data806 %if exist('ncfile','var')807 %errormsg=struct2nc(ncfile,Data);808 %if isempty(errormsg)809 %disp([ncfile ' written'])810 %else811 %disp(errormsg)812 %end813 %end814 %else785 if LSM ~= 1 % store all data 786 if exist('ncfile','var') 787 errormsg=struct2nc(ncfile,Data); 788 if isempty(errormsg) 789 disp([ncfile ' written']) 790 else 791 disp(errormsg) 792 end 793 end 794 else 815 795 % store only phys data 816 % Data_light.ListVarName={'Xphys','Yphys','Zphys','Civ3_C','Xmid','Ymid','Uphys','Vphys','Error'};817 % Data_light.VarDimName={'nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3'};818 796 Data_light.ListVarName={'Xphys','Yphys','Zphys','Civ3_C','DX','DY','Error'}; 819 797 Data_light.VarDimName={'nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3'}; … … 828 806 Data_light.Xphys=Data.Xphys(ind_good); 829 807 Data_light.Civ3_C=Data.Civ3_C(ind_good); 830 % Data_light.Xmid=Data.Xmid(ind_good);831 % Data_light.Ymid=Data.Ymid(ind_good);832 808 Data_light.DX=Data.Uphys(ind_good); 833 809 Data_light.DY=Data.Vphys(ind_good); … … 842 818 end 843 819 844 %end820 end 845 821 end 846 822 disp(['ellapsed time for the loop ' num2str(toc) ' s']) -
trunk/src/uvmat.m
r1117 r1118 4702 4702 %set(huvmat, 4703 4703 case 'civdata...'%reinitiate input, return to automatic civ data readingget_field 4704 UvData.FileInfo{1}.FieldType='netcdf'; 4705 set(handles.uvmat,'UserData',UvData) 4704 4706 display_file_name(handles,FileName,1) 4705 4707 end … … 4724 4726 set(handles.MaxIndex_i,'String',MaxIndex_i)%TODO: record time unit 4725 4727 UvData.TimeUnit=GetFieldData.Time.TimeUnit; 4726 set(handles.uvmat,'UserData',UvData);4728 % % set(handles.uvmat,'UserData',UvData); 4727 4729 set(handles.FileIndex,'String','') 4728 4730 ParamIn.TimeVarName=GetFieldData.Time.TimeName; … … 4736 4738 set(handles.MaxIndex_i,'String',MaxIndex_i)%TODO: record time unit 4737 4739 UvData.TimeUnit=GetFieldData.Time.TimeUnit; 4738 set(handles.uvmat,'UserData',UvData);4740 % set(handles.uvmat,'UserData',UvData); 4739 4741 set(handles.FileIndex,'String','') 4740 4742 ParamIn.TimeDimName=GetFieldData.Time.TimeName; … … 4747 4749 set(handles.ColorScalar,'Value',1) 4748 4750 set(handles.ColorScalar,'String',VecColorList); 4749 % UvData.FileInfo{1}.FileType='netcdf';4751 UvData.FileInfo{1}.FieldType='netcdf'; 4750 4752 set(handles.uvmat,'UserData',UvData) 4751 4753 REFRESH_Callback(hObject, eventdata, handles)
Note: See TracChangeset
for help on using the changeset viewer.