Changeset 521 for trunk/src/series.m
 Timestamp:
 Aug 18, 2012, 11:17:48 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/series.m
r512 r521 587 587 set(handles.OutputSubDir,'String',SubDirOut) 588 588 589 %% display the min and max indices for all the file series 590 i_sum=sum(sum(i1_series,2),1);%sum of i1_series on the last index 591 MaxIndex_i=max(find(i_sum>0))1;% max ref index i 592 MinIndex_i=min(find(i_sum>0))1;% min ref index i 593 i2_min=[]; 594 if ~isempty(i2_series) 595 i2_min=i2_series(1,2,2); 596 end 597 j1_min=[]; 598 if ~isempty(j1_series) 599 j1_min=j1_series(1,2,2); 600 end 601 j2_min=[]; 602 if ~isempty(j2_series) 603 j2_min=j2_series(1,2,2); 604 end 605 if isequal(MinIndex_i,1) &&... 606 exist (fullfile_uvmat(InputTable{iview,1},InputTable{iview,2},InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},0,i2_min, j1_min,j2_min),'file') 607 MinIndex_i=0; 608 end 609 j_sum=sum(sum(j1_series,1),1); 610 MaxIndex_j=max(find(j_sum>0))1; 611 MinIndex_j=min(find(j_sum>0))1; 589 %% display the min and max indices for the file series 590 pair_max=squeeze(max(i1_series,[],1)); %max on pair index 591 j_max=max(pair_max,[],1); 592 %i_sum=sum(sum(i1_series,2),1);%sum of i1_series on the last index 593 MaxIndex_i=max(find(j_max))1;% max ref index i 594 MinIndex_i=min(find(j_max))1;% min ref index i 595 i_max=max(pair_max,[],2); 596 MaxIndex_j=max(find(i_max))1;% max ref index i 597 MinIndex_j=min(find(i_max))1;% min ref index i 598 % i2_min=[]; 599 % if ~isempty(i2_series) 600 % i2_min=i2_series(1,2,2); 601 % end 602 % j1_min=[]; 603 % if ~isempty(j1_series) 604 % j1_min=j1_series(1,2,2); 605 % end 606 % j2_min=[]; 607 % if ~isempty(j2_series) 608 % j2_min=j2_series(1,2,2); 609 % end 610 % if isequal(MinIndex_i,1) &&... 611 % exist (fullfile_uvmat(InputTable{iview,1},InputTable{iview,2},InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},0,i2_min, j1_min,j2_min),'file') 612 % MinIndex_i=0; 613 % end 614 % j_sum=sum(sum(j1_series,1),1); 615 % MaxIndex_j=max(find(j_sum>0))1; 616 % MinIndex_j=min(find(j_sum>0))1; 612 617 MinIndex=get(handles.MinIndex,'Data');%retrieve the min indices in the table MinIndex 613 618 MaxIndex=get(handles.MaxIndex,'Data');%retrieve the max indices in the table MaxIndex … … 777 782 set(handles.series,'UserData',SeriesData) 778 783 779 %% enable j index visibility 784 %% enable j index visibilitycellfun(@isempty,regexp(PairString,'^j')) 780 785 state='off'; 781 786 check_jindex=~cellfun(@isempty,SeriesData.j1_series); %look for non empty j indices … … 783 788 enable_j(handles,'off') % no j index needed 784 789 else 785 enable_j(handles,'on') 790 PairString=get(handles.PairString,'Data'); 791 if isempty(find(cellfun(@isempty,regexp(PairString,'^j'))))% if all pair string begins by j (burst) 792 enable_j(handles,'off') % no j index needed 793 else 794 enable_j(handles,'on') 795 end 786 796 end 787 797 … … 1154 1164 function update_mode(handles,i1_series,i2_series,j1_series,j2_series,time) 1155 1165 % 1156 check_burst=0;1157 if isempty(j2_series)% no pair menu to display1166 % check_burst=0; 1167 if isempty(j2_series)% no j pair 1158 1168 if isempty(i2_series) 1159 set(handles.mode,'String',{''}) 1169 set(handles.mode,'Value',1) 1170 set(handles.mode,'String',{''})% no pair menu to display 1171 else 1172 set(handles.mode,'Value',1) 1173 set(handles.mode,'String',{'series(Di)'}) % pair menu with only option Di 1174 end 1175 else %existence of j pairs 1176 pair_max=squeeze(max(i1_series,[],1)); %max on pair index 1177 j_max=max(pair_max,[],1); 1178 MaxIndex_i=max(find(j_max))1;% max ref index i 1179 MinIndex_i=min(find(j_max))1;% min ref index i 1180 i_max=max(pair_max,[],2); 1181 MaxIndex_j=max(find(i_max))1;% max ref index i 1182 MinIndex_j=min(find(i_max))1;% min ref index i 1183 if MaxIndex_j==MinIndex_j 1184 set(handles.mode,'Value',1); 1185 set(handles.mode,'String',{'bursts'}) 1186 % check_burst=1; 1187 elseif MaxIndex_i==MinIndex_i 1188 set(handles.mode,'Value',1); 1189 set(handles.mode,'String',{'series(Dj)'}) 1160 1190 else 1161 set(handles.mode,'Value',1) 1162 set(handles.mode,'String',{'series(Di)'}) 1163 end 1164 else 1165 nbfield=size(j2_series,1); 1166 nbfield2=size(j2_series,2); 1167 set(handles.mode,'String',{'bursts';'series(Dj)'}) 1168 if nbfield2>10  nbfield==1 1169 set(handles.mode,'Value',2);%set mode to series(Dj) if more than 10 j values 1170 else 1171 set(handles.mode,'Value',1); 1172 check_burst=1; 1173 end 1174 end 1175 if check_burst 1176 enable_i(handles,'On') 1177 enable_j(handles,'Off') %do not display j index scanning in burst mode (j is fixed by the burst choice) 1178 else 1179 enable_i(handles,'On') 1180 if isempty(j1_series) 1181 enable_j(handles,'Off') 1182 else 1183 enable_j(handles,'On') 1184 end 1185 end 1191 set(handles.mode,'String',{'bursts';'series(Dj)'}) 1192 if (MaxIndex_jMinIndex_j)>10 1193 set(handles.mode,'Value',2);%set mode to series(Dj) if more than 10 j values 1194 else 1195 set(handles.mode,'Value',1); 1196 % check_burst=1; 1197 end 1198 end 1199 end 1200 % if check_burst 1201 % enable_i(handles,'On') 1202 % enable_j(handles,'Off') %do not display j index scanning in burst mode (j is fixed by the burst choice) 1203 % else 1204 % enable_i(handles,'On') 1205 % if isempty(j1_series) 1206 % enable_j(handles,'Off') 1207 % else 1208 % enable_j(handles,'On') 1209 % end 1210 % end 1186 1211 fill_ListPair(handles,i1_series,i2_series,j1_series,j2_series,time) 1187 1212 ListPairs_Callback([],[],handles)
Note: See TracChangeset
for help on using the changeset viewer.