Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r274 r275 246 246 end 247 247 248 249 %TESTS250 251 252 struct=read_panel(handles.panel_Patch2)253 254 248 %------------------------------------------------------------------------ 255 249 % --- Outputs from this function are returned to the command line. … … 737 731 end 738 732 first_i=max(field_i,1); 739 nom_type_search740 733 if numel(regexp(nom_type_search,'\D'))>=1%two indices i and j 741 734 field_i=browse.num_i1; … … 1026 1019 set(gcf,'Pointer','watch') 1027 1020 %nomenclature types 1028 'TESTpair'1029 1021 filebase=get(handles.RootName,'String'); 1030 1022 [filepath,Nme,ext_dir]=fileparts(filebase); … … 1108 1100 % case of no displayed pair 1109 1101 if isequal(select,zeros(size(1:nbpair))) 1110 'TESTzero'1111 browse1112 1102 if isfield(browse,'incr_pair') && ~isequal(browse.incr_pair,[0 0]) 1113 1103 num_i1=ref_i-floor(browse.incr_pair(1)/2); … … 1214 1204 mode='displacement'; 1215 1205 else 1216 mode_list=get(handles.CivMode,'String') 1206 mode_list=get(handles.CivMode,'String'); 1217 1207 if isempty(mode_list) 1218 1208 msgbox_uvmat('ERROR','please enter an input image or netcdf file') 1219 1209 return 1220 1210 end 1221 mode_value=get(handles.CivMode,'Value') 1211 mode_value=get(handles.CivMode,'Value'); 1222 1212 mode=mode_list{mode_value}; 1223 1213 end … … 1677 1667 %% get fix1 parameters 1678 1668 if box_test(2) 1679 param.fix1=read_param_fix1(handles,filecell) 1669 param.fix1=read_param_fix1(handles,filecell); 1680 1670 end 1681 1671 … … 1710 1700 if box_test(6)==1 1711 1701 param.Patch2=read_panel(handles.panel_Patch1); 1712 % rho_patch2=str2double(get(handles.num_SmoothParam,'String'));1713 % if isnan(rho_patch2)1714 % rho_patch2='1000';1715 % set(handles.num_SmoothParam,'String','1')1716 % else1717 % rho_patch2=num2str(1000*rho_patch2);1718 % end1719 % nx_patch2=get(handles.num_Nx,'String');1720 % ny_patch2=get(handles.num_Ny,'String');1721 % if isnan(str2double(nx_patch2))1722 % nx_patch2='50' ;%default1723 % set(handles.num_Nx,'String','50');1724 % end1725 % if isnan(str2double(ny_patch2))1726 % ny_patch2='50' ;%default1727 % set(handles.num_Ny,'String','50');1728 % end1729 % subdomain_patch2=get(handles.num_SubdomainSize,'String');1730 % thresh_patch2=get(handles.num_MaxDiff,'String');1731 1702 end 1732 1703 … … 1981 1952 switch CivMode 1982 1953 case 'CivX' 1983 cmd_CIV2=CIV2_CMD(filecell.nc.civ2{ifile,j}, [],param);%creates the cmx file [fullfile(Rootbat,Filebat) '.civ2.cmx]1954 cmd_CIV2=CIV2_CMD(filecell.nc.civ2{ifile,j},param);%creates the cmx file [fullfile(Rootbat,Filebat) '.civ2.cmx] 1984 1955 cmd=[cmd cmd_CIV2 '\n']; 1985 1956 case 'CivAll' … … 2047 2018 switch CivMode 2048 2019 case 'CivX' 2049 cmd_PATCH=cmd_pat h(filecell.nc.civ2{ifile,j},param);2020 cmd_PATCH=cmd_patch(filecell.nc.civ2{ifile,j},param.Patch2,param.global.PatchBin); 2050 2021 cmd=[cmd cmd_PATCH '\n']; 2051 2022 case 'CivAll' … … 2868 2839 end 2869 2840 elseif box_test(3)==0; %check the existence of patch if it is not calculated 2870 Data=nc2struct(filename,'ListGlobalAttribute','CivStage','patch') 2841 Data=nc2struct(filename,'ListGlobalAttribute','CivStage','patch'); 2871 2842 if ~isempty(Data.CivStage) 2872 2843 if Data.CivStage<3 %test for civ files … … 3223 3194 ' -n ' num2str(Param.Ny) ' -ro ' num2str(Param.SmoothingParam)... 3224 3195 ' -nopt ' num2str(Param.SubdomainSize) ... 3225 ' > ' namelog ' 2>&1'] % redirect standard output to the log file3196 ' > ' namelog ' 2>&1']; % redirect standard output to the log file 3226 3197 else 3227 3198 cmd=['"' param.global.PatchBin... … … 3450 3421 function get_mask_civ1_Callback(hObject, eventdata, handles) 3451 3422 %------------------------------------------------------------------------ 3452 maskval=get(handles.get_mask_civ1,'Value') 3423 maskval=get(handles.get_mask_civ1,'Value'); 3453 3424 if isequal(maskval,0) 3454 3425 set(handles.mask_civ1,'String','') … … 4399 4370 %changes : filename_cmx -> filename ( no extension ) 4400 4371 4401 filename=regexprep(filename,'.nc','') 4372 filename=regexprep(filename,'.nc',''); 4402 4373 4403 4374 if isequal(param.civ1.Dt,'0') … … 4505 4476 %pixels per cm and matrix of the image times, read from the .civ file by uvmat 4506 4477 %global CivBin%name of the executable for civ1 calculation 4478 4507 4479 filename=regexprep(filename,'.nc',''); 4508 4480 … … 4558 4530 %pixels per cm and matrix of the image times, read from the .civ file by uvmat 4559 4531 % global civ2Bin sge%name of the executable for civ1 calculation 4560 if isequal(par.Dt,'0') 4532 filename=regexprep(filename,'.nc',''); 4533 if isequal(param.civ2.Dt,'0') 4561 4534 param.civ2.Dt='1' ;%case of 'displacement' mode 4562 4535 end … … 4722 4695 sizf=size(fileinput); 4723 4696 if (~ischar(fileinput)||~isequal(sizf(1),1)),return;end %stop if fileinput not a character string 4724 [path,name,ext]=fileparts(fileinput) 4697 [path,name,ext]=fileparts(fileinput); 4725 4698 [path1]=fileparts(filebase); 4726 4699 if isunix … … 5334 5307 end 5335 5308 if check_input 5336 key5337 5309 eval(['struct.' key '=input;']) 5338 5310 end
Note: See TracChangeset
for help on using the changeset viewer.