Index: /trunk/src/filter_tps.m
===================================================================
--- /trunk/src/filter_tps.m	(revision 948)
+++ /trunk/src/filter_tps.m	(revision 949)
@@ -154,4 +154,6 @@
 U_smooth=U_smooth./nb_select;% take the average at the intersection of several subdomains
 V_smooth=V_smooth./nb_select;
+U_smooth(FF==20)=U(FF==20);% set to the initial values the eliminated vectors (flagged as false)
+V_smooth(FF==20)=V(FF==20);
 fill=zeros(NbCoord+1,NbCoord,size(SubRange,3)); %matrix of zeros to complement the matrix Data.Civ1_Coord_tps (conveninent for file storage)
 Coord_tps=cat(1,Coord_tps,fill);
Index: /trunk/src/series/civ_series.m
===================================================================
--- /trunk/src/series/civ_series.m	(revision 948)
+++ /trunk/src/series/civ_series.m	(revision 949)
@@ -593,5 +593,5 @@
         [Data.Civ1_SubRange,Data.Civ1_NbCentres,Data.Civ1_Coord_tps,Data.Civ1_U_tps,Data.Civ1_V_tps,tild,Ures, Vres,tild,FFres]=...
             filter_tps([Data.Civ1_X(ind_good) Data.Civ1_Y(ind_good)],Data.Civ1_U(ind_good),Data.Civ1_V(ind_good),[],Data.Patch1_SubDomainSize,Data.Patch1_FieldSmooth,Data.Patch1_MaxDiff);
-        Data.Civ1_U_smooth(ind_good)=Ures;% take the interpolated (smoothed) velocity values for good vectors, keep 0 for the others
+        Data.Civ1_U_smooth(ind_good)=Ures;% take the interpolated (smoothed) velocity values for good vectors, keep civ1 data for the other
         Data.Civ1_V_smooth(ind_good)=Vres;
         Data.Civ1_FF(ind_good)=int8(FFres);
@@ -869,6 +869,6 @@
         Data.VarAttribute{nbvar+6}.Role='vector_x';
         Data.VarAttribute{nbvar+7}.Role='vector_y';
-        Data.Civ2_U_smooth=Data.Civ2_U; % zeros(size(Data.Civ2_X));
-        Data.Civ2_V_smooth=Data.Civ2_V; %zeros(size(Data.Civ2_X));
+        Data.Civ2_U_smooth=Data.Civ2_U; 
+        Data.Civ2_V_smooth=Data.Civ2_V; 
         if isfield(Data,'Civ2_FF')
             ind_good=find(Data.Civ2_FF==0);
@@ -876,5 +876,5 @@
             ind_good=1:numel(Data.Civ2_X);
         end
-        [Data.Civ2_SubRange,Data.Civ2_NbCentres,Data.Civ2_Coord_tps,Data.Civ2_U_tps,Data.Civ2_V_tps,tild,Ures, Vres,tild,FFres]=...
+        [Data.Civ2_SubRange,Data.Civ2_NbCentres,Data.Civ2_Coord_tps,Data.Civ2_U_tps,Data.Civ2_V_tps,tild,Ures,Vres,tild,FFres]=...
             filter_tps([Data.Civ2_X(ind_good) Data.Civ2_Y(ind_good)],Data.Civ2_U(ind_good),Data.Civ2_V(ind_good),[],Data.Patch2_SubDomainSize,Data.Patch2_FieldSmooth,Data.Patch2_MaxDiff);
         Data.Civ2_U_smooth(ind_good)=Ures;
Index: /trunk/src/series/extract_rdvision.m
===================================================================
--- /trunk/src/series/extract_rdvision.m	(revision 948)
+++ /trunk/src/series/extract_rdvision.m	(revision 949)
@@ -494,23 +494,24 @@
 uid_Dtk=find(t,'ImaDoc/Camera/BurstTiming/Dtk');
 if ~isempty(uid_Dtk)
-uid_content_Dtk=get(t,uid_Dtk,'contents');
-Dtk=str2num(get(t,uid_content_Dtk,'value'));
-uid_content_NbDtk=get(t,uid_NbDtk,'contents');
-NbDtk=str2num(get(t,uid_content_NbDtk,'value'));
-Dtk_stamp=(timestamp(end-NbDti,1)-timestamp(1,1))/NbDtk;
-if abs(Dtk_stamp-Dtk)>Dtk/1000
-    disp([msg 'Dtk from xml file corrected by ' num2str(Dtk_stamp-Dtk)]);
-else
-    disp('Dtk OK')
-end
-t=set(t,uid_content_Dtk,'value',num2str(Dtk_stamp));
+    uid_content_Dtk=get(t,uid_Dtk,'contents');
+    Dtk=str2num(get(t,uid_content_Dtk,'value'));
+    uid_content_NbDtk=get(t,uid_NbDtk,'contents');
+    NbDtk=str2num(get(t,uid_content_NbDtk,'value'));
+    Dtk_stamp=(timestamp(end-NbDti,1)-timestamp(1,1))/NbDtk;
+    if abs(Dtk_stamp-Dtk)>Dtk/1000
+        disp(['Dtk from xml file corrected by ' num2str(Dtk_stamp-Dtk)]);
+    else
+        disp('Dtk OK')
+    end
+    t=set(t,uid_content_Dtk,'value',num2str(Dtk_stamp));
 end
 
 save(t,newxml)
-       [success,msg] = fileattrib(newxml,'+w','g');% allow writing access for the group of users  
-        if success==0
-            disp({['warning: unable to set group write access to ' newxml ':']; msg});%error message for directory creation
-        end
-
-
-
+[success,errormsg] = fileattrib(newxml,'+w','g');% allow writing access for the group of users
+if success==0
+    disp({['warning: unable to set group write access to ' newxml ':']; errormsg});%error message for directory creation
+    msg=erromsg;
+end
+
+
+
