Index: trunk/src/find_file_series.m
===================================================================
--- trunk/src/find_file_series.m	(revision 1119)
+++ trunk/src/find_file_series.m	(revision 1120)
@@ -49,5 +49,5 @@
 
 %% get input root name and info on the input file
-if isempty(regexp(FilePath,'^http://'))
+if isempty(regexp(FilePath,'^http://','once'))
 fullfileinput=fullfile(FilePath,fileinput);% input file name with path
 else
Index: trunk/src/geometry_calib.m
===================================================================
--- trunk/src/geometry_calib.m	(revision 1119)
+++ trunk/src/geometry_calib.m	(revision 1120)
@@ -190,6 +190,10 @@
 end
 
-%% read coordinates of the calibration poinnts: Coord(:,1-3) in phys, Coord(:,4-5) image
+%% read coordinates of the calibration points: Coord(:,1-3) in phys, Coord(:,4-5) image
 Coord=get(handles.ListCoord,'Data');
+if isempty(Coord)
+    msgbox_uvmat('ERROR','introduce calibration points in the table Coord, or use the Tools Set scale')
+    return
+end
 
 
Index: trunk/src/get_file_info.m
===================================================================
--- trunk/src/get_file_info.m	(revision 1119)
+++ trunk/src/get_file_info.m	(revision 1120)
@@ -62,6 +62,6 @@
     FileInfo.FileName=fileinput;
     FileInfo.FileType='txt'; %default
-else
-    return %input file does not exist.
+% else
+%     return %input file does not exist.
 end
 [tild,tild,FileExt]=fileparts(fileinput);%get the file extension FileExt
@@ -117,4 +117,5 @@
             if ~isempty(FileExt)
                 if ~isempty(imformats(FileExt))%case of images
+                    FileInfo.FileType='image';
                     try
                         imainfo=imfinfo(fileinput);
Index: trunk/src/series.m
===================================================================
--- trunk/src/series.m	(revision 1119)
+++ trunk/src/series.m	(revision 1120)
@@ -621,6 +621,8 @@
 ActionInput_Callback([],[], handles)
 
-
+%------------------------------------------------------------------------
+% --- check the input file series.
 function check_input_file_series(handles)
+%------------------------------------------------------------------------
 InputTable=get(handles.InputTable,'Data');
 set(handles.series,'Pointer','watch') % set the mouse pointer to 'watch'
@@ -629,5 +631,5 @@
 empty_line=false(size(InputTable,1),1);
 for iline=1:size(InputTable,1)
-    empty_line(iline)= isempty(cell2mat(InputTable(iline,1:3)));
+    empty_line(iline)= isempty(cell2mat(InputTable(iline,1:3)));%check the empty lines in the input table
 end
 if ~isempty(find(empty_line,1))
@@ -649,7 +651,10 @@
         RootFile='';
     else %scan the input folder
-        InputTable{iview,3}=regexprep(InputTable{iview,3},'^/','');
+        InputTable{iview,3}=regexprep(InputTable{iview,3},'^/','');%suppress '/' at the beginning of the input name
+        i1=str2num(get(handles.num_first_i,'String'));
+        j1=str2num(get(handles.num_first_j,'String'));
+        InputFile=fullfile_uvmat('','',InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},i1,[],j1,[])
             [RootPath,~,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=...
-                find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),[InputTable{iview,3} InputTable{iview,4} InputTable{iview,5}]);
+                find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),InputFile);
     end
     % if no file is found, open a browser
Index: trunk/src/series/stereo_civ.m
===================================================================
--- trunk/src/series/stereo_civ.m	(revision 1119)
+++ trunk/src/series/stereo_civ.m	(revision 1120)
@@ -1,3 +1,3 @@
-%'civ_series': PIV function activated by the general GUI series
+%'stereo_series': PIV function activated by the general GUI series
 % --- call the sub-functions:
 %   civ: PIV function itself
@@ -41,4 +41,5 @@
 Data=[];
 errormsg='';
+
 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed
 if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN 
@@ -49,5 +50,5 @@
     path_series=fileparts(which('series'));
     addpath(fullfile(path_series,'series'))
-    Data=stereo_input(Param);% introduce the civ parameters using the GUI civ_input
+    Data=stereo_input(Param);% introduce the civ parameters using the GUI stereo_input
     if isempty(Data)
         Data=Param;% if  civ_input has been cancelled, keep previous parameters
@@ -1309,6 +1310,6 @@
 mtz=(XmlData{1}.GeometryCalib.Tx_Ty_Tz(1,3)+XmlData{2}.GeometryCalib.Tx_Ty_Tz(1,3))/2;
 
-Error=(sqrt(mfx^2+mfy^2)/(2*sqrt(2)*mtz)).*(((Dyb-Dya).*(-u)-(Dxb-Dxa).*(-v))./Den);
-
+%Error=(sqrt(mfx^2+mfy^2)/(2*sqrt(2)*mtz)).*(((Dyb-Dya).*(-u)-(Dxb-Dxa).*(-v))./sqrt(Den));
+Error=(((Dyb-Dya).*(-u)-(Dxb-Dxa).*(-v))./sqrt(Den));
 z=((Dxb-Dxa).*(-u)+(Dyb-Dya).*(-v))./Den;
 
Index: trunk/src/uvmat.m
===================================================================
--- trunk/src/uvmat.m	(revision 1119)
+++ trunk/src/uvmat.m	(revision 1120)
@@ -1209,5 +1209,9 @@
 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
 Slice=[];
+Check_slice=0;
 if isfield(UvData,'XmlData')
+    if isfield(UvData.XmlData{1},'GeometryCalib') && strcmp(UvData.XmlData{1}.GeometryCalib.CalibrationType(1:3),'3D_')
+        Check_slice=1;
+    end
     if isfield(UvData.XmlData{1},'GeometryCalib')&& isfield(UvData.XmlData{1}.GeometryCalib,'SliceCoord')
         Slice=UvData.XmlData{1}.GeometryCalib;%old convention < 2022
@@ -1215,4 +1219,8 @@
         Slice=UvData.XmlData{1}.Slice;% new convention ( 2022)
     end
+end
+if ~Check_slice
+    msgbox_uvmat('ERROR','3D calibration not available, use Tools/geometric calibration with 3D option');
+    return
 end
 % default input
@@ -1295,7 +1303,7 @@
 
 uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+ww 0.95-5*ii-4.2*hh ww hh],'tag','num_SliceCoord_1','BackgroundColor',[1 1 1],...
-    'String',num2str(Slice.SliceCoord(1)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_1'':x position of the tild origin');%edit box
+    'String',num2str(Slice.SliceCoord(1,1)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_1'':x position of the tild origin');%edit box
 uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+ww 0.95-6*ii-5.2*hh ww hh],'tag','num_SliceCoord_2','BackgroundColor',[1 1 1],...
-    'String',num2str(Slice.SliceCoord(2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_2'':y position of the tild origin');%edit box
+    'String',num2str(Slice.SliceCoord(1,2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_2'':y position of the tild origin');%edit box
 
 uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-5*ii-4*hh 1.3*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Angle_title_1',...
@@ -1353,10 +1361,9 @@
 [RootPath,SubDir,RootFile,tild,tild,tild,tild,FileExt]=fileparts_uvmat(FileName);
 XmlFile=find_imadoc(RootPath,SubDir,RootFile,FileExt);%find name of the relevant xml file
-% [s,errormsg]=imadoc2struct(XmlFile,'Slice');%read the xml file
-% if~isempty(errormsg)
-%     msgbox_uvmat('ERROR',errormsg)
-%     return
-% end
-% Slice=s.Slice;% get thegeometric calibration data
+if isempty(XmlFile)
+    msgbox_uvmat('ERROR','an xml file with calibration parameters must be first created, use Tools/geometric calibration');
+    return
+end
+[s,RootTag,errormsg]=xml2struct(XmlFile);
 
 %% read the content of the GUI set_slice
@@ -1370,5 +1377,5 @@
     Z_plane=linspace(SliceData.Z(1),SliceData.Z(2),SliceData.NbSlice);
 else
-    set(hZ,'String',num2str(Z_plane))% restitute the display qfter reqding by read_GUI
+    set(hZ,'String',num2str(Z_plane))% restitute the display after reading by read_GUI
 end
 Slice.SliceCoord=Z_plane'*[0 0 1];
@@ -3315,6 +3322,6 @@
         elseif ref_i_1+1>size(UvData.i1_series{2},3)&&~isempty(InputFile.NomType_1)
             errormsg='maximum i index reached for the second series (reload the input file to update the index bound)';
-        elseif ref_j_1+1>size(UvData.i1_series{2},2)&&~isempty(InputFile.NomType_1)
-            errormsg='maximum j index reached for the second series(reload the input file to update the index bound)';
+        %elseif ref_j_1+1>size(UvData.i1_series{2},2)&&~isempty(InputFile.NomType_1)
+         %   errormsg='maximum j index reached for the second series(reload the input file to update the index bound)';
         end
         if ~isempty(errormsg),return,end
