Index: trunk/src/series/aver_stat.m
===================================================================
--- trunk/src/series/aver_stat.m	(revision 349)
+++ trunk/src/series/aver_stat.m	(revision 361)
@@ -13,5 +13,5 @@
 %Series: Matlab structure containing information set by the series interface
 %
-function GUI_input=aver_stat(num_i1,num_i2,num_j1,num_j2,Series)
+function GUI_input=aver_stat(Param)
 %----------------------------------------------------------------------
 % --- make average on a series of files
@@ -25,5 +25,5 @@
 %  Series.Time: 
 %  Series.GeometryCalib:%requests for the visibility of input windows in the GUI series  (activated directly by the selection in the menu ACTION)
-if ~exist('num_i1','var')
+if ~exist('Param','var')
     GUI_input={'RootPath';'two';...%nbre of possible input series (options 'on'/'two'/'many', default:'one')
         'SubDir';'on';... % subdirectory of derived files (PIV fields), ('on' by default)
@@ -43,7 +43,14 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-hseries=guidata(Series.hseries);%handles of the GUI series
-WaitbarPos=get(hseries.waitbar_frame,'Position');
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Input parameters: read the xml file fior batch case
+if ischar(Param) && ~isempty(find(regexp('Param','.xml$')))
+    Param=xml2struct(Param);
+    else
+        hseries=guidata(Param.hseries);%handles of the GUI series
+    WaitbarPos=get(hseries.waitbar_frame,'Position');
+end
+Param
+Param.IndexRange
 
 %% projection object
@@ -60,18 +67,23 @@
 
 %% root input file and type
-if ~iscell(Series.RootPath)% case of a single input field series
-    num_i1={num_i1};num_j1={num_j1};num_i2={num_i2};num_j2={num_j2};
-    RootPath={Series.RootPath};
-    RootFile={Series.RootFile};
-    SubDir={Series.SubDir};
-    FileExt={Series.FileExt};
-    NomType={Series.NomType};
-else
-    RootPath=Series.RootPath;
-    RootFile=Series.RootFile;
-    SubDir=Series.SubDir;
-    NomType=Series.NomType;
-    FileExt=Series.FileExt;
-end   
+% if ~iscell(Series.RootPath)% case of a single input field series
+%     num_i1={num_i1};num_j1={num_j1};num_i2={num_i2};num_j2={num_j2};
+%     RootPath={Series.RootPath};
+%     RootFile={Series.RootFile};
+%     SubDir={Series.SubDir};
+%     FileExt={Series.FileExt};
+%     NomType={Series.NomType};
+% else
+%     RootPath=Series.RootPath;
+%     RootFile=Series.RootFile;
+%     SubDir=Series.SubDir;
+%     NomType=Series.NomType;
+%     FileExt=Series.FileExt;
+% end   
+    RootPath=Param.InputTable(:,1);
+    RootFile=Param.InputTable(:,3);
+    SubDir=Param.InputTable(:,2);
+    NomType=Param.InputTable(:,4);
+    FileExt=Param.InputTable(:,5);
 ext=FileExt{1};
 form=imformats(ext([2:end]));%test valid Matlab image formats
@@ -134,5 +146,5 @@
 
 %% number of slices
-NbSlice=Series.IndexRange.NbSlice;
+NbSlice=Param.IndexRange.NbSlice;
 NbSlice_name=num2str(NbSlice);
 
@@ -161,5 +173,5 @@
 %% get the velocity type
 testcivx=0;
-FileExt=get(hseries.FileExt,'String');
+% FileExt=get(hseries.FileExt,'String');
 if ~isequal(FieldName,{'get_field...'})
     testcivx=isequal(FileType{1},'netcdf');
@@ -297,5 +309,5 @@
 transform_fct=[];%default
 if isfield(Series,'transform_fct')
-    transform_fct=Series.transform_fct;
+    transform_fct=Param.transform_fct;
 end
 
@@ -456,10 +468,10 @@
         display([fileresult{i_slice} ' written']);
     else %case of netcdf input file , determine global attributes
-        DataMean.ListGlobalAttribute=[DataMean.ListGlobalAttribute {Series.Action}];
+        DataMean.ListGlobalAttribute=[DataMean.ListGlobalAttribute {Param.Action}];
         ActionKey='Action';
         while isfield(DataMean,ActionKey)
             ActionKey=[ActionKey '_1'];
         end
-        eval(['DataMean.' ActionKey '=Series.Action;'])
+        eval(['DataMean.' ActionKey '=Param.Action;'])
         DataMean.ListGlobalAttribute=[DataMean.ListGlobalAttribute {ActionKey}];
         if isfield(DataMean,'Time')
Index: trunk/src/series/check_data_files.m
===================================================================
--- trunk/src/series/check_data_files.m	(revision 349)
+++ trunk/src/series/check_data_files.m	(revision 361)
@@ -134,5 +134,5 @@
                     end
                     Tabchar(1,i_slice)={['slice #' num2str(i_slice)]};
-                    Tabchar(index+1,i_slice)={[file '   ' lastfield]};
+                    Tabchar(index+1,i_slice)={[file '...' lastfield]};
                 end
             end
@@ -165,5 +165,5 @@
     set(hfig,'name',['view= ' num2str(iview)])
    
-    h=uicontrol('Style','listbox', 'Position', [20 20 500 300], 'String', Tabchar, 'Callback', @ncbrowser_uvmat);
+    h=uicontrol('Style','listbox', 'Position', [20 20 500 300], 'String', Tabchar, 'Callback', {'open_uvmat'});
     hh=uicontrol('Style','listbox', 'Position', [20 340 500 40], 'String', message);
 end
