Changeset 81 for trunk/src/civ.m
- Timestamp:
- Apr 13, 2010, 10:37:08 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r73 r81 631 631 632 632 % no image documentation file found: look for a series of existing images or .nc files 633 if isempty(time) && ~isequal(ext,'.nc') 633 if isempty(time) && ~isequal(ext,'.nc') && ~strcmp(nom_type_ima,'none') && ~strcmp(nom_type_ima,'') && ~strcmp(nom_type_ima,'*') 634 634 subdir=get(handles.subdir_civ1,'String'); 635 635 incr_pair=[0 0];%default … … 637 637 incr_pair=browse.incr_pair; 638 638 end 639 nbdetect=0;%test of detected images639 % nbdetect=0;%test of detected images 640 640 field_i=field_count; 641 641 idetect=1; 642 while idetect==1 %look for the maximum file number in the series 642 while idetect==1 %look for the maximum file number in the series 643 imagename=name_generator(filebase,field_i+1,1,ext_ima,nom_type_ima); 644 idetect=(exist(imagename,'file')==2); 645 if idetect 643 646 field_i=field_i+1; 644 imagename=name_generator(filebase,field_i,1,ext_ima,nom_type_ima); 645 if strcmp(nom_type_ima,'none')||strcmp(nom_type_ima,'') 646 idetect=0; %stop if the same image is repeated (if nom_type='none') 647 nbdetect=1; 648 else 649 idetect=(exist(imagename,'file')==2); 650 end 647 end 651 648 %SEE CASE OF NETCDF FILES 652 nbdetect=nbdetect+(exist(imagename,'file')==2);649 % nbdetect=nbdetect+(exist(imagename,'file')==2); 653 650 end 654 651 nb_field=field_i;% last detected field number … … 656 653 idetect=1; 657 654 while idetect==1 658 field_i=field_i-1; 659 imagename=name_generator(filebase,field_i,1,ext_ima,nom_type_ima); 660 if isequal(nom_type_ima,'none')||strcmp(nom_type_ima,'') 661 idetect=0; %stop if the same image is repeated (if nom_type='none') 662 nbdetect=1; 663 else 664 idetect=(exist(imagename,'file')==2); 665 end 666 nbdetect=nbdetect+idetect; 667 end 668 first_i=max(field_i+1,1); 655 imagename=name_generator(filebase,field_i-1,1,ext_ima,nom_type_ima); 656 idetect=(exist(imagename,'file')==2); 657 if idetect 658 field_i=field_i-1; 659 end 660 end 661 first_i=max(field_i,1); 669 662 %determine the set of times and possible intervals for CIV 670 663 % dt=(1/1000)*str2num(get(handles.dt,'String')); … … 672 665 set(handles.mode,'String',{'series(Di)'}) 673 666 end 674 if isequal(nom_type_ima,'none')% no file numbering used675 first_i=1;676 last_i=1;677 first_j=1;678 last_j=1;679 end667 % if isequal(nom_type_ima,'none')% no file numbering used 668 % first_i=1; 669 % last_i=1; 670 % first_j=1; 671 % last_j=1; 672 % end 680 673 if exist('time','var') 681 674 if size(time,1)+size(time,2)>=3 % if there are at least two time values to define dt
Note: See TracChangeset
for help on using the changeset viewer.