Ignore:
Timestamp:
Dec 13, 2011, 11:20:07 AM (12 years ago)
Author:
sommeria
Message:

NomType? changed from _i1-i2 ... to _1-2 ... (bugs to be expected!)
bug corrected in geometry_calib
series changed by introducing a from FileIndices?, introduction of find_file_series to detect the file series corresponding to an input file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/name2display.m

    r317 r332  
    1818%   nom_type='_1a','_1A','_01a','_01A',...: idem, with a separator '_' before the index
    1919%   nom_type='_1_1','_01_1',...: matrix of files with two indices i and j separated by '_'(e.g. 'aa_45_2.png')
    20 %   nom_type='_i1-i2': from pairs from a single index (e.g. 'aa_45-47.nc')
    21 %   nom_type='_i_j1-j2': pairs of j indices (e.g. 'aa_45_2-3.nc')
    22 %   nom_type='_i1-i2_j': pairs of i indices (e.g. 'aa_45-46_2.nc')
     20%   nom_type='_1-2': from pairs from a single index (e.g. 'aa_45-47.nc')
     21%   nom_type='_1_1-2': pairs of j indices (e.g. 'aa_45_2-3.nc')
     22%   nom_type='_1-2_j': pairs of i indices (e.g. 'aa_45-46_2.nc')
    2323%   nom_type='_1_ab','1_ab','01_ab'..., from pairs of '#' images (e.g.'aa045bc.nc'), ext='.nc'
    2424%subdir: name of the subdirectory for netcdf files
     
    6969penult=double(RootFile(indcur-1));%ascii code of the penultimate character
    7070testsub=0; %default
    71 % case of an indexed series in a single file
    72 if strcmpi(ext,'.avi')
    73      nom_type='*';
    74 %case of a numerical index follewed by a lower case letter (e.g. a,b,c):
    75 %the penultimate character is a number and the last one a letter (lower case: last >= 97 && last <= 122
    76 %                                                                 capital
    77 %                                                                 letter:  last >= 65 && last <= 90) 
    78 elseif  penult >= 48 && penult <= 57 && ((last >= 65 && last <= 90)||(last >= 97 && last <= 122))
     71% % case of an indexed series in a single file
     72% if strcmpi(ext,'.avi')
     73%      nom_type='*';
     74% %case of a numerical index follewed by a lower case letter (e.g. a,b,c):
     75% %the penultimate character is a number and the last one a letter (lower case: last >= 97 && last <= 122
     76% %                                                                 capital
     77% %                                                                 letter:  last >= 65 && last <= 90) 
     78if  penult >= 48 && penult <= 57 && ((last >= 65 && last <= 90)||(last >= 97 && last <= 122))
    7979    str_a=last_str; %extract appendix a,b,c... or A,B,C... as output.
    8080    ind_end=indcur-1; %current index just before the suffix letter
     
    9898    str_a=num2;
    9999    str_b=num3;
    100     nom_type='_i1-i2_j1-j2';
     100    nom_type='_1-2_1-2';
    101101    testsub=1;
    102102    indcur=separ0-1;
     
    105105    str2=num2;
    106106    str_a=num3;
    107     nom_type='_i1-i2_j';
     107    nom_type='_1-2_1';
    108108    testsub=1;
    109109    indcur=separ1-1;
     
    113113    str_a=num2;
    114114    str_b=num3;
    115     nom_type='_i_j1-j2';
     115    nom_type='_1_1-2';
    116116    testsub=1;
    117117elseif strcmp(filelit(end-1:end),'_-')
     
    120120    str2=num3;
    121121    str_a='';
    122     nom_type='_i1-i2';
     122    nom_type='_1-2';
    123123    testsub=1;
    124124elseif strcmp(filelit(end-1:end),'__')
Note: See TracChangeset for help on using the changeset viewer.