Changeset 286
- Timestamp:
- Nov 18, 2011, 8:32:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r285 r286 1654 1654 1655 1655 1656 %% get checkpatch1 parameters1657 if Param.CheckPatch11658 param.Patch1=read_panel(handles.Patch1);1659 %param.checkpatch1=read_param_patch1(handles)1660 end1661 1662 %% get checkciv2 parameters:1663 if Param.CheckCiv21664 param.civ2=read_param_civ2(handles,cell2mat(filecell.ima1.civ2(1,1)));1665 end1666 1667 %% get checkfix2 parameters1668 if Param.CheckFix21669 flagindex2(1)=get(handles.vec_Fmin2_2, 'Value');1670 flagindex2(2)=get(handles.vec_F3_2, 'Value');1671 flagindex2(3)=get(handles.vec_F4, 'Value');1672 thresh_vec2C=str2double(get(handles.thresh_vec2C,'String'));%threshold on image correlation vec_C1673 thresh_vel2=str2double(get(handles.thresh_vel2,'String'));%threshold on velocity modulus1674 test_mask=get(handles.CheckMask,'Value');1675 nbslice_mask=get(handles.mask_fix2,'UserData'); % get the number of slices (= number of masks)1676 %%%%%%%%%%%%%COMPLETER LE PROGRAMME FIX AVEC REF FILE ET OPTION inf_sup=21677 % inf_sup=get(handles.inf_sup2,'Value');1678 % ref=get(handles.ref_fix2,'UserData');1679 1680 %%%%%%%%%%%%%%%%%%%1681 end1682 1683 %% get checkpatch2 parameters1684 if Param.CheckPatch2==11685 param.Patch2=read_panel(handles.Patch1);1686 end1687 1688 %%1689 1690 1691 1656 %% MAIN LOOP 1692 1657 time=get(handles.ImaDoc,'UserData'); %get the set of times … … 1832 1797 switch CivMode 1833 1798 case 'CivX' 1834 cmd _PATCH=cmd_patch(filecell.nc.civ1{ifile,j},param.Patch1,Param.xml.PatchBin);1835 cmd=[cmd cmd_PATCH'\n'];1799 cmd=[cmd... 1800 cmd_patch(filecell.nc.civ1{ifile,j},Param,'Patch1') '\n']; 1836 1801 case 'CivAll' 1837 1802 patch1.inputFileName=filecell.nc.civ1{ifile,j} ; … … 3189 3154 3190 3155 %------------------------------------------------------------------------ 3191 % --- PATCH3192 function cmd=cmd_patch(filename_nc,Param,PatchBin)3193 %------------------------------------------------------------------------3194 namelog=[filename_nc(1:end-3) '_patch.log'];3195 3196 % if test_interp==03197 if isunix3198 cmd=[PatchBin...3199 ' -f ' filename_nc ' -m ' num2str(Param.Nx)...3200 ' -n ' num2str(Param.Ny) ' -ro ' num2str(Param.SmoothingParam)...3201 ' -nopt ' num2str(Param.SubdomainSize) ...3202 ' > ' namelog ' 2>&1']; % redirect standard output to the log file3203 else3204 cmd=['"' Param.xml.PatchBin...3205 '" -f "' filename_nc '" -m ' param.Patch1.Nx...3206 ' -n ' param.Patch1.Ny ' -ro ' param.Patch1.SmoothParam...3207 ' -nopt ' Param.Patch1.SubdomainSize ...3208 ' > "' namelog '" 2>&1']; % redirect standard output to the log file3209 end3210 % else %nouveau programme patch3211 % cmd=[PatchBin ' -f ' filename_nc ' -m ' nx_patch ' -n ' ny_patch ' -ro ' rho_patch ...3212 % ' -max ' thresh_value ' -nopt ' subdomain_patch ' > ' namelog ' 2>&1']; % redirect standard output to the log file3213 % end3214 cmd=regexprep(cmd,'\\','\\\\');3215 3216 %------------------------------------------------------------------------3217 3156 % --- STEREO Interp 3218 3157 function cmd=RUN_STINTERP(stinterpBin,filename_A_nc,filename_B_nc,filename_nc,nx_patch,ny_patch,rho_patch,subdomain_patch,thresh_value,xmlA,xmlB) … … 4343 4282 % end 4344 4283 % 4345 %------------------------------------------------------------------------4346 function par=read_param_fix1(handles,filecell)4347 %------------------------------------------------------------------------4348 par.flagindex1(1)=get(handles.CheckFmin2, 'Value');4349 par.flagindex1(2)=get(handles.CheckF3, 'Value');4350 par.flagindex1(3)=get(handles.CheckF2, 'Value');4351 par.thresh_vecC1=str2double(get(handles.num_MinCorr,'String'));%threshold on image correlation vec_C4352 par.thresh_vel1=str2double(get(handles.num_MaxVel,'String'));%threshold on velocity modulus4353 par.test_mask=get(handles.CheckMask,'Value');4354 par.nbslice_mask=get(handles.txt_MaskName,'UserData'); % get the number of slices (= number of masks)4355 %%%%%%%%%%%%%COMPLETER LE PROGRAMME FIX4356 % inf_sup=get(handles.inf_sup1,'Value');804357 % fileref=get(handles.ref_fix1,'String');4358 % refpath=get(handles.ref_fix1,'UserData');4359 % fileref=fullfile(refpath,fileref);4360 par.menu=get(handles.field_ref1,'String');4361 par.index=get(handles.field_ref1,'Value');4362 if isempty(par.menu)4363 par.fieldchoice='';4364 else4365 par.fieldchoice=menu{index};4366 msgbox_uvmat('WARNING','reference field is not used presently with batch, use RUN option')4367 end4368 if par.test_mask==04369 par.maskname='';4370 else4371 maskdispl=get(handles.txt_MaskName,'String');4372 nbslice_mask=str2double(maskdispl(1:end-4)); %4373 num1_mask=mod(num1_civ1(ifile)-1,nbslice_mask)+1;4374 maskbase=[filecell.filebase '_' maskdispl];4375 par.maskname=name_generator(maskbase,num1_mask,1,'.png','_i');4376 end4377 4284 4378 %------------------------------------------------------------------------4379 function par=read_param_patch1(handles)4380 %------------------------------------------------------------------------4381 4382 par.rho_patch=str2double(get(handles.rho_patch1,'String'));4383 if isnan(par.rho_patch)4384 par.rho_patch='1000';4385 set(handles.rho_patch1,'String','1')4386 else4387 par.rho_patch=num2str(1000*par.rho_patch);4388 end4389 par.nx_patch=get(handles.nx_patch1,'String');4390 par.ny_patch=get(handles.ny_patch1,'String');4391 if isnan(str2double(par.nx_patch))4392 par.nx_patch='50' ;%default4393 set(handles.nx_patch1,'String','50');4394 end4395 if isnan(str2double(par.ny_patch))4396 par.ny_patch='50' ;%default4397 set(handles.ny_patch1,'String','50');4398 end4399 par.subdomain_patch=get(handles.subdomain_patch1,'String');4400 par.thresh_patch=get(handles.thresh_patch1,'String');4401 4402 4285 4403 4286 %------------------------------------------------------------------------ … … 5468 5351 cmd=[Param.xml.FixBin ' -f ' filename '.nc -fi1 ' num2str(Param.(fixname).flagindex(1)) ... 5469 5352 ' -fi2 ' num2str(Param.(fixname).flagindex(2)) ' -fi3 ' num2str(Param.(fixname).flagindex(3)) ... 5470 ' -threshC ' num2str(Param.(fixname).thresh_vecC) ' -threshV ' num2str(Param.(fixname).thresh_vel)... 5471 ' -maskName ' Param.(fixname).MaskName '" > ' filename '.fix1.log']; 5353 ' -threshC ' num2str(Param.(fixname).thresh_vecC)...% ' -threshV ' num2str(Param.(fixname).thresh_vel)... 5354 ' -maskName ' Param.(fixname).MaskName... 5355 '" > ' filename '.' lower(fixname) '.log 2>&1']; 5472 5356 else 5473 5357 cmd=['"' Param.xml.FixBin '" -f "' filename '.nc" -fi1 ' num2str(Param.(fixname).CheckFmin2)... 5474 5358 ' -fi2 ' num2str(Param.(fixname).CheckF2) ' -fi3 ' num2str(Param.(fixname).CheckF3) ... 5475 5359 ' -threshC ' num2str(Param.(fixname).MinCorr)... 5476 ' -maskName "' Param.(fixname).MaskName '" > "' filename '.fix1.log"']; 5360 ' -maskName "' Param.(fixname).MaskName... 5361 '" > "' filename '.' lower(fixname) '.log" 2>&1']; 5477 5362 % ' -threshV ' num2str(Param.(fixname).thresh_vel)... 5478 5363 cmd=regexprep(cmd,'\\','\\\\'); 5479 5364 end 5365 5366 5367 function cmd=cmd_patch(filename,Param,patchname) 5368 %% ------------------------------------------------------------------------ 5369 filename=regexprep(filename,'.nc',''); 5370 % if test_interp==0 5371 if isunix 5372 cmd=[Param.xml.PatchBin... 5373 ' -f ' filename '.nc -m ' num2str(Param.(patchname).Nx)... 5374 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothingParam)... 5375 ' -nopt ' num2str(Param.(patchname).SubdomainSize) ... 5376 ' > ' filename '.' lower(patchname) '.log 2>&1']; % redirect standard output to the log file 5377 else 5378 cmd=['"' Param.xml.PatchBin... 5379 '" -f "' filename '.nc" -m ' num2str(Param.(patchname).Nx)... 5380 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothingParam)... 5381 ' -nopt ' num2str(Param.(patchname).SubdomainSize)... 5382 ' > "' filename '.' lower(patchname) '.log" 2>&1']; % redirect standard output to the log file 5383 cmd=regexprep(cmd,'\\','\\\\'); 5384 end 5385 % else %nouveau programme patch 5386 % cmd=[PatchBin ' -f ' filename_nc ' -m ' nx_patch ' -n ' ny_patch ' -ro ' rho_patch ... 5387 % ' -max ' thresh_value ' -nopt ' subdomain_patch ' > ' namelog ' 2>&1']; % redirect standard output to the log file 5388 % end
Note: See TracChangeset
for help on using the changeset viewer.