Index: /trunk/src/series/time_series.m
===================================================================
--- /trunk/src/series/time_series.m	(revision 530)
+++ /trunk/src/series/time_series.m	(revision 531)
@@ -132,4 +132,5 @@
         displ_uvmat('WARNING',['times of series differ by (max) ' num2str(diff_time)],checkrun)
     end   
+    time=time(1,:);% choose the time data from the first sequence
 end
 
@@ -225,5 +226,5 @@
         end
         if isequal(stopstate,'queue')% enable STOP command
-            Data=cell(1,nbview);%initiate the set Data
+            Data=cell(1,nbview);%initiate the set Data;
             nbtime=0;
             dt=[];
@@ -233,12 +234,7 @@
                 [Data{iview},tild,errormsg] = read_field(filecell{iview,index},FileType{iview},InputFields{iview},frame_index{iview}(index));
                 if ~isempty(errormsg)
-                    errormsg=['time_series/read_field/' errormsg];
+                    errormsg=['time_series / read_field / ' errormsg];
                     display(errormsg)
                     break
-                end
-                timeread(iview)=0;
-                if isfield(Data{iview},'Time')
-                    timeread(iview)=Data{iview}.Time;
-                    nbtime=nbtime+1;
                 end
                 if ~isempty(NbSlice_calib)
@@ -279,5 +275,5 @@
                 [Field,errormsg]=proj_field(Field,Param.ProjObject);
                 if ~isempty(errormsg)
-                    msgbox_uvmat('ERROR',['error in aver_stat/proj_field:' errormsg])
+                    msgbox_uvmat('ERROR',['time_series / proj_field / ' errormsg])
                     return
                 end
@@ -289,5 +285,5 @@
                 % stop program if the first field reading is in error
                 if ~isempty(errormsg)
-                    displ_uvmat('ERROR',['error in time_series/sub_field:' errormsg],checkrun)
+                    displ_uvmat('ERROR',['time_series / sub_field / ' errormsg],checkrun)
                     return
                 end
@@ -296,5 +292,5 @@
                 nbvar=length(Field.ListVarName);
                 if nbvar==0
-                    displ_uvmat('ERROR','no input variable selected in get_field',checkrun)
+                    displ_uvmat('ERROR','no input variable selected',checkrun)
                     return
                 end
@@ -363,6 +359,6 @@
             
             % record the time:
-            if isempty(time)% time read in ncfiles
-                if isfield(Field,'Time')
+            if isempty(time)% time not set by xml filer(s)
+                if isfield(Data{1},'Time')
                     DataOut.Time(nbfile,1)=Field.Time;
                 else
@@ -370,5 +366,5 @@
                 end
             else % time from ImaDoc prevails  TODO: correct
-                DataOut.Time(nbtime,1)=i1_series{1}(index);% TODO : generalise
+                DataOut.Time(nbfile,1)=time(index);%
             end
             
@@ -419,5 +415,5 @@
     test_time=diff(DataOut.Time)>0;% test that the readed time is increasing (not constant)
     if ~test_time
-        DataOut.Time=[1:filecounter];
+        DataOut.Time=1:filecounter;
     end
     
