Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r159 r163 1861 1861 cmd=[cmd '#$ -cwd \n']; 1862 1862 cmd=[cmd 'hostname && date \n']; 1863 cmd=[cmd 'umask 002 \n']; 1863 cmd=[cmd 'umask 002 \n'];%allow writting access for user group for created files 1864 1864 end 1865 1865 if civAll … … 1964 1964 end 1965 1965 if isequal(civAll,0) 1966 if isunix %unix system 1966 1967 cmd_FIX=[sparam.FixBin ' -f ' filecell.nc.civ1{ifile,j} ' -fi1 ' num2str(flagindex1(1)) ... 1967 1968 ' -fi2 ' num2str(flagindex1(2)) ' -fi3 ' num2str(flagindex1(3)) ... 1968 1969 ' -threshC ' num2str(thresh_vecC1) ' -threshV ' num2str(thresh_vel1) ' -maskName ' maskname]; 1969 cmd_FIX=regexprep(cmd_FIX,'\\','\\\\'); 1970 else %windows system 1971 cmd_FIX=['"' sparam.FixBin '" -f "' filecell.nc.civ1{ifile,j} '" -fi1 ' num2str(flagindex1(1)) ... 1972 ' -fi2 ' num2str(flagindex1(2)) ' -fi3 ' num2str(flagindex1(3)) ... 1973 ' -threshC ' num2str(thresh_vecC1) ' -threshV ' num2str(thresh_vel1) ' -maskName "' maskname '"']; 1974 cmd_FIX=regexprep(cmd_FIX,'\\','\\\\'); 1975 end 1970 1976 cmd=[cmd cmd_FIX '\n']; 1971 1977 else … … 1993 1999 if isequal(civAll,0) 1994 2000 cmd_PATCH=PATCH_CMD(filecell.nc.civ1{ifile,j},nx_patch1,ny_patch1,rho_patch1,subdomain_patch1,thresh_patch1,test_interp,sparam.PatchBin); 1995 cmd_PATCH=regexprep(cmd_PATCH,'\\','\\\\');1996 2001 cmd=[cmd cmd_PATCH '\n']; 1997 2002 else … … 2109 2114 else 2110 2115 filename_cmx=regexprep(filename_cmx,'\\','\\\\'); 2111 cmd=[cmd 'copy /Y ' filename_cmx '2 ' filename_cmx '\n' cmd_CIV2 '\n'];2116 cmd=[cmd 'copy /Y "' filename_cmx '2" "' filename_cmx '"\n' cmd_CIV2 '\n']; 2112 2117 end 2113 2118 else … … 2139 2144 end 2140 2145 if isequal(civAll,0) 2146 if isunix 2141 2147 cmd_FIX=[sparam.FixBin ' -f ' filecell.nc.civ2{ifile,j} ' -fi1 ' num2str(flagindex2(1)) ... 2142 2148 ' -fi2 ' num2str(flagindex2(2)) ' -fi3 ' num2str(flagindex2(3)) ... 2143 2149 ' -threshC ' num2str(thresh_vec2C) ' -threshV ' num2str(thresh_vel2) ' -maskName ' maskname]; 2144 cmd_FIX=regexprep(cmd_FIX,'\\','\\\\'); 2150 else 2151 cmd_FIX=['"' sparam.FixBin '" -f "' filecell.nc.civ2{ifile,j} '" -fi1 ' num2str(flagindex2(1)) ... 2152 ' -fi2 ' num2str(flagindex2(2)) ' -fi3 ' num2str(flagindex2(3)) ... 2153 ' -threshC ' num2str(thresh_vec2C) ' -threshV ' num2str(thresh_vel2) ' -maskName "' maskname '"']; 2154 cmd_FIX=regexprep(cmd_FIX,'\\','\\\\'); 2155 end 2145 2156 cmd=[cmd cmd_FIX '\n']; 2146 2157 else … … 2168 2179 if isequal(civAll,0) 2169 2180 cmd_PATCH=PATCH_CMD(filecell.nc.civ2{ifile,j},nx_patch2,ny_patch2,rho_patch2,subdomain_patch2,thresh_patch2,test_interp,sparam.PatchBin); 2170 cmd_PATCH=regexprep(cmd_PATCH,'\\','\\\\');2171 2181 cmd=[cmd cmd_PATCH '\n']; 2172 2182 else … … 2240 2250 % cmd_str=['!at -qb now -f ' filename_bat ' &']; %ou at -qb now -f bad idea... 2241 2251 else %case of Windows 2242 cmd_str=['@call ' regexprep(filename_bat,'\\','\\\\')];2252 cmd_str=['@call "' regexprep(filename_bat,'\\','\\\\') '"']; 2243 2253 end 2244 2254 super_cmd=[super_cmd cmd_str '\n']; … … 2524 2534 filecell={}; 2525 2535 return 2526 else 2536 elseif isunix 2527 2537 [xx,msg2] = fileattrib(subdir_civ1_new,'+w','g'); %yield writing access (+w) to user group (g) 2528 2538 if ~strcmp(msg2,'') … … 3011 3021 namelog=[filename_nc([1:end-3]) '_patch.log']; 3012 3022 if test_interp==0 3023 if isunix 3013 3024 cmd_PATCH=[PatchBin ' -f ' filename_nc ' -m ' nx_patch ' -n ' ny_patch ' -ro ' rho_patch ' -nopt ' subdomain_patch ... 3014 3025 ' > ' namelog ' 2>&1']; % redirect standard output to the log file 3026 else 3027 cmd_PATCH=['"' PatchBin '" -f "' filename_nc '" -m ' nx_patch ' -n ' ny_patch ' -ro ' rho_patch ' -nopt ' subdomain_patch ... 3028 ' > "' namelog '" 2>&1']; % redirect standard output to the log file 3029 end 3015 3030 else %nouveau programme patch 3016 3031 cmd_PATCH=[PatchBin ' -f ' filename_nc ' -m ' nx_patch ' -n ' ny_patch ' -ro ' rho_patch ... 3017 3032 ' -max ' thresh_value ' -nopt ' subdomain_patch ' > ' namelog ' 2>&1']; % redirect standard output to the log file 3018 3033 end 3019 3034 cmd_PATCH=regexprep(cmd_PATCH,'\\','\\\\'); 3020 3035 %------------------------------------------------------------------------ 3021 3036 % --- STEREO Interp … … 4032 4047 par.Dt='1' ;%case of 'displacement' mode 4033 4048 end 4034 %4035 % textcmx={'############## CMX file';...4036 % ['FirstImage ' par.filename_ima_a];...4037 % ['LastImage ' par.filename_ima_b];...4038 % 'XX' ;...4039 % ['Mask ' par.maskflag] ;...4040 % ['MaskName ' par.maskname];...4041 % ['ImageSize ' par.npx ' ' par.npy];... %VERIFIER CAS GENERAL ?4042 % ['CorrelationBoxesSize ' par.ibx ' ' par.iby];...4043 % ['SearchBoxeSize ' par.isx ' ' par.isy];...4044 % ['RO ' par.rho];...4045 % ['GridSpacing ' par.dx ' ' par.dy];...4046 % 'XX 1.0';...4047 % ['Dt_TO ' par.Dt ' ' par.T0];...4048 % ['PixCmXY ' par.pxcmx ' ' par.pxcmy];...4049 % 'XX 1';...4050 % ['ShiftXY ' par.shiftx ' ' par.shifty];...4051 % ['Grid ' par.gridflag];...4052 % ['GridName ' par.gridname] ;...4053 % 'XX 85';...4054 % 'XX 1.0';...4055 % 'XX 1.0';...4056 % 'Hart 1';...4057 % 'DecimalShift 0';...4058 % 'Deformation 0';...4059 % 'CorrelationMin 0';...4060 % 'IntensityMin 0';...4061 % 'SeuilImage n';...4062 % 'SeuilImageValues 0 4096';...4063 % ['ImageToUse ' par.term_a ' ' par.term_b];... % VERIFIER ?4064 % 'ImageUsedBefore null null'};4065 %4066 % textout=char(textcmx);4067 4049 par.filename_ima_a=regexprep(par.filename_ima_a,'.png',''); 4068 4050 par.filename_ima_b=regexprep(par.filename_ima_b,'.png',''); … … 4100 4082 fclose(fid); 4101 4083 4102 cmd_CIV1=[sparam.Civ1Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file 4103 cmd_CIV1=regexprep(cmd_CIV1,'\\','\\\\'); 4104 namelog=regexprep(namelog,'\\','\\\\'); 4105 4084 % cmd_CIV1=[sparam.Civ1Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file 4085 % cmd_CIV1=regexprep(cmd_CIV1,'\\','\\\\'); 4086 % namelog=regexprep(namelog,'\\','\\\\'); 4106 4087 if(isunix) 4107 4088 [Rootbat,Filebat,extbat]=fileparts(namelog); 4108 4089 ncName=fullfile(Rootbat,[ Filebat '.nc']); 4090 cmd_CIV1=[sparam.Civ1Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file 4109 4091 cmd_CIV1=[cmd_CIV1 '\n' 'mv ' namelog ' ' regexprep(namelog,'\.log','') '.civ1.log' '\n' 'chmod g+w ' ncName]; 4110 else 4111 cmd_CIV1=[cmd_CIV1 '\n' 'copy /Y ' namelog ' ' regexprep(namelog,'\.log','') '.civ1.log']; 4092 else %Windows system 4093 cmd_CIV1=['"' sparam.Civ1Bin '" -f "' filename '.cmx" >"' filename '.log"' ]; % redirect standard output to the log file 4094 cmd_CIV1=regexprep(cmd_CIV1,'\\','\\\\'); 4095 namelog=regexprep(namelog,'\\','\\\\'); 4096 cmd_CIV1=[cmd_CIV1 '\n' 'copy /Y "' namelog '" "' regexprep(namelog,'\.log','') '.civ1.log"']; 4112 4097 end 4113 4098 … … 4212 4197 par.Dt='1' ;%case of 'displacement' mode 4213 4198 end 4214 % textcmx=['############## CMX file' '\n'...4215 % ['FirstImage ' par.filename_ima_a] '\n'...4216 % ['LastImage ' par.filename_ima_b] '\n'...4217 % 'XX' '\n'...4218 % ['Mask ' par.maskflag] '\n'...4219 % ['MaskName ' par.maskname] '\n'...4220 % ['ImageSize ' par.npx ' ' par.npy] '\n'...4221 % ['CorrelationBoxesSize ' par.ibx ' ' par.iby] '\n'...4222 % ['SearchBoxeSize ' par.ibx ' ' par.iby] '\n'...4223 % ['RO ' par.rho] '\n'...4224 % ['GridSpacing ' par.dx ' ' par.dy] '\n'...4225 % 'XX 1.0' '\n'...4226 % ['Dt_TO ' par.Dt ' ' par.T0] '\n'...4227 % ['PixCmXY ' par.pxcmx ' ' par.pxcmy] '\n'...4228 % 'XX 1' '\n'...4229 % ['ShiftXY 0 0'] '\n'...4230 % ['Grid ' par.gridflag] '\n'...4231 % ['GridName ' par.gridname] '\n'...4232 % 'XX 85' '\n'...4233 % 'XX 1.0' '\n'...4234 % 'XX 1.0' '\n'...4235 % 'Hart 1' '\n'...4236 % ['DecimalShift ' par.decimal] '\n'...4237 % ['Deformation ' par.deformation] '\n'...4238 % 'CorrelationMin 0' '\n'...4239 % 'IntensityMin 0' '\n'...4240 % 'SeuilImage n' '\n'...4241 % 'SeuilImageValues 0 4096' '\n'...4242 % ['ImageToUse ' par.term_a ' ' par.term_b] '\n'... % VERIFIER ?4243 % ['ImageUsedBefore ' par.filename_nc1]];4244 % textout=char(textcmx);4245 % fid=fopen([filename_cmx '2'],'w');4246 % fprintf(fid,textout);4247 % fclose(fid)4248 4199 4249 4200 par.filename_ima_a=regexprep(par.filename_ima_a,'.png',''); … … 4282 4233 fclose(fid); 4283 4234 4284 cmd_CIV2=[sparam.Civ2Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file4285 cmd_CIV2=regexprep(cmd_CIV2,'\\','\\\\');4286 namelog=regexprep(namelog,'\\','\\\\');4287 4288 4235 if(isunix) 4236 cmd_CIV2=[sparam.Civ2Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file 4289 4237 [Rootbat,Filebat,extbat]=fileparts(namelog); 4290 4238 ncName=fullfile(Rootbat,[ Filebat '.nc']); 4291 4239 cmd_CIV2=[cmd_CIV2 '\n' 'mv ' namelog ' ' regexprep(namelog,'\.log','') '.civ2.log' '\n' 'chmod g+w ' ncName]; 4292 else 4293 cmd_CIV2=[cmd_CIV2 '\n' 'copy /Y ' namelog ' ' regexprep(namelog,'\.log','') '.civ2.log']; 4240 else 4241 cmd_CIV2=['"' sparam.Civ2Bin '" -f "' filename '.cmx" >"' filename '.log"' ]; % redirect standard output to the log file 4242 cmd_CIV2=regexprep(cmd_CIV2,'\\','\\\\'); 4243 namelog=regexprep(namelog,'\\','\\\\'); 4244 cmd_CIV2=[cmd_CIV2 '\n' 'copy /Y "' namelog '" "' regexprep(namelog,'\.log','') '.civ2.log"']; 4294 4245 end 4295 4246 -
trunk/src/uvmat.m
r159 r163 447 447 %global filebase 448 448 fileinput=[PathName FileName];%complete file name 449 testblank=findstr(fileinput,' ');%look for blanks450 if ~isempty(testblank)451 msgbox_uvmat('ERROR',['The input file name ' fileinput ' contains blank character : This is not allowed. Please change name'])452 return453 end449 % testblank=findstr(fileinput,' ');%look for blanks 450 % if ~isempty(testblank) 451 % msgbox_uvmat('ERROR',['The input file name ' fileinput ' contains blank character : This is not allowed. Please change name']) 452 % return 453 % end 454 454 sizf=size(fileinput); 455 455 if (~ischar(fileinput)||~isequal(sizf(1),1)),return;end … … 986 986 'Pick a file',RootPath); 987 987 fileinput_1=[PathName FileName];%complete file name 988 testblank=findstr(fileinput_1,' ');%look for blanks989 if ~isempty(testblank)990 msgbox_uvmat('ERROR',['The input file name ' fileinput_1 ' contains blank character : This is not allowed. Please change name'])991 return992 end988 % testblank=findstr(fileinput_1,' ');%look for blanks 989 % if ~isempty(testblank) 990 % msgbox_uvmat('ERROR',['The input file name ' fileinput_1 ' contains blank character : This is not allowed. Please change name']) 991 % return 992 % end 993 993 sizf=size(fileinput_1); 994 994 if (~ischar(fileinput_1)||~isequal(sizf(1),1)),return;end … … 5017 5017 'Pick an xml Object file',get(handles.RootPath,'String')); 5018 5018 fileinput=[PathName FileName];%complete file name 5019 testblank=findstr(fileinput,' ');%look for blanks5020 if ~isempty(testblank)5021 msgbox_uvmat('ERROR','forbidden input file name: contain blanks')5022 return5023 end5019 % testblank=findstr(fileinput,' ');%look for blanks 5020 % if ~isempty(testblank) 5021 % msgbox_uvmat('ERROR','forbidden input file name: contain blanks') 5022 % return 5023 % end 5024 5024 sizf=size(fileinput); 5025 5025 if (~ischar(fileinput)||~isequal(sizf(1),1)),return;end
Note: See TracChangeset
for help on using the changeset viewer.