Changeset 291


Ignore:
Timestamp:
Nov 21, 2011, 10:20:53 AM (12 years ago)
Author:
gostiaux
Message:

code debuggues up to patch2; still need an update of the gui from Joel for smoothparam

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r290 r291  
    19221922        % CheckFix2
    19231923        if Param.CheckFix2==1
    1924             test_mask=get(handles.CheckMask,'Value');
    1925             if test_mask==0
    1926                 maskname=''; %no mask used
    1927             else
    1928                 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             end
    19341924            switch CivMode
    19351925                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'];
    19471928                case 'CivAll'
    19481929                    fix2.inputFileName=filecell.nc.civ2{ifile,j} ;
     
    19691950            switch CivMode
    19701951                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'];
    19731954                case 'CivAll'
    19741955                    patch2.inputFileName=filecell.nc.civ1{ifile,j} ;
     
    53295310function cmd=cmd_fix(filename,Param,fixname)
    53305311%%
     5312switch 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...
     5317end
     5318
     5319
     5320
    53315321filename=regexprep(filename,'.nc','');
    53325322MaskName_string='';%default
     
    53405330if isunix
    53415331    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) ...
    53435333        ' -threshC ' num2str(Param.(fixname).MinCorr) MaxVel_string MaskName_string...
    53445334        ' >' filename '.' lower(fixname) '.log 2>&1'];
    53455335else
    53465336    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) ...
    53485338        ' -threshC ' num2str(Param.(fixname).MinCorr) MaxVel_string MaskName_string...
    53495339        ' > "' filename '.' lower(fixname) '.log"'];
     
    53595349    cmd=[Param.xml.PatchBin...
    53605350        ' -f ' filename '.nc -m ' num2str(Param.(patchname).Nx)...
    5361         ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothingParam)...
     5351        ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothParam)...
    53625352        ' -nopt ' num2str(Param.(patchname).SubdomainSize) ...
    53635353        '  > ' filename '.' lower(patchname) '.log 2>&1']; % redirect standard output to the log file
     
    53655355    cmd=['"' Param.xml.PatchBin...
    53665356        '" -f "' filename '.nc" -m ' num2str(Param.(patchname).Nx)...
    5367         ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothingParam)...
     5357        ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothParam)...
    53685358        ' -nopt ' num2str(Param.(patchname).SubdomainSize)...
    53695359        '  > "' filename '.' lower(patchname) '.log" 2>&1']; % redirect standard output to the log file
Note: See TracChangeset for help on using the changeset viewer.