- Timestamp:
- May 17, 2014, 8:10:32 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r775 r776 1768 1768 end 1769 1769 end 1770 max_walltime=3600* 12; % 12h max total calculation1770 max_walltime=3600*24; % 24h max total calculation 1771 1771 walltime_onejob=600;%seconds, max estimated time for asingle file index value 1772 1772 filename_joblist=fullfile(DirOAR,'job_list.txt');%create name of the global executable file … … 2366 2366 end 2367 2367 else 2368 if ~isempty(TimeName) 2368 if ~isempty(TimeName)&& isfield(Data,TimeName) 2369 2369 TimeValue=Data.(TimeName); 2370 2370 end -
trunk/src/series/civ_input.m
r774 r776 160 160 161 161 %% display the min and max indices for the whole file series 162 if size(SeriesData.i1_series{iview_image},2)==2 && min(min(SeriesData.i1_series{iview_image}(:,1,:)))==0 163 MinIndex_j=1;% index j set to 1 by default 164 MaxIndex_j=1; 165 MinIndex_i=find(SeriesData.i1_series{iview_image}(1,2,:), 1 )-1;% min ref index i detected in the series (corresponding to the first non-zero value of i1_series, except for zero index) 166 MaxIndex_i=find(SeriesData.i1_series{iview_image}(1,2,:),1,'last' )-1;%max ref index i detected in the series (corresponding to the last non-zero value of i1_series) 167 else 168 ref_i=squeeze(max(SeriesData.i1_series{iview_image}(1,:,:),[],2));% select ref_j index for each ref_i 169 ref_j=squeeze(max(SeriesData.j1_series{iview_image}(1,:,:),[],3));% select ref_i index for each ref_j 170 MinIndex_i=min(find(ref_i))-1; 171 MaxIndex_i=max(find(ref_i))-1; 172 MaxIndex_j=max(find(ref_j))-1; 173 MinIndex_j=min(find(ref_j))-1; 174 end 175 % MaxIndex_i=Param.IndexRange.MaxIndex_i(iview_image); 176 % MinIndex_i=Param.IndexRange.MinIndex_i(iview_image); 177 % MaxIndex_j=1;%default 178 % MinIndex_j=1; 179 % if isfield(Param.IndexRange,'MaxIndex_j')&&isfield(Param.IndexRange,'MinIndex_j')... 180 % && numel(Param.IndexRange.MaxIndex_j')>=iview_image &&numel(Param.IndexRange.MinIndex_j')>=iview_image 181 % MaxIndex_j=Param.IndexRange.MaxIndex_j(iview_image); 182 % MinIndex_j=Param.IndexRange.MinIndex_j(iview_image); 183 % end 184 CivInputData.MaxIndex_i=MaxIndex_i; 185 CivInputData.MaxIndex_j=MaxIndex_j; 186 CivInputData.MinIndex_i=MinIndex_i; 187 CivInputData.MinIndex_j=MinIndex_j; 162 MaxIndex_i=Param.IndexRange.MaxIndex_i(iview_image); 163 MinIndex_i=Param.IndexRange.MinIndex_i(iview_image); 164 MaxIndex_j=1;%default 165 MinIndex_j=1; 166 if isfield(Param.IndexRange,'MaxIndex_j')&&isfield(Param.IndexRange,'MinIndex_j')... 167 && numel(Param.IndexRange.MaxIndex_j')>=iview_image &&numel(Param.IndexRange.MinIndex_j')>=iview_image 168 MaxIndex_j=Param.IndexRange.MaxIndex_j(iview_image); 169 MinIndex_j=Param.IndexRange.MinIndex_j(iview_image); 170 end 171 %update the bounds if possible 172 if isfield(SeriesData,'i1_series')&&numel(SeriesData.i1_series)>=iview_image 173 if size(SeriesData.i1_series{iview_image},2)==2 && min(min(SeriesData.i1_series{iview_image}(:,1,:)))==0 174 MinIndex_j=1;% index j set to 1 by default 175 MaxIndex_j=1; 176 MinIndex_i=find(SeriesData.i1_series{iview_image}(1,2,:), 1 )-1;% min ref index i detected in the series (corresponding to the first non-zero value of i1_series, except for zero index) 177 MaxIndex_i=find(SeriesData.i1_series{iview_image}(1,2,:),1,'last' )-1;%max ref index i detected in the series (corresponding to the last non-zero value of i1_series) 178 else 179 ref_i=squeeze(max(SeriesData.i1_series{iview_image}(1,:,:),[],2));% select ref_j index for each ref_i 180 ref_j=squeeze(max(SeriesData.j1_series{iview_image}(1,:,:),[],3));% select ref_i index for each ref_j 181 MinIndex_i=min(find(ref_i))-1; 182 MaxIndex_i=max(find(ref_i))-1; 183 MaxIndex_j=max(find(ref_j))-1; 184 MinIndex_j=min(find(ref_j))-1; 185 end 186 end 187 % CivInputData.MaxIndex_i=MaxIndex_i; 188 % CivInputData.MaxIndex_j=MaxIndex_j; 189 % CivInputData.MinIndex_i=MinIndex_i; 190 % CivInputData.MinIndex_j=MinIndex_j; 188 191 if ~isfield(Param.IndexRange,'first_j')||isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs 189 192 set(handles.ListPairMode,'Value',1) … … 250 253 set(handles.CoordUnit,'String',CoordUnit) 251 254 set(handles.SearchRange,'UserData', pxcm_search); 252 % indicate the min and max indices i and j on the GUI253 set(handles.MinIndex_i,'String',num2str(MinIndex_i))254 set(handles.MaxIndex_i,'String',num2str(MaxIndex_i))255 set(handles.MinIndex_j,'String',num2str(MinIndex_j))256 set(handles.MaxIndex_j,'String',num2str(MaxIndex_j))257 255 258 256 %% introduce the stored Civ parameters if available (from previous input or ImportConfig in series) … … 275 273 end 276 274 end 275 % indicate the min and max indices i and j on the GUI 276 set(handles.MinIndex_i,'String',num2str(MinIndex_i)) 277 set(handles.MaxIndex_i,'String',num2str(MaxIndex_i)) 278 set(handles.MinIndex_j,'String',num2str(MinIndex_j)) 279 set(handles.MaxIndex_j,'String',num2str(MaxIndex_j)) 277 280 278 281 %% set the civ_input options, depending on the input file content if a nc file has been opened … … 925 928 end 926 929 case 'pair j1-j2'%case of pairs 927 MinIndex_j=CivInputData.MinIndex_j; 928 MaxIndex_j=min(CivInputData.MaxIndex_j,10);%limitate the number of pairs to 10x10 930 % MinIndex_j=CivInputData.MinIndex_j; 931 % MaxIndex_j=min(CivInputData.MaxIndex_j,10);%limitate the number of pairs to 10x10 932 MinIndex_j=str2num(get(handles.MinIndex_j,'String')); 933 MaxIndex_j=str2num(get(handles.MaxIndex_j,'String')); 929 934 index_pair=0; 930 935 %get all the Time intervals in bursts … … 1004 1009 ref_i_Callback(hObject, eventdata, handles)%refresh dispaly of dt for pairs (in case of non constant dt) 1005 1010 1006 % ------------------------------------------------------------------------1007 function MinIndex_j_Callback(hObject, eventdata, handles)1008 % ------------------------------------------------------------------------1009 first_j=str2num(get(handles.MinIndex_j,'String'));1010 set(handles.ref_j,'String', num2str(first_j))% reference index for pair dt = first index1011 ref_j_Callback(hObject, eventdata, handles)%refresh dispaly of dt for pairs (in case of non constant dt)1011 % %------------------------------------------------------------------------ 1012 % function MinIndex_j_Callback(hObject, eventdata, handles) 1013 % %------------------------------------------------------------------------ 1014 % first_j=str2num(get(handles.MinIndex_j,'String')); 1015 % set(handles.ref_j,'String', num2str(first_j))% reference index for pair dt = first index 1016 % ref_j_Callback(hObject, eventdata, handles)%refresh dispaly of dt for pairs (in case of non constant dt) 1012 1017 1013 1018 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracChangeset
for help on using the changeset viewer.