Changeset 332 for trunk/src/name_generator.m
- Timestamp:
- Dec 13, 2011, 11:20:07 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/name_generator.m
r221 r332 26 26 % nom_type='_1a','_1A','_01a','_01A',...: idem, with a separator '_' before the index 27 27 % nom_type='_1_1','_01_1',...: matrix of files with two indices i and j separated by '_'(e.g. 'aa_45_2.png') 28 % nom_type='_ i1-i2': from pairs from a single index (e.g. 'aa_45-47.nc')29 % nom_type='_ i_j1-j2': pairs of j indices (e.g. 'aa_45_2-3.nc')30 % nom_type='_ i1-i2_j': pairs of i indices (e.g. 'aa_45-46_2.nc')28 % nom_type='_1-2': from pairs from a single index (e.g. 'aa_45-47.nc') 29 % nom_type='_1_1-2': pairs of j indices (e.g. 'aa_45_2-3.nc') 30 % nom_type='_1-2_1': pairs of i indices (e.g. 'aa_45-46_2.nc') 31 31 % nom_type='_1_ab','1_ab','01_ab'..., from pairs of '#' images (e.g.'aa045bc.nc'), ext='.nc' 32 32 %'comp_input' (for nom_type involving index pairs (e.g. netc)) … … 71 71 num_i2_out=num_i2;%default output 72 72 num_j2_out=num_j2;%default output 73 test_pairs=numel(nom_type)>=2 &&(strcmp(nom_type,'_ i1-i2_j1-j2')|| strcmp(nom_type(end-1:end),'ab')|| strcmp(nom_type(end-1:end),'AB')||...74 strcmp(nom_type,'_ i_j1-j2')|| strcmp(nom_type,'_i1-i2_j')||strcmp(nom_type,'_i1-i2'));75 %test_2D= strcmp(nom_type(end-1:end),'ab')|| strcmp(nom_type(end-1:end),'AB') ||strcmp(nom_type,'_ i_j1-j2');76 %test_3D=strcmp(nom_type,'_ i1-i2_j')|| strcmp(nom_type,'_i1-i2');73 test_pairs=numel(nom_type)>=2 &&(strcmp(nom_type,'_1-2_1-2')|| strcmp(nom_type(end-1:end),'ab')|| strcmp(nom_type(end-1:end),'AB')||... 74 strcmp(nom_type,'_1_1-2')|| strcmp(nom_type,'_1-2_1')||strcmp(nom_type,'_1-2')); 75 %test_2D= strcmp(nom_type(end-1:end),'ab')|| strcmp(nom_type(end-1:end),'AB') ||strcmp(nom_type,'_1_1-2'); 76 %test_3D=strcmp(nom_type,'_1-2_1')|| strcmp(nom_type,'_1-2'); 77 77 if ~isequal(subdir,'') && ~isequal(subdir,'?') 78 78 [Path,Name]=fileparts(filebase); … … 144 144 filename=[filename num2str(num_i1,numstr) num_j_str ext]; 145 145 num_i2_out=num_i1; 146 elseif isequal(nom_type,' i_j1-j2')146 elseif isequal(nom_type,'1_1-2') 147 147 if isequal(num2str(num_j1),num2str(num_j2))% case of displacements at the same time 148 148 filename=[filename num2str(num_i1) '_' num2str(num_j1) ext]; … … 151 151 end 152 152 num_i2_out=num_i1; 153 elseif isequal(nom_type,' i1-i2_j')153 elseif isequal(nom_type,'1-2_1') 154 154 if isequal(num2str(num_i1),num2str(num_i2))% case of displacements at the same time 155 155 filename=[filename num2str(num_i1) '_' num2str(num_j1) ext]; … … 158 158 end 159 159 num_j2_out=num_j1; 160 elseif isequal(nom_type,' i1-i2')160 elseif isequal(nom_type,'1-2') 161 161 if isequal(num2str(num_i1),num2str(num_i2))% case of displacements at the same time 162 162 filename=[filename num2str(num_i1) ext]; … … 165 165 end 166 166 num_j2_out=num_j1; 167 elseif isequal(nom_type,' i1-i2_j1-j2')167 elseif isequal(nom_type,'1-2_1-2') 168 168 if isequal(num2str(num_i1),num2str(num_i2))% case of displacements at the same time 169 169 app1= num2str(num_i1); … … 215 215 if isequal(nom_type,'#_ab') 216 216 filename=[filebasesub num2str(num_i1,'%03d') '_' num2stra(num_j1,nom_type) num2stra(num_j2,nom_type) ext]; 217 elseif isequal(nom_type,'_ i1_j1-j2')217 elseif isequal(nom_type,'_1_1-2') 218 218 filename=[filebasesub '_' num2str(num_i1) '_' num2str(num_j1) '-' num2str(num_i2) ext]; 219 elseif isequal(nom_type,'_ i1-i2_j')219 elseif isequal(nom_type,'_1-2_1') 220 220 filename=[filebasesub '_' num2str(num_i1) '-' num2str(num_i2) '_' num2str(num_j1) ext]; 221 elseif isequal(nom_type,'_ i1-i2')221 elseif isequal(nom_type,'_1-2') 222 222 filename=[filebasesub '_' num2str(num_i1) '-' num2str(num_i2) ext]; 223 223 end … … 246 246 if isequal(nom_type,'#_ab') 247 247 dirpair=dir([filebasesub num2str(num_i1,'%03d') '_*.nc']); 248 elseif isequal(nom_type,'_ i_j1-j2')248 elseif isequal(nom_type,'_1_1-2') 249 249 dirpair=dir([filebasesub '_' num2str(num_i1) '_*-*.nc']); 250 elseif isequal(nom_type,'_ i1-i2_j')250 elseif isequal(nom_type,'_1-2_1') 251 251 dirpair=dir([filebasesub '_' num2str(num_i1) '-*_' num2str(num_j1) '.nc']); 252 elseif isequal(nom_type,'_ i1-i2')252 elseif isequal(nom_type,'_1-2') 253 253 dirpair=dir([filebasesub '_' num2str(num_i1) '-*.nc']); 254 254 if isempty(dirpair)
Note: See TracChangeset
for help on using the changeset viewer.