- Timestamp:
- May 21, 2010, 5:01:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r89 r90 2329 2329 if isunix % check: necessaire aussi en RUN? 2330 2330 %fid=fopen([filename '.cmx'],'w') 2331 cmd='#!/bin/bash ';2332 cmd=[cmd ' \n' '#$ -cwd'];2333 cmd=[cmd ' \n' 'hostname && date'];2331 cmd='#!/bin/bash \n'; 2332 cmd=[cmd '#$ -cwd \n']; 2333 cmd=[cmd 'hostname && date \n']; 2334 2334 end 2335 2335 if civAll … … 2399 2399 i_cmd=i_cmd+1; 2400 2400 if isequal(civAll,0) 2401 cmd=[cmd '\n' BATCH_CIV1(filename_cmx(1:end-4),namelog,par_civ1,handles,sparam)];2401 cmd=[cmd BATCH_CIV1(filename_cmx(1:end-4),namelog,par_civ1,handles,sparam) '\n']; 2402 2402 else 2403 2403 civAllCmd=[civAllCmd ' civ1 ']; … … 2431 2431 ' -fi2 ' num2str(flagindex1(2)) ' -fi3 ' num2str(flagindex1(3)) ... 2432 2432 ' -threshC ' num2str(thresh_vecC1) ' -threshV ' num2str(thresh_vel1) ' -maskName ' maskname]; 2433 cmd=[cmd '\n' cmd_FIX];2433 cmd=[cmd cmd_FIX '\n']; 2434 2434 else 2435 2435 fix1.inputFileName=filecell.nc.civ1{ifile,j} ; … … 2456 2456 if isequal(civAll,0) 2457 2457 cmd_PATCH=RUN_PATCH(filecell.nc.civ1{ifile,j},nx_patch1,ny_patch1,rho_patch1,subdomain_patch1,thresh_patch1,test_interp,PatchBin); 2458 cmd=[cmd '\n' cmd_PATCH];2458 cmd=[cmd cmd_PATCH '\n']; 2459 2459 else 2460 2460 patch1.inputFileName=filecell.nc.civ1{ifile,j} ; … … 2568 2568 if isequal(civAll,0) 2569 2569 if(isunix) 2570 cmd=[cmd ' \n' 'cp -f ' filename_cmx '2 ' filename_cmx '\n' cmd_CIV2];2570 cmd=[cmd 'cp -f ' filename_cmx '2 ' filename_cmx '\n' cmd_CIV2 '\n']; 2571 2571 else 2572 cmd=[cmd ' \n' 'copy /Y ' filename_cmx '2 ' filename_cmx '\n' cmd_CIV2];2572 cmd=[cmd 'copy /Y ' filename_cmx '2 ' filename_cmx '\n' cmd_CIV2 '\n']; 2573 2573 end 2574 2574 else … … 2603 2603 ' -fi2 ' num2str(flagindex2(2)) ' -fi3 ' num2str(flagindex2(3)) ... 2604 2604 ' -threshC ' num2str(thresh_vec2C) ' -threshV ' num2str(thresh_vel2) ' -maskName ' maskname]; 2605 cmd=[cmd '\n' cmd_FIX];2605 cmd=[cmd cmd_FIX '\n']; 2606 2606 else 2607 2607 fix2.inputFileName=filecell.nc.civ2{ifile,j} ; … … 2628 2628 if isequal(civAll,0) 2629 2629 cmd_PATCH=RUN_PATCH(filecell.nc.civ2{ifile,j},nx_patch2,ny_patch2,rho_patch2,subdomain_patch2,thresh_patch2,test_interp,PatchBin); 2630 cmd=[cmd '\n' cmd_PATCH];2630 cmd=[cmd cmd_PATCH '\n']; 2631 2631 else 2632 2632 patch2.inputFileName=filecell.nc.civ1{ifile,j} ; … … 2674 2674 save(civAllxml,[filename_cmx([1:end-4]) '.xml']); 2675 2675 %cmd=char({cmd;[CivBin ' -f ' [filename_cmx([1:end-4]) '.xml'] ' ' civAllCmd]}); 2676 cmd=[cmd '\n' CivBin ' -f ' filename_cmx(1:end-4) '.xml ' civAllCmd];2676 cmd=[cmd CivBin ' -f ' filename_cmx(1:end-4) '.xml ' civAllCmd '\n']; 2677 2677 end 2678 2678 % create the .bat file: … … 2685 2685 filename_bat(end-2:end)='bat'; 2686 2686 fid=fopen(filename_bat,'w'); 2687 2688 2687 fprintf(fid,cmd); 2689 2688 fclose(fid); … … 4827 4826 % 4828 4827 % textout=char(textcmx); 4829 4828 par.filename_ima_a=regexprep(par.filename_ima_a,'.png',''); 4829 par.filename_ima_b=regexprep(par.filename_ima_b,'.png',''); 4830 4830 fid=fopen([filename '.cmx'],'w'); 4831 4831 fprintf(fid,['############## CMX file' '\n' ]); 4832 fprintf(fid, ['FirstImage ' par.filename_ima_a'\n' ]);4833 fprintf(fid, ['LastImage ' par.filename_ima_b'\n' ]);4832 fprintf(fid, ['FirstImage ' regexprep(par.filename_ima_a,'\\','\\\\') '\n' ]); 4833 fprintf(fid, ['LastImage ' regexprep(par.filename_ima_b,'\\','\\\\') '\n' ]); 4834 4834 fprintf(fid, ['XX' '\n' ]); 4835 4835 fprintf(fid, ['Mask ' par.maskflag '\n' ]); … … 4862 4862 4863 4863 cmd_CIV1=[sparam.Civ1Bin ' -f ' filename '.cmx' ]; % redirect standard output to the log file 4864 cmd_CIV1=regexprep(cmd_CIV1,'\\','\\\\'); 4865 namelog=regexprep(namelog,'\\','\\\\'); 4866 4864 4867 if(isunix) 4865 4868 [Rootbat,Filebat,extbat]=fileparts(namelog);
Note: See TracChangeset
for help on using the changeset viewer.