Ignore:
Timestamp:
Jul 1, 2013, 9:12:25 PM (11 years ago)
Author:
sommeria
Message:

a few bugs corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_input.m

    r651 r656  
    206206CivInputData.MinIndex_i=MinIndex_i;
    207207CivInputData.MinIndex_j=MinIndex_j;
    208 if ~isfield(Param.IndexRange,'first_j')
     208if ~isfield(Param.IndexRange,'first_j')||isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs
    209209    set(handles.ListPairMode,'Value',1)
    210210    set(handles.ListPairMode,'String',{'series(Di)'})
     
    10831083select=ones(size(1:nbpair));%flag for displayed pairs =1 for display
    10841084testpair=0;
    1085 % RootPath=get(handles.RootPath,'String');
    1086 % RootFile=get(handles.Civ2_ImageB,'String');
    10871085nbpair=200; %default
    1088 % if index==1 % case civ1
    1089 %     if ~get(handles.CheckCiv1,'Value') %
    1090 %         if ~exist(fullfile(RootPath,subdir_civ1),'dir')
    1091 %             errormsg=['no civ1 file available: subdirectory ' subdir_civ1 ' does not exist'];
    1092 %             set(handles.ListPairCiv1,'String',{});
    1093 %             return
    1094 %         end
    1095 %         for ipair=1:nbpair
    1096 %             filename=fullfile_uvmat(RootPath,subdir_civ1,RootFile,'.nc',nom_type_nc,...
    1097 %                 ref_i+displ_num(3,ipair),ref_i+displ_num(4,ipair),ref_j+displ_num(1,ipair),ref_j+displ_num(2,ipair));
    1098 %             select(ipair)=exist(filename,'file')==2;% put flag to 0 if the file does not exist
    1099 %         end
    1100 %         % case of no displayed pair
    1101 %         if isequal(select,zeros(size(1:nbpair)))
    1102 %             if isfield(browse,'incr_pair') && ~isequal(browse.incr_pair,[0 0])
    1103 %                 num_i1=ref_i-floor(browse.incr_pair(1)/2);
    1104 %                 num_i2=ref_i+ceil(browse.incr_pair(1)/2);
    1105 %                 num_j1=ref_j-floor(browse.incr_pair(2)/2);
    1106 %                 num_j2=ref_j+ceil(browse.incr_pair(2)/2);
    1107 %                 filename=fullfile_uvmat(RootPath,subdir_civ1,RootFile,'.nc',nom_type_nc,num_i1,num_i2,num_j1,num_j2);
    1108 %                 select(1)=exist(filename,'file')==2;
    1109 %                 testpair=1;
    1110 %             else
    1111 % %                 if  isequal(mode,'series(Dj)')% | isequal(mode,'st_series(Dj)')
    1112 % %                     errormsg=['no civ1 file available for the selected reference index j=' num2str(ref_j) ' and subdirectory ' subdir_civ1];
    1113 % %                 else
    1114 %                     errormsg=['no civ1 file available for the selected reference indices (i,j)= ' num2str(ref_i) ', ' num2str(ref_j) ' and subdirectory ' subdir_civ1];
    1115 % %                 end
    1116 %                 set(handles.ListPairCiv1,'String',{''});
    1117 %                 %COMPLETER CAS STEREO
    1118 %                 return
    1119 %             end
    1120 %         end
    1121 %     end
    1122 % else %case civ2 alone
    1123 %     if ~get(handles.CheckCiv2,'Value') && ~get(handles.CheckCiv1,'Value') && ~get(handles.CheckFix1,'Value') && ~get(handles.CheckPatch1,'Value')
    1124 %         if ~exist(fullfile(RootPath,subdir_civ2),'dir')
    1125 %             msgbox_uvmat('ERROR',['no civ2 file available: subdirectory ' subdir_civ2 ' does not exist'])
    1126 %             set(handles.ListPairCiv2,'Value',1);
    1127 %             set(handles.ListPairCiv2,'String',{''});
    1128 %             return
    1129 %         end
    1130 %         for ipair=1:nbpair
    1131 %             filename=fullfile_uvmat(RootPath,subdir_civ1,RootFile,'.nc',nom_type_nc,...
    1132 %                 ref_i+displ_num(3,ipair),ref_i+displ_num(4,ipair),ref_j+displ_num(1,ipair),ref_j+displ_num(2,ipair));
    1133 %             select(ipair)=exist(filename,'file')==2;
    1134 %         end
    1135 %         if  isequal(select,zeros(size(1:nbpair)))
    1136 %             if isfield(browse,'incr_pair')
    1137 %                 num_i1=ref_i-floor(browse.incr_pair(1)/2);
    1138 %                 num_i2=ref_i+floor((browse.incr_pair(1)+1)/2);
    1139 %                 num_j1=ref_j-floor(browse.incr_pair(2)/2);
    1140 %                 num_j2=ref_j+floor((browse.incr_pair(2)+1)/2);
    1141 %                 filename=fullfile_uvmat(RootPath,subdir_civ2,RootFile,'.nc',nom_type_nc,num_i1,num_i2,num_j1,num_j2);
    1142 %                 select(1)=exist(filename,'file')==2;
    1143 %             else
    1144 %                 if  isequal(mode,'series(Dj)')% | isequal(mode,'st_series(Dj)')
    1145 %                     errormsg=['no civ2 file available for the selected reference index j=' num2str(ref_j) ' and subdirectory ' subdir_civ2];
    1146 %                 else
    1147 %                     errormsg=['no civ2 file available for the selected reference index i=' num2str(ref_i) ' and subdirectory ' subdir_civ2];
    1148 %                 end
    1149 %                 set(handles.ListPairCiv2,'Value',1);
    1150 %                 set(handles.ListPairCiv2,'String',{''});
    1151 %                 return
    1152 %             end
    1153 %         end
    1154 %     end
    1155 % end
    11561086
    11571087%% determine the menu display in .ListPairCiv1
Note: See TracChangeset for help on using the changeset viewer.