- Timestamp:
- Dec 5, 2011, 7:48:37 PM (13 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r316 r317 23 23 %TODO: search range 24 24 25 % Last Modified by GUIDE v2.5 04-Dec-2011 08:42:4725 % Last Modified by GUIDE v2.5 04-Dec-2011 18:52:13 26 26 % Begin initialization code - DO NOT EDIT 27 27 gui_Singleton = 1; … … 4340 4340 civ2.pixcmy='1'; 4341 4341 civ2.convectFlow='n'; 4342 4343 4344 % --- Executes on button press in TestPatch1. 4345 function TestPatch1_Callback(hObject, eventdata, handles) 4346 set(handles.TestPatch1,'BackgroundColor',[1 1 0]) 4347 drawnow 4348 if get(handles.TestPatch1,'Value') 4349 ref_i=str2double(get(handles.ref_i,'String')); 4350 if strcmp(get(handles.ref_j,'Visible'),'on') 4351 ref_j=str2double(get(handles.ref_j,'String')); 4352 else 4353 ref_j=1;%default 4354 end 4355 [filecell,i1,i21,j1,j2,i1_civ2,i2_civ2,j1_civ2,j2_civ2,nom_type_nc,file_ref_fix1,file_ref_fix2]=... 4356 set_civ_filenames(handles,ref_i,ref_j,[0 0 1 0 0 0]); 4357 4358 Data.ListVarName={'ny','nx','A'}; 4359 Data.VarDimName= {'ny','nx',{'ny','nx'}}; 4360 4361 Param=read_GUI(handles.civ) 4362 Param.CheckOutputFile=0; 4363 [Data,errormsg]=civ_matlab(Param,filecell.nc.civ1{1})% get the grid of x, y positions set for PIV 4364 if ~isempty(errormsg) 4365 msgbox_uvmat('ERROR',Data.Txt) 4366 return 4367 end 4368 set(handles.TestCiv1,'BackgroundColor',[1 0 0]) 4369 else 4370 corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display 4371 if ~isempty(corrfig) 4372 delete(corrfig) 4373 end 4374 hview_field=findobj(allchild(0),'tag','view_field');% look for view_field 4375 if ~isempty(hview_field) 4376 delete(hview_field) 4377 end 4378 end 4379 -
trunk/src/civ_matlab.m
r316 r317 79 79 80 80 else 81 Data=nc2struct(ncfile,'ListGlobalAttribute','absolut_time_T0'); %look for the constant 'absolut_time_T0' to detect old civx data format 81 Data=nc2struct(ncfile,'ListGlobalAttribute','absolut_time_T0') %look for the constant 'absolut_time_T0' to detect old civx data format 82 if isfield(Data,'Txt') 83 errormsg=Data.Txt; 84 return 85 end 82 86 if ~isempty(Data.absolut_time_T0')%read civx file 83 87 check_civx=1;% test for old civx data format … … 90 94 end 91 95 end 92 if isfield(Data,'Txt') 93 msgbox_uvmat('ERROR',Data.Txt) 94 return 95 end 96 96 97 end 97 98 … … 295 296 296 297 %% write result in a netcdf file if requested 297 if exist('ncfile','var') 298 if exist('ncfile','var') && ~(isfield(Param,'CheckOuputFile')&&Param.CheckOuputFile) 298 299 errormsg=struct2nc(ncfile,Data); 299 300 end … … 413 414 414 415 %% compute image correlations: MAINLOOP on velocity vectors 415 %corrmax=0;416 %sum_square=1;% default416 corrmax=0; 417 sum_square=1;% default 417 418 % vector=[0 0];%default 418 419 for ivec=1:nbvec -
trunk/src/name2display.m
r293 r317 184 184 185 185 %resolve ambigous nomenclature types when the number of 0 is unknown (type %0...): 186 ind_zero=findstr('0',nom_type);187 nb_zero=numel(ind_zero);188 if ~isempty(ind_zero)189 for itest=0:nb_zero-1190 filename=name_generator(fullfile(RootPath,RootFile),1,1,ext,nom_type,1,1,1,subdir); 191 if exist(filename,'file')192 break193 else194 nom_type(ind_zero(1))=[]; % remove a zero in nom_type195 end196 end197 end186 % ind_zero=findstr('0',nom_type); 187 % nb_zero=numel(ind_zero); 188 % if ~isempty(ind_zero) 189 % for itest=0:nb_zero-1 190 % filename=name_generator(fullfile(RootPath,RootFile),1,1,ext,nom_type,1,1,1,subdir) 191 % if exist(filename,'file') 192 % break 193 % else 194 % nom_type(ind_zero(1))=[]; % remove a zero in nom_type 195 % end 196 % end 197 % end
Note: See TracChangeset
for help on using the changeset viewer.