Index: /trunk/src/civ.m
===================================================================
--- /trunk/src/civ.m	(revision 460)
+++ /trunk/src/civ.m	(revision 461)
@@ -4438,17 +4438,17 @@
 
 function NomType_Callback(hObject, eventdata, handles)
-set(handles.RootPath,'BackgroundColor',[1 1 0])%paint RootName edit box in yellow to indicate that the file input is proceeding
-RootPath=get(handles.RootPath,'String');
-RootFile=get(handles.RootFile,'String');
-ref_i=str2num(get(handles.ref_i,'String'));
-ref_j=str2num(get(handles.ref_j,'String'));
-NomType=get(handles.NomType,'String');
-ImaExt=get(handles.ImaExt,'String');
-fileinput=fullfile_uvmat(RootPath,'',RootFile,ImaExt,NomType,ref_i,[],ref_j);
-errormsg=display_file_name(handles,fileinput);
-if ~isempty(errormsg)
-    msgbox_uvmat('ERROR',errormsg)
-end
-set(handles.RootPath,'BackgroundColor',[1 1 1])%paint RootName back to white to indicate that the file input is finished
+% set(handles.RootPath,'BackgroundColor',[1 1 0])%paint RootName edit box in yellow to indicate that the file input is proceeding
+% RootPath=get(handles.RootPath,'String');
+% RootFile=get(handles.RootFile,'String');
+% ref_i=str2num(get(handles.ref_i,'String'));
+% ref_j=str2num(get(handles.ref_j,'String'));
+% NomType=get(handles.NomType,'String');
+% ImaExt=get(handles.ImaExt,'String');
+% fileinput=fullfile_uvmat(RootPath,'',RootFile,ImaExt,NomType,ref_i,[],ref_j);
+% errormsg=display_file_name(handles,fileinput);
+% if ~isempty(errormsg)
+%     msgbox_uvmat('ERROR',errormsg)
+% end
+% set(handles.RootPath,'BackgroundColor',[1 1 1])%paint RootName back to white to indicate that the file input is finished
 
 % --- Executes on selection change in ListProgram.
Index: /trunk/src/fill_GUI.m
===================================================================
--- /trunk/src/fill_GUI.m	(revision 460)
+++ /trunk/src/fill_GUI.m	(revision 461)
@@ -4,5 +4,5 @@
 %------------------------------------------------------------------------
 errormsg='';
-fields=fieldnames(Param);
+fields=fieldnames(Param);%list of fields in Param
 for ifield=1:numel(fields)
     if isstruct(Param.(fields{ifield}))
Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 460)
+++ /trunk/src/series.m	(revision 461)
@@ -485,5 +485,17 @@
 MaxIndex_i=max(find(i_sum>0))-1;
 MinIndex_i=min(find(i_sum>0))-1;
-if isequal(MinIndex_i,1) && exist (fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,0,i2_series(2,2),j1_series(2,2),j2_series(2,2)),'file')
+i2_min=[];
+if ~isempty(i2_series)
+    i2_min=i2_series(1,2);
+end
+j1_min=[];
+if ~isempty(j1_series)
+    j1_min=j1_series(1,2);
+end
+j2_min=[];
+if ~isempty(j2_series)
+    j2_min=j2_series(1,2);
+end
+if isequal(MinIndex_i,1) && exist (fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,0,i2_min, j1_min,j2_min),'file')
     MinIndex_i=0;
 end
@@ -1367,8 +1379,12 @@
 %------------------------------------------------------------------------
 % --- Main launch command, called by RUN and BATCH
-function [h_fun,Series,filexml,errormsg]=prepare_jobs(handles)
-%------------------------------------------------------------------------
+function [h_fun,Series,filexml,errormsg]=prepare_jobs(handles,run)
+%------------------------------------------------------------------------
+h_fun=[];
 filexml='';
 errormsg='';
+if ~exist('run','var')
+    run=1;
+end
 %% Read parameters from series
 Series=read_GUI(handles.series);
@@ -1425,9 +1441,13 @@
 end
 
+if ~run
+    return
+end
+
 %% defining the ActionName function handle
 list_action=get(handles.ActionName,'String');% list menu action
 index=get(handles.ActionName,'Value');
 action= list_action{index}; % selected string
-Series.Action=action;%name of the processing programme
+%Series.Action=action;%name of the processing programme
 Series.hseries=handles.series; % handles to the series GUI
 path_series=which('series');
@@ -1437,5 +1457,5 @@
     eval(['spath=which(''' action ''');']) %spath = current path of the selected function ACTION
     if ~exist(fct_path,'dir')
-        errormsg=['The prescibed function path ' fct_path ' does not exist'];
+        errormsg=['The prescribed function path ' fct_path ' does not exist'];
         return
     end
@@ -2287,5 +2307,5 @@
 function MenuExportConfig_Callback(hObject, eventdata, handles)
 global Series
-[tild,Series,errormsg]=prepare_jobs(handles);
+[tild,Series,errormsg]=prepare_jobs(handles,0);
 % Series=read_GUI(handles.series);
 
