Changeset 776 for trunk


Ignore:
Timestamp:
May 17, 2014, 8:10:32 AM (10 years ago)
Author:
sommeria
Message:
 
Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r775 r776  
    17681768            end
    17691769        end
    1770         max_walltime=3600*12; % 12h max total calculation
     1770        max_walltime=3600*24; % 24h max total calculation
    17711771        walltime_onejob=600;%seconds, max estimated time for asingle file index value
    17721772        filename_joblist=fullfile(DirOAR,'job_list.txt');%create name of the global executable file
     
    23662366    end
    23672367else
    2368     if ~isempty(TimeName)
     2368    if ~isempty(TimeName)&& isfield(Data,TimeName)
    23692369        TimeValue=Data.(TimeName);
    23702370    end
  • trunk/src/series/civ_input.m

    r774 r776  
    160160
    161161%% 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;
     162MaxIndex_i=Param.IndexRange.MaxIndex_i(iview_image);
     163MinIndex_i=Param.IndexRange.MinIndex_i(iview_image);
     164MaxIndex_j=1;%default
     165MinIndex_j=1;
     166if 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);
     170end
     171%update the bounds if possible
     172if 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
     186end
     187% CivInputData.MaxIndex_i=MaxIndex_i;
     188% CivInputData.MaxIndex_j=MaxIndex_j;
     189% CivInputData.MinIndex_i=MinIndex_i;
     190% CivInputData.MinIndex_j=MinIndex_j;
    188191if ~isfield(Param.IndexRange,'first_j')||isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs
    189192    set(handles.ListPairMode,'Value',1)
     
    250253set(handles.CoordUnit,'String',CoordUnit)
    251254set(handles.SearchRange,'UserData', pxcm_search);
    252 % indicate the min and max indices i and j on the GUI
    253 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))
    257255
    258256%% introduce the stored Civ parameters  if available (from previous input or ImportConfig in series)
     
    275273    end
    276274end
     275% indicate the min and max indices i and j on the GUI
     276set(handles.MinIndex_i,'String',num2str(MinIndex_i))
     277set(handles.MaxIndex_i,'String',num2str(MaxIndex_i))
     278set(handles.MinIndex_j,'String',num2str(MinIndex_j))
     279set(handles.MaxIndex_j,'String',num2str(MaxIndex_j))
    277280
    278281%% set the civ_input options, depending on the input file content if a nc file has been opened
     
    925928        end
    926929    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'));
    929934        index_pair=0;
    930935        %get all the Time intervals in bursts
     
    10041009ref_i_Callback(hObject, eventdata, handles)%refresh dispaly of dt for pairs (in case of non constant dt)
    10051010
    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 index
    1011 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)
    10121017
    10131018%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracChangeset for help on using the changeset viewer.