Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 908)
+++ /trunk/src/series.m	(revision 909)
@@ -269,4 +269,8 @@
     %% fill the list of file series
     InputTable=[{Param.InputFile.RootPath},{Param.InputFile.SubDir},{Param.InputFile.RootFile},{Param.InputFile.NomType},{Param.InputFile.FileExt}];
+    if isempty(find(cellfun('isempty',InputTable)==0));% if there is no input file, do not introduce input info
+        set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed
+        return
+    end
     TimeTable=[{Param.InputFile.TimeName},{[]},{[]},{[]},{[]}];
     if isfield(Param.InputFile,'RootPath_1')
Index: /trunk/src/series/extract_rdvision.m
===================================================================
--- /trunk/src/series/extract_rdvision.m	(revision 908)
+++ /trunk/src/series/extract_rdvision.m	(revision 909)
@@ -236,5 +236,5 @@
     [npi,npj]=size(XmlData.Time);
     if ~isequal(SeqData.nb_frames,(npi-1)*(npj-1))
-        disp_uvmat('ERRROR','inconsistent number of images with respect to the xml file',checkrun);
+        disp_uvmat('ERRROR',['inconsistent number of images ' num2str(SeqData.nb_frames) ' with respect to the xml file: ' num2str((npi-1)*(npj-1))] ,checkrun);
         return
     end
@@ -277,8 +277,9 @@
         disp_uvmat('WARNING',['timestamps exceeds xml time by' num2str(max(time_diff_max))],checkrun)
         checkpreserve=1;
-    end
-    if min(time_diff_min)<-0.005
+    elseif min(time_diff_min)<-0.005
         disp_uvmat('WARNING',['timestamps is lower than xml time by' num2str(min(time_diff_min))],checkrun)
         checkpreserve=1;
+    else
+        disp_uvmat('CONFIRMATION','time from xml file correct within better than 5 ms',checkrun)
     end
     if checkpreserve
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 908)
+++ /trunk/src/uvmat.m	(revision 909)
@@ -1206,4 +1206,6 @@
 function set_slice_APPLY_Callback(hObject,eventdata)
 %------------------------------------------------------------------------    
+set(hObject,'BackgroundColor',[1 1 0]);% paint button in yellow to indicate action
+drawnow
 
 %% get the uvmat GUI data and read the current xml file
@@ -1250,6 +1252,7 @@
 
 %% display image with new calibration in the currently opened uvmat interface
-set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' to plot the whole image
+%set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' to plot the whole image
 uvmat('InputFileREFRESH_Callback',huvmat,[],hhuvmat); %file input with xml reading  in uvmat, show the image in phys coordinates
+set(hObject,'BackgroundColor',[1 0 0]);% paint button back to red
 
 %------------------------------------------------------------------------
@@ -1257,4 +1260,6 @@
 function set_slice_REPLICATE_Callback(hObject,eventdata)
 %------------------------------------------------------------------------ 
+set(hObject,'BackgroundColor',[1 1 0])
+drawnow
 
 %% read the GUI set_slice
@@ -1264,12 +1269,7 @@
 huvmat=findobj(allchild(0),'Tag','uvmat');
 hhuvmat=guidata(huvmat);
-[RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(hhuvmat);
-
-%% open the GUI browse_data
-% answer=msgbox_uvmat('INPUT_TXT','Campaign to calibrate with slice position?',fileparts(RootPath)); 
-% if strcmp(answer,'Cancel')
-%     return
-% end
-OutPutDir=uigetfile_uvmat('Campaign to calibrate with slice position?',fileparts(RootPath),'uigetdir');
+RootPath=read_file_boxes(hhuvmat);
+
+OutPutDir=uigetfile_uvmat('choosean image folder to calibrate with slice position?',fileparts(RootPath),'uigetdir');
 OutPut=browse_data(OutPutDir);
 nbcalib=0;
@@ -1286,14 +1286,19 @@
     GeometryCalib=s.GeometryCalib;
     GeometryCalib.NbSlice=SliceData.NbSlice;
-    GeometryCalib.VolumeScan=SliceData.CheckVolumeScan;
+    GeometryCalib.CheckVolumeScan=SliceData.CheckVolumeScan;
     Z_plane=linspace(SliceData.Z(1),SliceData.Z(2),SliceData.NbSlice);
     GeometryCalib.SliceCoord=Z_plane'*[0 0 1];
     GeometryCalib.SliceAngle=zeros(GeometryCalib.NbSlice,3);
-    GeometryCalib.SliceAngle(:,1)=SliceData.SliceAngle(1)*ones(GeometryCalib.NbSlice,1);%rotation around x axis (to generalise)
-    GeometryCalib.SliceAngle(:,2)=SliceData.SliceAngle(2)*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise)
+    Angle_1=linspace(SliceData.SliceAngle_1(1),SliceData.SliceAngle_1(2),SliceData.NbSlice);
+    Angle_2=linspace(SliceData.SliceAngle_2(1),SliceData.SliceAngle_2(2),SliceData.NbSlice);
+    GeometryCalib.SliceAngle(:,1)=Angle_1';%rotation around x axis (to generalise)
+    GeometryCalib.SliceAngle(:,2)=Angle_2';%rotation around y axis (to generalise)
     GeometryCalib.SliceAngle(:,3)=0;
     if SliceData.CheckRefraction
         GeometryCalib.InterfaceCoord=[0 0 SliceData.H];
         GeometryCalib.RefractionIndex=SliceData.RefractionIndex;
+    elseif isfield(GeometryCalib,'RefractionIndex')
+        GeometryCalib=rmfield(GeometryCalib,'RefractionIndex');
+        GeometryCalib=rmfield(GeometryCalib,'InterfaceCoord');
     end
     
@@ -1307,5 +1312,7 @@
     end
 end
+set(hObject,'BackgroundColor',[1 0 0])
 msgbox_uvmat('CONFIMATION',[SubDirBase ' calibrated with slice positions for ' num2str(nbcalib) ' experiments']);
+
 
 %------------------------------------------------------------------------
