Index: /trunk/src/editxml.m
===================================================================
--- /trunk/src/editxml.m	(revision 997)
+++ /trunk/src/editxml.m	(revision 998)
@@ -111,12 +111,12 @@
 DataIn=get(heditxml,'UserData');
 if ~isempty(xs)
-	xs_node=list.xs_uid(ind);%xs_node of the subelement #ind
-	[nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_node);
-	[element,subelem]=get_xml(t,path,xs_element,NewRootUid,xs_subelem);
-	update_list(handles,path,xs_element,element,NewRootUid,xs_subelem,subelem);
-	if xs_element.subtest     
+    xs_node=list.xs_uid(ind);%xs_node of the subelement #ind
+    [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_node);
+    [element,subelem]=get_xml(t,path,xs_element,NewRootUid,xs_subelem);
+    update_list(handles,path,xs_element,element,NewRootUid,xs_subelem,subelem);
+    if xs_element.subtest     
         DataIn.CurrentUid=[DataIn.CurrentUid NewRootUid];%record new current uid
         DataIn.xs_CurrentUid=[DataIn.xs_CurrentUid xs_node];%record the new curent schema uid
-	end
+    end
     
 %     %update the import file display
@@ -174,6 +174,6 @@
     else
         [xs_nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_nodeup);
-		[element,subelem]=get_xml(t,path,xs_element,nodeup,xs_subelem);
-		update_list(handles,path,xs_element,element,nodeup,xs_subelem,subelem);
+        [element,subelem]=get_xml(t,path,xs_element,nodeup,xs_subelem);
+        update_list(handles,path,xs_element,element,nodeup,xs_subelem,subelem);
         %update the import file display
         if isfield(DataIn,'h_ref')&ishandle(DataIn.h_ref)
@@ -369,7 +369,7 @@
 else
     DataIn.xs_CurrentUid=find(xs,'/xs:schema/xs:element');%uid of the root element in the schema
-	[nodeup,path,xs_element,xs_subelem]=scan_schema(xs,DataIn.xs_CurrentUid);%scan the schema at the root level
-	[element,subelem]=get_xml(t,path,xs_element,1,xs_subelem);% read the corresponding xml data
-	update_list(handles,path,xs_element,element,1,xs_subelem,subelem);%update the display of information on the interface
+    [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,DataIn.xs_CurrentUid);%scan the schema at the root level
+    [element,subelem]=get_xml(t,path,xs_element,1,xs_subelem);% read the corresponding xml data
+    update_list(handles,path,xs_element,element,1,xs_subelem,subelem);%update the display of information on the interface
 end
 set(heditxml,'UserData',DataIn);%store the new input xml file name
@@ -655,6 +655,6 @@
 up=1;
 if node>0
-	nodeup=node;
-	while up==1; 
+    nodeup=node;
+    while up==1; 
         nodeup=get(t,nodeup,'parent');%move up to the parent in the tree
         if isempty(nodeup)
@@ -671,6 +671,6 @@
             end
         end
-	end
-	element.attrup=attrup;
+    end
+    element.attrup=attrup;
 end
 %find the subelement properties in the xml file
@@ -1043,5 +1043,5 @@
     list_element=[];
 %      Data.CurrentUid=[Data.CurrentUid root_uid]%record new current uid
-	for iline=1:length(list_uid)
+    for iline=1:length(list_uid)
         element=get(t,list_uid(iline));
         if isfield(element,'type')&isequal(element.type,'element')
@@ -1071,9 +1071,9 @@
             end
         end
-	end
+    end
     set(handles.list_element,'Value',1)%select the first line of list_element by default
-	set(handles.list_element,'String',cell2tab(list_element,' ') )
+    set(handles.list_element,'String',cell2tab(list_element,' ') )
     list.uid=list_uid;
-	set(handles.list_element,'UserData',list)
+    set(handles.list_element,'UserData',list)
 end
 %---------------------------------------------------------
@@ -1415,6 +1415,6 @@
 % up=1
 % if node>0
-% 	nodeup=node;
-% 	while up==1; 
+%     nodeup=node;
+%     while up==1; 
 %         nodeup=get(t,nodeup,'parent');%move up to the parent in the tree
 %         if isempty(nodeup)
@@ -1431,6 +1431,6 @@
 %             end
 %         end
-% 	end
-% 	element.attrup=attrup;
+%     end
+%     element.attrup=attrup;
 % end
 % %find the subelement properties in the xml file
Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 997)
+++ /trunk/src/series.m	(revision 998)
@@ -3023,5 +3023,5 @@
 if get(handles.EditObject,'Value')
     set(handles.ViewObject,'Value',0)
-	UserData=get(handles.series,'UserData');
+    UserData=get(handles.series,'UserData');
     hset_object=set_object(UserData.ProjObject);
     set(hset_object,'Name','edit_object_series')
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 997)
+++ /trunk/src/uvmat.m	(revision 998)
@@ -1,3 +1,3 @@
-%'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization 
+%'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization
 %------------------------------------------------------------------------
 % function huvmat=uvmat(input)
@@ -52,5 +52,5 @@
 %
 % 1) Input filenames are determined by MenuBrowse (first field), MenuBrowseCampaign
-% (second field), or by the stored file name .FileName_1, or as an input of uvmat. 
+% (second field), or by the stored file name .FileName_1, or as an input of uvmat.
 % 2) These functions call 'uvmat/display_file_name.m' which detects the file series, and fills the file index boxes
 % 3) Then 'uvmat/update_rootinfo.m' Updates information about a new field series (indices to scan, timing, calibration from an xml file)
@@ -61,18 +61,18 @@
 %    %%%%%%%%  structure of uvmat/refresh_field.m %%%%%%%%
 %
-%           Main input open       second input open_1        
-%                    |                   |  
+%           Main input open       second input open_1
+%                    |                   |
 %             read_field.m            read_field.m
 %                    |                   |
-%                 Field{1}            Field{2}               
-%                    |                   |                                  
-%                    --->transform fct<---             transform (e.g. phys.m) and combine input fieldname  
-%                            |                                    
+%                 Field{1}            Field{2}
+%                    |                   |
+%                    --->transform fct<---             transform (e.g. phys.m) and combine input fieldname
+%                            |
 %                        (tps_coeff_field.m)               calculate tps coefficients (for filter projection or spatial derivatives).
 %                            |
 %                       UvData.Field-------------->Histogram
 %               _____________|____________
-%              |                          |                    
-%        proj_field.m               proj_field.m       project the field on the projection objects (use set_field_list.m)           
+%              |                          |
+%        proj_field.m               proj_field.m       project the field on the projection objects (use set_field_list.m)
 %              |                          |
 %         UvData.PlotAxes          ViewData.PlotAxes (on view_field)
@@ -92,7 +92,7 @@
 % If the scalar exists in an input open (image or scalar stored under its
 % name in a netcdf open), it is directly read at the level of Field{1}or Field{2}.
-% Else only its name AName is recorded in Field{i}, and its field is then calculated 
+% Else only its name AName is recorded in Field{i}, and its field is then calculated
 %by the fuction calc_scal after the coordinate transform or after projection on an CheckEditObject
-     
+
 % Properties attached to plotting figures (standard Matlab properties):
 %    'CurrentAxes'= gca or get(gcf,'CurrentAxes');
@@ -100,5 +100,5 @@
 %    'CurrentCharacter'=get(gcf,'CurrentCharacter'): last character typed  over the figure where the mouse is positioned
 %    'WindowButtonMotionFcn': function permanently called by mouse motion over the figure
-%    'KeyPressFcn': function called by pressing a key on the key board 
+%    'KeyPressFcn': function called by pressing a key on the key board
 %    'WindowButtonDownFcn':  function called by pressing the mouse over the  figure
 %    'WindowButtonUpFcn': function called by releasing  the mouse pressure over the  figure
@@ -107,5 +107,5 @@
 %    'CurrentPoint'=get(gca,'CurrentPoint'); (standard Matlab) same as for the figure, but position in plot axes.
 %     AxeData:=get(gca,'UserData');
-%     AxeData.Drawing  = create: create a new object 
+%     AxeData.Drawing  = create: create a new object
 %                       = deform: modify an existing object by moving its defining create
 %                      = off: no current drawing action
@@ -200,5 +200,5 @@
 set(hObject,'WindowButtonMotionFcn',{'mouse_motion',handles})%set mouse action functio
 set(hObject,'WindowButtonDownFcn',{'mouse_down'})%set mouse click action function
-set(hObject,'WindowButtonUpFcn',{'mouse_up',handles}) 
+set(hObject,'WindowButtonUpFcn',{'mouse_up',handles})
 set(hObject,'DeleteFcn',{@closefcn})%
 set(hObject,'ResizeFcn',{@ResizeFcn,handles})%
@@ -260,5 +260,5 @@
     if ishandle(handles.UVMAT_title)
         delete(handles.UVMAT_title)
-    end   
+    end
     if isstruct(input)
         if isfield(input,'InputFile')
@@ -289,5 +289,5 @@
     %% check the path and date of modification of all functions in uvmat
     path_to_uvmat=which ('uvmat');% check the path detected for source file uvmat
-    [infomsg,date_str,svn_info]=check_files;%check the path of the functions called by uvmat.m   
+    [infomsg,date_str,svn_info]=check_files;%check the path of the functions called by uvmat.m
     date_str=['last modification: ' date_str];
     if ishandle(handles.UVMAT_title)
@@ -312,5 +312,5 @@
 % --- Outputs from this function are returned to the command menuline.
 function varargout = uvmat_OutputFcn(hObject, eventdata, handles)
-%------------------------------------------------------------------------    
+%------------------------------------------------------------------------
 varargout{1} = handles.output;% the only output argument is the handle to the GUI figure
 
@@ -344,5 +344,5 @@
 %--- activated when resizing the GUI view_field
  function ResizeFcn(gcbo,eventdata,handles)
-%------------------------------------------------------------------------     
+%------------------------------------------------------------------------
 set(handles.uvmat,'Units','pixels')
 size_fig=get(handles.uvmat,'Position');
@@ -581,5 +581,5 @@
 % --------------------------------------------------------------------
 function MenuExportAxis_Callback(hObject, eventdata, handles)
-% --------------------------------------------------------------------    
+% --------------------------------------------------------------------
 ListFig=findobj(allchild(0),'Type','figure');
 nb_option=0;
@@ -644,5 +644,5 @@
 FileBase=fullfile(RootPath,RootFile);
 
-%% create a fig and axis for movies 
+%% create a fig and axis for movies
 figure_movie=findobj(allchild(0),'name','figure_movie');
 
@@ -659,5 +659,5 @@
 time_str=get(handles.TimeValue,'String');
 if ~isempty(time_str)
-    htitle=get(newaxes,'Title');  
+    htitle=get(newaxes,'Title');
     set(htitle,'String',['t=' time_str])
 end
@@ -674,5 +674,5 @@
 Position(4)=Position(4)/2;
 hfig=findobj(allchild(0),'Tag','set_movie');
-if ~isempty(hfig),delete(hfig), end; %delete existing version of the GUI 
+if ~isempty(hfig),delete(hfig), end; %delete existing version of the GUI
 hfig=figure('name','set_movie','tag','set_movie','MenuBar','none','NumberTitle','off','Units','pixels',...
     'Position',Position);
@@ -714,8 +714,8 @@
 hMovieSize=findobj(hset_movie,'Tag','MovieSize');
 nbpix=[640 480; 720 480; 1280 720];
-SizeOption=get(hMovieSize,'Value');    
-nbpix=nbpix(SizeOption,:);  
-    
-%% look for movie fig 
+SizeOption=get(hMovieSize,'Value');
+nbpix=nbpix(SizeOption,:);
+
+%% look for movie fig
 figure_movie=findobj(allchild(0),'name','figure_movie');
 if isempty(figure_movie)
@@ -726,5 +726,5 @@
     newaxes=copyobj(hhuvmat.PlotAxes,figure_movie);%new plotting axes in the new figure
     set(newaxes,'Tag','movieaxes')
-    
+
     %% display time if defined in uvmat
     time_str=get(hhuvmat.TimeValue,'String');
@@ -745,5 +745,5 @@
 % function called by pressing APPLY in the GUI  set_movie
 function set_movie_START_Callback(hObject,eventdata)
-%------------------------------------------------------------------------    
+%------------------------------------------------------------------------
 %% read info from the GUI set_movie
 hset_movie=get(hObject,'parent');
@@ -773,13 +773,13 @@
     while testexist==2
         backup=[backup '~'];
-        testexist=exist(backup,'file');      
+        testexist=exist(backup,'file');
     end
     [success,message]=copyfile(MovieName,backup);%make backup of the existing file
     if isequal(success,1)
-        delete(MovieName)%delete existing file 
+        delete(MovieName)%delete existing file
     else
         msgbox_uvmat('ERROR',message)
         return
-    end 
+    end
 end
 %create avi open
@@ -801,5 +801,5 @@
 for i=1:FrameNumber
     if get(hhuvmat.speed,'Value')~=0 && isequal(get(hhuvmat.MenuExportMovie,'BusyAction'),'queue') % enable STOP command
-            runpm(hObject,eventdata,hhuvmat,increment)% run plus 
+            runpm(hObject,eventdata,hhuvmat,increment)% run plus
             drawnow
             time_str=get(hhuvmat.TimeValue,'String');
@@ -818,5 +818,5 @@
 % function called by pressing APPLY in the GUI  set_slices
 function set_movie_Cancel_Callback(hObject,eventdata)
-%------------------------------------------------------------------------    
+%------------------------------------------------------------------------
 delete(hObject)
 
@@ -937,5 +937,5 @@
 %% desactivate concurrent tools
 set(handles.MenuRuler,'checked','off')%desactivate ruler
-hgeometry_calib=findobj(allchild(0),'tag','geometry_calib');% search the GUI geometric calibration 
+hgeometry_calib=findobj(allchild(0),'tag','geometry_calib');% search the GUI geometric calibration
 if ishandle(hgeometry_calib)
     hhgeometry_calib=guidata(hgeometry_calib);
@@ -1005,5 +1005,5 @@
 end
 
-hset_object=set_object(data,handles);% call the GUI set_object 
+hset_object=set_object(data,handles);% call the GUI set_object
 hchild=get(hset_object,'children');
 set(hchild,'enable','on')
@@ -1011,5 +1011,5 @@
 if check_plot
     hhset_object=guidata(hset_object);
-    set_object('REFRESH_Callback',1,[],hhset_object);% call the GUI set_object 
+    set_object('REFRESH_Callback',1,[],hhset_object);% call the GUI set_object
 end
 set(handles.CheckViewField,'Visible','on')
@@ -1058,5 +1058,5 @@
     SubField_Callback(hObject, eventdata, handles)
 end
-UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 
+UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
 
 %% suppress competing tools
@@ -1064,5 +1064,5 @@
 set(handles.CheckZoom,'Value',0)
 set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7])
-set(handles.ListObject,'Value',1) 
+set(handles.ListObject,'Value',1)
 
 %% initiate display of the GUI geometry_calib
@@ -1074,5 +1074,5 @@
 FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];
 set(handles.view_xml,'BackgroundColor',[1 1 0])%indicate the reading of the current xml file by geometry_calib
-geometry_calib(FileName);% call the geometry_calib interface	
+geometry_calib(FileName);% call the geometry_calib interface
 set(handles.view_xml,'BackgroundColor',[1 1 1])%indicate the end of reading of the current xml file by geometry_calib
 set(handles.MenuCalib,'checked','on')% indicate that MenuCalib is activated, test used by mouse action
@@ -1089,5 +1089,5 @@
 end
 
-UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 
+UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
 % check=0;
 if isfield(UvData,'XmlData')&&isfield(UvData.XmlData{1},'GeometryCalib')&& isfield(UvData.XmlData{1}.GeometryCalib,'SliceCoord')
@@ -1096,5 +1096,5 @@
     msgbox_uvmat('ERROR','3D geometric calibration needed before defining slices')
     return
-end    
+end
 SliceCoord=GeometryCalib.SliceCoord;
 InterfaceCoord=min(SliceCoord(:,3));
@@ -1106,11 +1106,11 @@
 if isfield(GeometryCalib,'CheckVolumeScan')
     CheckVolumeScan=GeometryCalib.CheckVolumeScan;
-end	
+end
 RefractionIndex=1.33;
-CheckRefraction=0;% default value of the check box refraction 
+CheckRefraction=0;% default value of the check box refraction
 if isfield(GeometryCalib,'RefractionIndex')
     RefractionIndex=GeometryCalib.RefractionIndex;
     CheckRefraction=1;
-end	
+end
 SliceAngle=[0 0 0];
 if isfield(GeometryCalib,'SliceAngle')
@@ -1126,5 +1126,5 @@
 Bottom=ScreenSize(4)-Height-40; %put fig at top right
 hfig=findobj(allchild(0),'Tag','set_slice');
-if ~isempty(hfig),delete(hfig), end; %delete existing version of the GUI 
+if ~isempty(hfig),delete(hfig), end; %delete existing version of the GUI
 hfig=figure('name','set_slices','tag','set_slice','MenuBar','none','NumberTitle','off','Units','pixels','Position',[Left,Bottom,Width,Height],'UserData',GeometryCalib);
 BackgroundColor=get(hfig,'Color');
@@ -1197,5 +1197,5 @@
 % function called by selecting CheckRefraction in the GUI set_slices
 function set_slice_CheckRefraction_Callback(hObject,eventdata)
-%------------------------------------------------------------------------    
+%------------------------------------------------------------------------
 hset_slice=get(hObject,'parent');
 h_refraction(1)=findobj(hset_slice,'String','surface');
@@ -1212,5 +1212,5 @@
 % function called by pressing APPLY in the GUI  set_slices
 function set_slice_APPLY_Callback(hObject,eventdata)
-%------------------------------------------------------------------------    
+%------------------------------------------------------------------------
 set(hObject,'BackgroundColor',[1 1 0]);% paint button in yellow to indicate action
 drawnow
@@ -1254,5 +1254,5 @@
 elseif isfield(GeometryCalib,'RefractionIndex')
     GeometryCalib=rmfield(GeometryCalib,'RefractionIndex');
-    GeometryCalib=rmfield(GeometryCalib,'InterfaceCoord');  
+    GeometryCalib=rmfield(GeometryCalib,'InterfaceCoord');
 end
 
@@ -1275,5 +1275,5 @@
 % function called by pressing REPLICATE in the GUI  set_slices
 function set_slice_REPLICATE_Callback(hObject,eventdata)
-%------------------------------------------------------------------------ 
+%------------------------------------------------------------------------
 set(hObject,'BackgroundColor',[1 1 0])
 drawnow
@@ -1294,5 +1294,5 @@
         SubDirBase=regexprep(OutPut.DataSeries{idevice},'\..+$','');
         XmlFile=fullfile(OutPut.Campaign,OutPut.Experiment{ilist},[SubDirBase '.xml']);
-        
+
         % read the current xml file
         if  exist(XmlFile,'file')
@@ -1320,5 +1320,5 @@
                 GeometryCalib=rmfield(GeometryCalib,'InterfaceCoord');
             end
-            
+
             % update the current xml file
             errormsg=update_imadoc(GeometryCalib,XmlFile,'GeometryCalib');% introduce the calibration data in the xml file
@@ -1346,5 +1346,5 @@
 function MenuLIFCalib_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
-%% read UvData properties stored on the uvmat interface 
+%% read UvData properties stored on the uvmat interface
 UvData=get(handles.uvmat,'UserData');
 if isfield(UvData,'XmlData')&& isfield(UvData.XmlData{1},'GeometryCalib')
@@ -1394,5 +1394,5 @@
 
 %% display the current image in polar axes with origin at the  illumination source
-currentdir=pwd;  
+currentdir=pwd;
 uvmatpath=fileparts(which('uvmat'));
 cd(fullfile(uvmatpath,'transform_field'));
@@ -1464,8 +1464,8 @@
     end
     % save the illumination origin
-    t=struct2xml(XmlData.Illumination,t,uid_illumination); 
+    t=struct2xml(XmlData.Illumination,t,uid_illumination);
     save(t,XmlFileName);
 end
-    
+
 
 
@@ -1473,5 +1473,5 @@
 function MenuMask_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
-UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 
+UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
 ListObj=UvData.ProjObject;
 select=zeros(1,numel(ListObj));
@@ -1568,5 +1568,5 @@
     imflag=uint8(255*(0.392+0.608*flag));% =100 for flag=0 (vectors not computed when 20<imflag<200)
     imflag=flipdim(imflag,1);
-    
+
     %display the mask
     hfigmask=figure;
@@ -1606,5 +1606,5 @@
 set(handles.edit_vect,'Value',0)
 edit_vect_Callback(hObject, eventdata, handles)
-set(handles.ListObject,'Value',1)      
+set(handles.ListObject,'Value',1)
 
 %prepare display of the set_grid GUI
@@ -1784,5 +1784,5 @@
 set(handles.uvmat,'Pointer','arrow')% set back the mouse pointer to arrow
 
-%------------------------------------------------------------------------ 
+%------------------------------------------------------------------------
 % --- Fills the edit boxes RootPath, RootFile,NomType...from an input file name 'fileinput'
 function errormsg=display_file_name(handles,fileinput,index)
@@ -1899,5 +1899,5 @@
                 i2_s=i2_0;
             else
-               i2_s=i2; 
+               i2_s=i2;
             end
             j1_0=stra2num(get(handles.j1,'String'));
@@ -1914,5 +1914,5 @@
             end
         end
-        
+
         % synchronise indices of the second  input file if it exists
         if get(handles.SubField,'Value')==1% if the subfield button is activated, update the field numbers
@@ -1943,5 +1943,5 @@
             set(handles.FileIndex_1,'String',FileIndex_1)
         end
-        
+
         %enable other menus
         set(handles.MenuOpenCampaign,'Enable','on')
@@ -1951,5 +1951,5 @@
         set(handles.MenuTools,'Enable','on')
 
-        % initiate input file series and inputfilerefresh the current field view:     
+        % initiate input file series and inputfilerefresh the current field view:
         update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileInfo,MovieObject,index);
 
@@ -2017,5 +2017,5 @@
 end
 
-%% read timing and total frame number from the current file (e.g. movie files) 
+%% read timing and total frame number from the current file (e.g. movie files)
 TimeUnit='';%default
 TimeName='';%default
@@ -2190,5 +2190,5 @@
             set(handles.TransformName,'Value',3); % phys transform by default if fixedLimits is off
         end
-        if isfield(GeometryCalib,'SliceCoord')            
+        if isfield(GeometryCalib,'SliceCoord')
            siz=size(GeometryCalib.SliceCoord);
            if siz(1)>1
@@ -2204,5 +2204,5 @@
            end
            slices_Callback([],[], handles)
-        end           
+        end
     end
 end
@@ -2257,5 +2257,5 @@
 set(handles.uvmat,'UserData',UvData)
 
-%% set index navigation options 
+%% set index navigation options
 scan_option='i';%default
 state_j='off'; %default
@@ -2269,10 +2269,10 @@
 end
 [ref_j,ref_i]=find(squeeze(i1_series(1,:,:)));
-if ~isempty(j1_series) 
+if ~isempty(j1_series)
         state_j='on';
         if index==1
             if isequal(ref_i,ref_i(1)*ones(size(ref_j)))% if ref_i is always equal to its first value
-                scan_option='j'; %scan j indext               
-            end 
+                scan_option='j'; %scan j indext
+            end
         end
 end
@@ -2286,5 +2286,5 @@
     end
      set(handles.scan_i,'Value',1)
-     scan_i_Callback([],[], handles); 
+     scan_i_Callback([],[], handles);
 else
     diff_ref_j=diff(ref_j);
@@ -2296,5 +2296,5 @@
     end
      set(handles.scan_j,'Value',1)
-     scan_j_Callback([],[], handles); 
+     scan_j_Callback([],[], handles);
 end
 set(handles.scan_j,'Visible',state_j)
@@ -2309,5 +2309,5 @@
 end
 
-%% apply the effect of the transform fct and view the field  
+%% apply the effect of the transform fct and view the field
 transform=get(handles.TransformPath,'UserData');
 if index==2 && (~isa(transform,'function_handle')||nargin(transform)<3)
@@ -2373,5 +2373,5 @@
 %------------------------------------------------------------------------
 function update_ij(handles,index_rank)
-    
+
 NomType=get(handles.NomType,'String');
 
@@ -2412,5 +2412,5 @@
     set(handles.FileIndex_1,'BackgroundColor',[0.7 0.7 0.7])% mark the edit box in grey, then RUN0 will mark it in white for confirmation
 end
-    
+
 %------------------------------------------------------------------------
 
@@ -2448,5 +2448,5 @@
 for ilist=1:nbslice
     list_index{ilist,1}=num2str(ilist);
-end   
+end
 set(handles.masklevel,'String',list_index)
 set(handles.masklevel,'Value',z)
@@ -2465,5 +2465,5 @@
 end
 option=get(handles.view_xml,'String');
-if isequal(option,'view .xml')     
+if isequal(option,'view .xml')
     FileXml=fullfile(RootPath,[SubDir '.xml']);
     if ~exist(FileXml,'file')% case of civ files , removes the extension for subdir
@@ -2558,10 +2558,10 @@
 
 %% update mask image if the mask is new
-if ~ (isfield(UvData,'MaskName') && isequal(UvData.MaskName,MaskName)) 
+if ~ (isfield(UvData,'MaskName') && isequal(UvData.MaskName,MaskName))
     UvData.MaskName=MaskName; %update the recorded name on UvData
     set(handles.uvmat,'UserData',UvData);
     if ~exist(MaskName,'file')
         if isfield(Mask,'maskhandle')&& ishandle(Mask.maskhandle)
-            delete(Mask.maskhandle)    
+            delete(Mask.maskhandle)
         end
     else
@@ -2592,10 +2592,10 @@
         end
         flagmask=MaskField.A < 200;
-        
+
         %make brown color image
         imflag(:,:,1)=0.9*flagmask;
         imflag(:,:,2)=0.7*flagmask;
         imflag(:,:,3)=zeros(size(flagmask));
-        
+
         %update mask image
         hmask=[]; %default
@@ -2604,5 +2604,5 @@
         end
         if ~isempty(hmask)
-            set(hmask,'CData',imflag)    
+            set(hmask,'CData',imflag)
             set(hmask,'AlphaData',flagmask*0.6)
             set(hmask,'XData',MaskField.Coord_x);
@@ -2611,5 +2611,5 @@
         else
             axes(handles.PlotAxes)
-            hold on    
+            hold on
             Mask.maskhandle=image(MaskField.Coord_x,MaskField.Coord_y,imflag,'Tag','mask','HitTest','off','AlphaData',0.6*ones(size(flagmask)));
             set(handles.CheckMask,'UserData',Mask)
@@ -2625,5 +2625,5 @@
 %------------------------------------------------------------------------
 % --- Executes on button press in runplus: make one step forward and call
-% --- InputFileREFRESH. The step forward is along the fieldname series 1 or 2 depending on 
+% --- InputFileREFRESH. The step forward is along the fieldname series 1 or 2 depending on
 % --- the scan_i and scan_j check box (exclusive each other)
 function runplus_Callback(hObject, eventdata, handles)
@@ -2634,5 +2634,5 @@
 increment=str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d
 if isnan(increment)% case of free increment: move to next available field index
-    increment='+'; 
+    increment='+';
 end
 errormsg=runpm(hObject,eventdata,handles,increment);
@@ -2644,5 +2644,5 @@
 %------------------------------------------------------------------------
 % --- Executes on button press in runmin: make one step backward and call
-% --- InputFileREFRESH. The step backward is along the fieldname series 1 or 2 depending on 
+% --- InputFileREFRESH. The step backward is along the fieldname series 1 or 2 depending on
 % --- the scan_i and scan_j check box (exclusive each other)
 function runmin_Callback(hObject, eventdata, handles)
@@ -2653,5 +2653,5 @@
 increment=-str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d
 if isnan(increment)% case of free increment: move to previous available field index
-    increment='-'; 
+    increment='-';
 end
 errormsg=runpm(hObject,eventdata,handles,increment);
@@ -2670,5 +2670,5 @@
 increment=str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d
 if isnan(increment)% case of free increment: move to next available field index
-    increment='+'; 
+    increment='+';
 end
 set(handles.STOP,'Visible','on')
@@ -2700,5 +2700,5 @@
 increment=-str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d
 if isnan(increment)% case of free increment: move to next available field index
-    increment='-'; 
+    increment='-';
 end
 set(handles.STOP,'Visible','on')
@@ -2799,5 +2799,5 @@
         end
     end
-    
+
 % the pair i1-i2 or j1-j2 is free (check box CheckFixPair not selected): the list of existing indices recorded in UvData is used
 else
@@ -2870,5 +2870,5 @@
         j2=UvData.j2_series{1}(ref_indices(end));
     end
-    
+
     % case of a second file series
     if sub_value
@@ -2953,5 +2953,5 @@
 %% update the index counters if the index move is successfull
 
-if isempty(errormsg) 
+if isempty(errormsg)
     set(handles.i1,'String',num2stra(i1,NomType,1));
     if isequal(i2,i1)
@@ -2967,5 +2967,5 @@
     end
     if strcmp(NomType,'level')
-       indices=num2str(i1); 
+       indices=num2str(i1);
     else
     indices=fullfile_uvmat('','','','',NomType,i1,i2,j1,j2);
@@ -2981,5 +2981,5 @@
     else
         if isempty(i2), set(handles.i2,'String',''); end % suppress the second index display if not used
-        if isempty(j2), set(handles.j2,'String',''); end 
+        if isempty(j2), set(handles.j2,'String',''); end
     end
 end
@@ -2998,5 +2998,5 @@
     return
 end
-   
+
 %% check the input file indexing:
 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles);
@@ -3008,5 +3008,5 @@
 filename=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];% build the input file name (first line)
 
-set(handles.movie_pair,'BusyAction','queue')% 
+set(handles.movie_pair,'BusyAction','queue')%
 set(handles.CheckFixPair,'Value',1)% impose fixed pair (needed for function runpm)
 set(handles.REFRESH,'BackgroundColor',[1 1 0])%paint the command button in yellow to indicate its activity
@@ -3209,9 +3209,9 @@
 %------------------------------------------------------------------------
 % --- read the input files and inputfilerefresh all the plots, including projection.
-% OUTPUT: 
+% OUTPUT:
 %  errormsg: error message char string  =[] by default
 % INPUT:
 % FileName: first input file (=[] in the absence of input file)
-% FileName_1: second input file (=[] in the asbsence of second input file) 
+% FileName_1: second input file (=[] in the asbsence of second input file)
 % num_i1,num_i2,num_j1,num_j2; frame indices
 % i1_1,i2_1,j1_1,j2_1: frame indices for the second input file  (needed if FileName_1 is not empty)
@@ -3273,5 +3273,5 @@
 end
 
-%% read the first input field 
+%% read the first input field
 ParamIn.ColorVar='';%default variable name for vector color
 frame_index=1;%default
@@ -3299,5 +3299,5 @@
         end
     case {'video','mmreader','rdvision','cine_phantom'}
-        ParamIn=UvData.MovieObject{1}; % movie object     
+        ParamIn=UvData.MovieObject{1}; % movie object
         if strcmp(NomType,'*')
             frame_index=num_i1;%frame index from a single movies or multimage
@@ -3327,5 +3327,5 @@
             ParamIn.Npy=UvData.XmlData.Npy;
             ParamIn.Npx=UvData.XmlData.Npx;
-        else            
+        else
             errormsg='Npx and Npy need to be defined in the xml file for volume images .vol';
             return
@@ -3348,5 +3348,5 @@
             ParamIn.TimeVarName=TimeName(5:end);
         end
-    end 
+    end
 end
 
@@ -3355,5 +3355,5 @@
     errormsg=['uvmat / refresh_field / read_field( ' FileName ') / ' errormsg];
     return
-end  
+end
 if isfield(ParamOut,'Npx')&& isfield(ParamOut,'Npy')
     set(handles.num_Npx,'String',num2str(ParamOut.Npx));% display image size on the interface
@@ -3393,5 +3393,5 @@
                     list_code=get(handles.ColorScalar,'String');% list menu fields
                     index_code=get(handles.ColorScalar,'Value');% selected string index
-                    ParamIn_1.ColorVar= list_code{index_code}; % selected field for vector color display                  
+                    ParamIn_1.ColorVar= list_code{index_code}; % selected field for vector color display
                 end
             end
@@ -3402,5 +3402,5 @@
             else
                 frame_index_1=i1_1;
-            end  
+            end
          case 'multimage'
             if strcmp(NomType_1,'*')%frame index for movies or multimage
@@ -3408,5 +3408,5 @@
             else
                 frame_index_1=j1_1;
-            end   
+            end
         case 'vol' %TODO: update
             if isfield(UvData.XmlData,'Npy') && isfield(UvData.XmlData,'Npx')
@@ -3436,5 +3436,5 @@
         ParamIn_1.Coord_x=get(handles.Coord_x,'String');
         ParamIn_1.Coord_y=get(handles.Coord_y,'String');
-        end  
+        end
         [Field{2},ParamOut_1,errormsg] = read_field(FileName_1,UvData.FileType{2},ParamIn_1,frame_index_1);
         if ~isempty(errormsg)
@@ -3514,5 +3514,5 @@
     set(handles.FixVelType,'Visible','off')
 end
-    
+
 %% introduce w as background image by default for a new series (only for nbdim=2)
 if ~isfield(UvData,'NewSeries')
@@ -3537,5 +3537,5 @@
 %         set(handles.FieldName_1,'Visible','on');
 %         Field{1}.AName='w';
-% end           
+% end
 
 %% display time value of the current file
@@ -3575,5 +3575,5 @@
         abstime=Field{1}.Time;
     elseif ~isempty(regexp(TimeName,'^att:', 'once'))
-        abstime=Field{1}.(TimeName(5:end));%the time is an attribute  selected by get_file 
+        abstime=Field{1}.(TimeName(5:end));%the time is an attribute  selected by get_file
         if isfield(Field{1},[TimeName(5:end) 'Unit'])
             TimeUnit=Field{1}.([TimeName(5:end) 'Unit']);
@@ -3593,5 +3593,5 @@
         dt=Field{2}.Dt;%dt read from the netcdf input file
     end
-end 
+end
 set(handles.TimeValue,'String',num2str(abstime))
 
@@ -3619,7 +3619,7 @@
         end
     end
-    
+
     % get time in the input file of the second series, not defined in a xml file or movie
-    if isempty(abstime_1) && numel(Field)==2 
+    if isempty(abstime_1) && numel(Field)==2
          if strcmp(TimeName_1,'civdata')||strcmp(TimeName_1,'civx')
         abstime_1=Field{2}.Time;
@@ -3652,5 +3652,5 @@
 set(handles.Time_title,'String',Time_title)
 
-%% store the current open names, fieldname and vel types in uvmat interface 
+%% store the current open names, fieldname and vel types in uvmat interface
 UvData.FileName_1=FileName_1;
 UvData.ParamOut_1=ParamOut_1;
@@ -3734,5 +3734,5 @@
 else
     set(handles.Objects,'Visible','on')
-    
+
     %% Plot the projections on the selected  projection objects
     %if no projection object exists, create a default one
@@ -3798,5 +3798,5 @@
         PlotParam{1}.Vectors.ColorCode= {'rgb'};
     end
-    
+
     %% second projection object (view_field display)
     if length( IndexObj)==2
@@ -3808,6 +3808,6 @@
         end
     end
-    
-    %% loop on the projection objects: one or two 
+
+    %% loop on the projection objects: one or two
     for imap=1:numel(IndexObj)
         iobj=IndexObj(imap);
@@ -3822,9 +3822,9 @@
             if iobj==1 && ~(isfield(UvData.ProjObject{iobj},'Coord') && size(UvData.ProjObject{iobj}.Coord,2)>=3 && UvData.ProjObject{iobj}.Coord(1,3)<UvData.Field.ZMax && UvData.ProjObject{iobj}.Coord(1,3)>UvData.Field.ZMin)
                  UvData.ProjObject{iobj}.Coord(1,3)=(UvData.Field.ZMin+UvData.Field.ZMax)/2;%section at a middle plane chosen
-            end          
+            end
         end
         [ObjectData,errormsg]=proj_field(UvData.Field,UvData.ProjObject{iobj});% project field on the object
         if ~isempty(errormsg)
-            errormsg=['projection on ' UvData.ProjObject{iobj}.Type ': ' errormsg ]; 
+            errormsg=['projection on ' UvData.ProjObject{iobj}.Type ': ' errormsg ];
             return
         end
@@ -3861,5 +3861,5 @@
             ObjectData.A=flag_mask.*double(ObjectData.A);
             ObjectData.A=feval(AClass,ObjectData.A);
-        end       
+        end
         set(handles.uvmat,'UserData',UvData)
         if ~isempty(ObjectData)
@@ -3875,5 +3875,5 @@
                         hhset_object=guidata(hset_object);%
                         set(hhset_object.ProjMode,'Value',2);
-                        set_object('ProjMode_Callback',hset_object,[],hhset_object); 
+                        set_object('ProjMode_Callback',hset_object,[],hhset_object);
                     end
                     return
@@ -3895,10 +3895,10 @@
         end
     end
-    
+
     %% update the mask
     if isequal(get(handles.CheckMask,'Value'),1)%if the mask option is on
         update_mask(handles);
     end
-    
+
     %% prepare the menus of histograms and plot them (Histogram of the whole volume in 3D case)
     menu_histo=(UvData.Field.ListVarName)';%list of field variables to be displayed for the menu of histogram display
@@ -3937,5 +3937,5 @@
         menu_histo=[{[Ustring ',' Vstring]};menu_histo];% add U, V at the beginning if they exist
     end
-    
+
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     % display menus and plot histograms
@@ -3954,5 +3954,5 @@
     set(handles.CheckEditObject,'Value',1)
     CheckEditObject_Callback(handles.uvmat, [], handles)
-end   
+end
 %ResizeFcn(handles.uvmat,[],handles)
 set(handles.uvmat,'Pointer',pointer)
@@ -4082,5 +4082,5 @@
 %------------------------------------------------------------------------
 function [indx,indy]=pos2ind(x0,rangx0,nxy)
-indx=1+round((nxy(2)-1)*(x0-rangx0(1))/(rangx0(2)-rangx0(1)));% index x of pixel  
+indx=1+round((nxy(2)-1)*(x0-rangx0(1))/(rangx0(2)-rangx0(1)));% index x of pixel
 indy=1+round((nxy(1)-1)*(y12-rangy0(1))/(rangy0(2)-rangy0(1)));% index y of pixel
 
@@ -4144,5 +4144,5 @@
 if ~test_civ2 && ~test_civ1
     msgbox_uvmat('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields')
-end 
+end
 if test_civ2
     nbname='nb_vec_2';
@@ -4159,8 +4159,8 @@
 hhh=which('netcdf.open');% look for built-in matlab netcdf library
 if ~isequal(hhh,'')% case of  builtin Matlab netcdf library
-    nc=netcdf.open(FileName,'NC_WRITE'); 
+    nc=netcdf.open(FileName,'NC_WRITE');
     netcdf.reDef(nc);
     netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'),'CivStage',CivStage);
-    dimid = netcdf.inqDimID(nc,nbname); 
+    dimid = netcdf.inqDimID(nc,nbname);
     try
         varid = netcdf.inqVarID(nc,flagname);% look for already existing fixflag variable
@@ -4170,5 +4170,5 @@
     netcdf.endDef(nc);
     netcdf.putVar(nc,varid,UvData.PlotAxes.FF);
-    netcdf.close(nc);  
+    netcdf.close(nc);
 else %old netcdf library
     netcdf_toolbox(FileName,AxeData,attrname,nbname,flagname)
@@ -4185,5 +4185,5 @@
 nb_vectors=size(theDim);
 var_FixFlag=ncvar(flagname,nc);% var_FixFlag will be written as the netcdf variable vec_FixFlag
-var_FixFlag(1:nb_vectors)=AxeData.FF;% 
+var_FixFlag(1:nb_vectors)=AxeData.FF;%
 fin=close(nc);
 
@@ -4193,5 +4193,5 @@
 function SubField_Callback(hObject, eventdata, handles)
 
-if get(handles.SubField,'Value')==0% if the subfield button is desactivated  
+if get(handles.SubField,'Value')==0% if the subfield button is desactivated
     desable_subfield(handles)
     transform_fct_list=get(handles.TransformName,'String');
@@ -4199,16 +4199,16 @@
     if strcmp(transform_fct,'sub_field')
         set(handles.TransformName,'Value',1)%suppress the sub_field transform
-        TransformName_Callback(hObject, eventdata, handles); 
+        TransformName_Callback(hObject, eventdata, handles);
     else
         REFRESH_Callback(hObject, eventdata, handles)
-    end  
+    end
 else
     fileinput_1=uigetfile_uvmat('select a second input file:',get(handles.RootPath,'String'));
     if isempty(fileinput_1)
         set(handles.SubField,'Value',0)
-    else       
+    else
         % refresh the current displayed field
         display_file_name(handles,fileinput_1,2)
-        
+
         %update list of recent files in the menubar
         MenuFile_1=fileinput_1;
@@ -4229,5 +4229,5 @@
 %-----------------------------------------------------------------------
 function desable_subfield(handles)
-    
+
 set(handles.RootPath_1,'String','')
 set(handles.RootFile_1,'String','')
@@ -4293,5 +4293,5 @@
 RootFile_1=get(handles.RootFile_1,'String');
 if isequal(get(handles.RootFile_1,'Visible'),'off') || isequal(RootFile_1,'"')
-    RootFile_1=get(handles.RootFile,'String'); 
+    RootFile_1=get(handles.RootFile,'String');
 end
 RootFile_1=regexprep(RootFile_1,'\<[\\/]|[\\/]\>','');%suppress possible / or \ separator at the beginning or the end of the string
@@ -4323,5 +4323,5 @@
 [tild,tild,tild,i1,i2,j1,j2,tild,NomType]=fileparts_uvmat(['xxx' get(handles.FileIndex,'String') FileExt]);
 
-switch field  
+switch field
     case 'get_field...'
         %% fill the axes and variables from selections in get_field
@@ -4353,9 +4353,9 @@
             end
         end
-        
+
         % VelType menu desactivated
         set(handles.FixVelType,'visible','off')
         set(handles.VelType,'Visible','off')
-        
+
         %read selection from get_field
         [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles);
@@ -4376,5 +4376,5 @@
                         ZName=GetFieldData.Coordinates.Coord_z;
                     end
-                end              
+                end
                 CName=GetFieldData.PanelVectors.vec_color;
                 FieldList={['vec(' UName ',' VName ')'];...
@@ -4430,5 +4430,5 @@
                     set(handles.TimeName,'String',['dim:' GetFieldData.Time.TimeName]);
                     set(handles.NomType,'String','*')
-                    set(handles.RootFile,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')])             
+                    set(handles.RootFile,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')])
                     set(handles.i1,'String','1')% set counter to 1 (now the time index in the input matrix)
                     MaxIndex_i=get(handles.MaxIndex_i,'String');
@@ -4455,5 +4455,5 @@
             REFRESH_Callback(hObject, eventdata, handles)
         end
-       
+
     case 'image'
         %% look for image corresponding to civ data
@@ -4540,9 +4540,9 @@
             end
         end
-        
+
         % VelType menu desactivated
         set(handles.FixVelType,'visible','off')
         set(handles.VelType,'Visible','off')
-        
+
         %read selection from get_field
         [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes_1(handles);
@@ -4621,5 +4621,5 @@
         if ~exist(imagename,'file')
             imagename=uigetfile_uvmat('Pick an image file',imagename,'image');
-            
+
         end
         if isempty(imagename)
@@ -4634,5 +4634,5 @@
             set(handles.FileIndex_1,'String',get(handles.FileIndex,'String'))
             set(handles.FileExt_1,'String',get(handles.FileExt,'String'))
-            
+
             UvData.FileType{2}=UvData.FileType{1};
             UvData.XmlData{2}= UvData.XmlData{1};
@@ -4643,5 +4643,5 @@
                 TransformName_Callback(hObject, eventdata, handles)% activate transform_fct_Callback and refresh current plot
                  check_refresh=0;
-             end             
+             end
         end
         if ~isequal(field,'image')
@@ -4651,5 +4651,5 @@
         end
         set(handles.uvmat,'UserData',UvData)
- 
+
         if check_refresh && ~(isfield(UvData,'NewSeries')&&isequal(UvData.NewSeries,1))
             REFRESH_Callback(hObject, eventdata, handles)
@@ -4658,5 +4658,5 @@
 
 %------------------------------------------------------------------------
-% --- set the visibility of relevant velocity type menus: 
+% --- set the visibility of relevant velocity type menus:
 function menu=set_veltype_display(Civ,FileType)
 %------------------------------------------------------------------------
@@ -4720,5 +4720,5 @@
 UvData=get(handles.uvmat,'UserData');
 set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0])%paint REFRESH button in yellow to indicate its activation
-drawnow   
+drawnow
 InputFile=read_GUI(handles.InputFile);% read the input file parameters
 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles);
@@ -4735,5 +4735,5 @@
      check_refresh=1;%will refresh the current plot
 else% we introduce the same file (with a different field) for the second series
-     FileName_1=FileName;% we compare two fields in the same file 
+     FileName_1=FileName;% we compare two fields in the same file
      UvData.FileType{2}=UvData.FileType{1};
      UvData.XmlData{2}= UvData.XmlData{1};
@@ -4746,5 +4746,5 @@
      else
          check_refresh=1;
-     end  
+     end
 end
 
@@ -4782,5 +4782,5 @@
 end
 if exist('handle1','var')%handles of selected button
-	set(handle1,'BackgroundColor',[1 1 0])  
+    set(handle1,'BackgroundColor',[1 1 0])
 end
 
@@ -4793,5 +4793,5 @@
     delete(handles.UVMAT_title)
 end
-UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 
+UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
 if isequal(get(handles.VOLUME,'Value'),1)
     set(handles.CheckZoom,'Value',0)
@@ -4822,5 +4822,5 @@
         data.RangeX=max(meshx,meshy);
         data.DX=max(meshx,meshy);
-    end 
+    end
     data.ParentButton=handles.VOLUME;
     PlotHandles=get_plot_handles(handles);%get the handles of the interface elements setting the plotting parameters
@@ -4837,5 +4837,5 @@
 function edit_vect_Callback(hObject, eventdata, handles)
 %-------------------------------------------------------
-% 
+%
 if isequal(get(handles.edit_vect,'Value'),1)
     VelTypeMenu=get(handles.VelType,'String');
@@ -4843,5 +4843,5 @@
     if ~strcmp(VelType,'civ2') && ~strcmp(VelType,'civ1')
         msgbox_uvmat('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields')
-    end 
+    end
     set(handles.record,'Visible','on')
     set(handles.edit_vect,'BackgroundColor',[1 1 0])
@@ -4877,6 +4877,6 @@
                 end
             end
-            if isfield(ObjectData,'Coord')& isfield(ObjectData,'Style') 
-                if isequal(ObjectData.Type,'polygon') 
+            if isfield(ObjectData,'Coord')& isfield(ObjectData,'Style')
+                if isequal(ObjectData.Type,'polygon')
                     X=ObjectData.Coord(:,1);
                     Y=ObjectData.Coord(:,2);
@@ -4884,5 +4884,5 @@
                         [X,Y]=px_XYZ(Calib,X,Y,0);% to generalise with 3D cases
                     end
-                    flagobj=~inpolygon(Xi,Yi,X',Y');%=0 inside the polygon, 1 outside                  
+                    flagobj=~inpolygon(Xi,Yi,X',Y');%=0 inside the polygon, 1 outside
                 elseif isequal(ObjectData.Type,'ellipse')
                     if testphys
@@ -4927,5 +4927,5 @@
 % imflag=uint8(255*flag);% =0 for flag=0 (vectors=0 when 20<imflag<200)
 msgbox_uvmat('CONFIRMATION',[mask_name ' saved'])
-imwrite(imflag,mask_name,'BitDepth',8); 
+imwrite(imflag,mask_name,'BitDepth',8);
 
 %display the mask
@@ -4979,5 +4979,5 @@
         set(handles.TransformName,'String',menu)
         set(handles.TransformName,'Value',ichoice)
-        
+
         % save the new menu in the personal file 'uvmat_perso.mat'
         dir_perso=prefdir;%personal Matalb directory
@@ -5359,5 +5359,5 @@
 % --- Execute on return carriage on the edit box corresponding to slider 1
 %----------------------------------------------------------------
-function num_ColCode1_Callback(hObject, eventdata, handles) 
+function num_ColCode1_Callback(hObject, eventdata, handles)
 set_vec_col_bar(handles)
 update_plot(handles);
@@ -5491,5 +5491,5 @@
             objectcolor='b';
         end
-        UvData.ProjObject{IndexObj}.DisplayHandle.uvmat=plot_object(UvData.ProjObject{IndexObj},ObjectData,hobject,objectcolor);%draw the object in uvmat      
+        UvData.ProjObject{IndexObj}.DisplayHandle.uvmat=plot_object(UvData.ProjObject{IndexObj},ObjectData,hobject,objectcolor);%draw the object in uvmat
 end
 set(handles.uvmat,'UserData',UvData)
@@ -5509,6 +5509,6 @@
 
 %  desactivate the edit object mode
-set(handles.CheckEditObject,'Value',0) 
-% set(handles.CheckEditObject,'BackgroundColor',[0.7,0.7,0.7]) 
+set(handles.CheckEditObject,'Value',0)
+% set(handles.CheckEditObject,'BackgroundColor',[0.7,0.7,0.7])
 
 %------------------------------------------------------------------------
@@ -5535,6 +5535,6 @@
 end
 
-%%  desactivate the edit object mode for security 
-set(handles.CheckEditObject,'Value',0) 
+%%  desactivate the edit object mode for security
+set(handles.CheckEditObject,'Value',0)
 
 %% update the  plot on view_field if view_field is already openened
@@ -5552,5 +5552,5 @@
     [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the uvmat interface
     haxes=findobj(hview_field,'tag','axes3');
-    pos=get(hview_field,'Position');  
+    pos=get(hview_field,'Position');
     if strcmp(get(haxes,'Visible'),'off')%sempty(PlotParam.Axes)% case of no plot display (pure text table)
         h_TableDisplay=findobj(hview_field,'tag','TableDisplay');
@@ -5626,6 +5626,6 @@
 %-------------------------------------------------------------------
 hset_object=findobj(allchild(0),'Tag','set_object');
-if get(handles.CheckEditObject,'Value') 
-    %suppress the other options 
+if get(handles.CheckEditObject,'Value')
+    %suppress the other options
     set(handles.MenuObject,'checked','off')
     set(handles.CheckZoom,'Value',0)
@@ -5640,5 +5640,5 @@
     CheckViewObject_Callback(hObject, eventdata, handles)
 else % desactivate object edit mode
-    if ~isempty(hset_object)% open the 
+    if ~isempty(hset_object)% open the
         set(get(hset_object,'children'),'Enable','off')
         hSAVE=findobj(hset_object,'Tag','SAVE');
@@ -5654,5 +5654,5 @@
 check_view=get(handles.CheckViewObject,'Value');
 
-if check_view %activate set_object    
+if check_view %activate set_object
     IndexObj=get(handles.ListObject,'Value');
     list_object=get(handles.ListObject,'String');
@@ -5676,5 +5676,5 @@
         data.Type='plane';
     end
-    
+
     %% initiate the new projection object
     hset_object=set_object(data,[],ZBounds);
@@ -5693,5 +5693,5 @@
     end
 end
-  
+
 
 %------------------------------------------------------------------------
@@ -5719,5 +5719,5 @@
     list_object=get(handles.ListObject,'String');
     UvData.ProjObject{IndexObj(end)}.Name=list_object{IndexObj(end)};
-    
+
     %% show the projection of the selected object on view_field
     [ProjData,errormsg]= proj_field(UvData.Field,UvData.ProjObject{IndexObj});%project the current field on ObjectData
@@ -5772,5 +5772,5 @@
 % INPUT:
 % hObject: object index (if integer) or handle of the graphic object. If
-%          hObject is a subobject, the parent object is detected and deleted. 
+%          hObject is a subobject, the parent object is detected and deleted.
 
 function delete_object(IndexObj)
@@ -5847,5 +5847,5 @@
         else
             set(handles.CheckFixAspectRatio,'Value',0)
- 
+
         end
     end
@@ -5874,5 +5874,5 @@
     if isfield(PlotParam.Scalar,'MinA')
         set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3));
-    end   
+    end
     if isfield(PlotParam.Scalar,'IncrA')
         set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3))
@@ -5880,5 +5880,5 @@
     set(handles.CheckBW,'Value',PlotParam.Scalar.CheckBW)
     if isfield(PlotParam.Scalar,'Opacity')&&isfield(handles,'num_Opacity')
-        set(handles.num_Opacity,'String',num2str(PlotParam.Scalar.Opacity)) 
+        set(handles.num_Opacity,'String',num2str(PlotParam.Scalar.Opacity))
     end
 else
