- Timestamp:
- Nov 21, 2011, 10:20:53 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r290 r291 1922 1922 % CheckFix2 1923 1923 if Param.CheckFix2==1 1924 test_mask=get(handles.CheckMask,'Value');1925 if test_mask==01926 maskname=''; %no mask used1927 else1928 maskdispl=get(handles.txt_MaskName,'String');1929 maskbase=[filecell.filebase '_' maskdispl]; %1930 nbslice_mask=str2double(maskdispl(1:end-4)); %1931 num1_mask=mod(num1_civ2(ifile)-1,nbslice_mask)+1;1932 maskname =name_generator(maskbase,num1_mask,1,'.png','_i');1933 end1934 1924 switch CivMode 1935 1925 case 'CivX' 1936 if isunix 1937 cmd_FIX=[Param.xml.FixBin ' -f ' filecell.nc.civ2{ifile,j} ' -fi1 ' num2str(flagindex2(1)) ... 1938 ' -fi2 ' num2str(flagindex2(2)) ' -fi3 ' num2str(flagindex2(3)) ... 1939 ' -threshC ' num2str(thresh_vec2C) ' -threshV ' num2str(thresh_vel2) ' -maskName ' maskname]; 1940 else 1941 cmd_FIX=['"' Param.xml.FixBin '" -f "' filecell.nc.civ2{ifile,j} '" -fi1 ' num2str(flagindex2(1)) ... 1942 ' -fi2 ' num2str(flagindex2(2)) ' -fi3 ' num2str(flagindex2(3)) ... 1943 ' -threshC ' num2str(thresh_vec2C) ' -threshV ' num2str(thresh_vel2) ' -maskName "' maskname '"']; 1944 cmd_FIX=regexprep(cmd_FIX,'\\','\\\\'); 1945 end 1946 cmd=[cmd cmd_FIX '\n']; 1926 cmd=[cmd... 1927 cmd_fix(filecell.nc.civ2{ifile,j},Param,'Fix2') '\n']; 1947 1928 case 'CivAll' 1948 1929 fix2.inputFileName=filecell.nc.civ2{ifile,j} ; … … 1969 1950 switch CivMode 1970 1951 case 'CivX' 1971 cmd _PATCH=cmd_patch(filecell.nc.civ2{ifile,j},param.Patch2,Param.xml.PatchBin);1972 cmd=[cmd cmd_PATCH'\n'];1952 cmd=[cmd... 1953 cmd_patch(filecell.nc.civ1{ifile,j},Param,'Patch2') '\n']; 1973 1954 case 'CivAll' 1974 1955 patch2.inputFileName=filecell.nc.civ1{ifile,j} ; … … 5329 5310 function cmd=cmd_fix(filename,Param,fixname) 5330 5311 %% 5312 switch fixname 5313 case 'Fix1' 5314 fi2_value=num2str(Param.(fixname).CheckF2); 5315 case 'Fix2' 5316 fi2_value=num2str(Param.(fixname).CheckF4);%need to understand why... 5317 end 5318 5319 5320 5331 5321 filename=regexprep(filename,'.nc',''); 5332 5322 MaskName_string='';%default … … 5340 5330 if isunix 5341 5331 cmd=[Param.xml.FixBin ' -f ' filename '.nc -fi1 ' num2str(Param.(fixname).CheckFmin2) ... 5342 ' -fi2 ' num2str(Param.(fixname).CheckF2)' -fi3 ' num2str(Param.(fixname).CheckF3) ...5332 ' -fi2 ' fi2_value ' -fi3 ' num2str(Param.(fixname).CheckF3) ... 5343 5333 ' -threshC ' num2str(Param.(fixname).MinCorr) MaxVel_string MaskName_string... 5344 5334 ' >' filename '.' lower(fixname) '.log 2>&1']; 5345 5335 else 5346 5336 cmd=['"' Param.xml.FixBin '" -f "' filename '.nc" -fi1 ' num2str(Param.(fixname).CheckFmin2)... 5347 ' -fi2 ' num2str(Param.(fixname).CheckF2)' -fi3 ' num2str(Param.(fixname).CheckF3) ...5337 ' -fi2 ' fi2_value ' -fi3 ' num2str(Param.(fixname).CheckF3) ... 5348 5338 ' -threshC ' num2str(Param.(fixname).MinCorr) MaxVel_string MaskName_string... 5349 5339 ' > "' filename '.' lower(fixname) '.log"']; … … 5359 5349 cmd=[Param.xml.PatchBin... 5360 5350 ' -f ' filename '.nc -m ' num2str(Param.(patchname).Nx)... 5361 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).Smooth ingParam)...5351 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothParam)... 5362 5352 ' -nopt ' num2str(Param.(patchname).SubdomainSize) ... 5363 5353 ' > ' filename '.' lower(patchname) '.log 2>&1']; % redirect standard output to the log file … … 5365 5355 cmd=['"' Param.xml.PatchBin... 5366 5356 '" -f "' filename '.nc" -m ' num2str(Param.(patchname).Nx)... 5367 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).Smooth ingParam)...5357 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothParam)... 5368 5358 ' -nopt ' num2str(Param.(patchname).SubdomainSize)... 5369 5359 ' > "' filename '.' lower(patchname) '.log" 2>&1']; % redirect standard output to the log file
Note: See TracChangeset
for help on using the changeset viewer.