Index: /trunk/src/plot_object.m
===================================================================
--- /trunk/src/plot_object.m	(revision 936)
+++ /trunk/src/plot_object.m	(revision 937)
@@ -448,8 +448,8 @@
     switch ObjectData.Type
         case 'points'
-            hh=line(ObjectData.Coord(:,1),ObjectData.Coord(:,2),'Color',col,'LineStyle','.','Marker','+');
+            hh=line(ObjectData.Coord(:,1),ObjectData.Coord(:,2),'Color',col,'LineStyle','none','Marker','+');
             for ipt=1:length(xline)
                 PlotData.DeformPoint(ipt)=line(ObjectData.Coord(ipt,1),ObjectData.Coord(ipt,2),'Color',...
-                    col,'LineStyle','.','SelectionHighlight','off','UserData',hh,'Tag','DeformPoint');
+                    col,'LineStyle','none','SelectionHighlight','off','UserData',hh,'Tag','DeformPoint');
                 %create circle around each point
                 if ~isequal(YMax,0)
Index: /trunk/src/proj_field.m
===================================================================
--- /trunk/src/proj_field.m	(revision 936)
+++ /trunk/src/proj_field.m	(revision 937)
@@ -2239,5 +2239,5 @@
                     eval(['ProjData.' VarName '=reshape(vec_B,npY,npX,nbcolor);']);
                 end
-                ProjData.FF=reshape(~flagin,npY,npX);%false flag A FAIRE: tenir compte d'un flga antï¿œrieur  
+                ProjData.FF=reshape(~flagin,npY,npX);%false flag A FAIRE: tenir compte d'un flga ant???rieur  
                 ProjData.ListVarName=[ProjData.ListVarName 'FF'];
                 ProjData.VarDimName=[ProjData.VarDimName {DimCell}];
Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 936)
+++ /trunk/src/series.m	(revision 937)
@@ -467,8 +467,7 @@
 %% look for the previously opened file 'oldfile'
 InputTable=get(handles.InputTable,'Data');
-RootPathCell=InputTable(:,1);
-SubDirCell=InputTable(:,2);
+if ~isempty(InputTable)
 oldfile=fullfile(InputTable{1,1},InputTable{1,2});
-if isempty(oldfile)
+else
     % use a file name stored in prefdir
     dir_perso=prefdir;
@@ -476,6 +475,6 @@
     if exist(profil_perso,'file')
         h=load (profil_perso);
-        if isfield(h,'RootPath') && ischar(h.RootPath)
-            oldfile=h.RootPath;
+        if isfield(h,'MenuCampaign') && ~isempty(h.MenuCampaign)&& ischar(h.MenuCampaign{1})
+            oldfile=h.MenuCampaign{1};
         end
     end
@@ -519,81 +518,8 @@
 REFRESH_Callback(hObject, eventdata, handles)
 
-
-% %------------------------------------------------------------------------
-% % --- fct activated by the browser under 'Open campaign/Browse...'
-% %------------------------------------------------------------------------ 
-% function MenuBrowseCampaignAppend_Callback(hObject, eventdata, handles)
-% append='append';
-% browse_campaign(handles,append);
-
-% %------------------------------------------------------------------------
-% function browse_campaign(handles,append);
-% 
-% %% look for the previously opened file 'oldfile'
-% 
-% % 
-% % 
-% % InputTable=get(handles.InputTable,'Data');
-% % RootPath=InputTable{1,1};
-% % CampaignPath=fileparts(fileparts(RootPath));
-% % DirFull=uigetfile_uvmat('define this path as the Campaign folder:',CampaignPath,'uigetdir');
-% % if ~ischar(DirFull)|| ~exist(DirFull,'dir')
-% %     return
-% % end
-% OutPut=browse_data(oldfile);% open the GUI browse_data to get select a campaign dir, experiment and device
-% if ~isfield(OutPut,'Campaign')
-%     return
-% end
-% DirName=fullfile(OutPut.Campaign,OutPut.Experiment{1},OutPut.DataSeries{1});
-% ListStruct=dir(DirName); %list files and the dir DataSeries
-% % select the first appropriate file in the dir
-% FileName='';
-% for ilist=1:numel(ListStruct)
-%     if ~isequal(ListStruct(ilist).isdir,1)%look for files, not dir
-%         FileName=ListStruct(ilist).name;
-%         FileInfo=get_file_info(fullfile(DirName,FileName));
-%         switch FileInfo.FileType
-%             case {'image','multimage','civx','civdata','netcdf'}
-%                 break
-%         end
-%     end
-% end
-% if isempty(FileName)
-%     msgbox_uvmat('ERROR',['no appropriate input file in the DataSeries folder ' fullfile(DirName)])
-%     return
-% end
-% 
-% %% update the list of campaigns in the menubar
-% MenuCampaign=[{get(handles.MenuCampaign_1,'Label')};{get(handles.MenuCampaign_2,'Label')};...
-%     {get(handles.MenuCampaign_3,'Label')};{get(handles.MenuCampaign_4,'Label')};{get(handles.MenuCampaign_5,'Label')}];
-% check_dir=isempty(find(strcmp(DirName,MenuCampaign)));
-% if check_dir %insert the new campaign in the list if it is not found
-%     MenuCampaign(end)=[]; %suppress the last item
-%     MenuCampaign=[{DirName};MenuCampaign];%insert the new campaign
-%     for ilist=1:numel(MenuCampaign)
-%         set(handles.(['MenuCampaign_' num2str(ilist)]),'Label',MenuCampaign{ilist})
-%     end
-%     % save the list for future opening:
-%     dir_perso=prefdir;
-%     profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
-%     if exist(profil_perso,'file')
-%         save (profil_perso,'MenuCampaign','-append'); %store the file names for future opening of uvmat
-%     else
-%         save (profil_perso,'MenuCampaign','-V6'); %store the file names for future opening of uvmat
-%     end
-% end
-% 
-% %% display the selected field and related information
-% if get(handles.CheckAppend,'Value')
-%     display_file_name(handles,fullfile(DirName,FileName),'append')
-% else
-%     display_file_name(handles,fullfile(DirName,FileName),'one')
-% end
-% set(handles.MenuOpenCampaign,'ForegroundColor',[0 0 0])
-
 % --------------------------------------------------------------------
 function MenuCampaign_Callback(hObject, eventdata, handles)
 % -------------------------------------------------------------------- 
-set(handles.MenuOpenCampaign,'ForegroundColor',[1 1 0])
+
 OutPut=browse_data(get(hObject,'Label'),'on','on');% open the GUI browse_data to get select a campaign dir, experiment and device
 if ~isfield(OutPut,'Campaign')
@@ -636,24 +562,4 @@
 set(handles.InputTable,'Data',InputTable)
 REFRESH_Callback(hObject, eventdata, handles)
-
-
-% DirName=fullfile(OutPut.Campaign,OutPut.Experiment{1},OutPut.DataSeries{1});
-% hdir=dir(DirName); %list files and dirs
-% for ilist=1:numel(hdir)
-%     if ~isequal(hdir(ilist).isdir,1)%look for files, not dir
-%         FileName=hdir(ilist).name;
-%         FileInfo=get_file_info(fullfile(DirName,FileName));
-%         switch FileInfo.FileType
-%             case {'image','multimage','civx','civdata','netcdf'}
-%             break
-%         end
-%     end
-% end
-% if get(handles.CheckAppend,'Value')
-%     display_file_name(handles,fullfile(DirName,FileName),'append')
-% else
-%     display_file_name(handles,fullfile(DirName,FileName),'one')
-% end
-% set(handles.MenuOpenCampaign,'ForegroundColor',[0 0 0])
 
 
@@ -816,5 +722,5 @@
 
 %% enable other menus and uicontrols
-set(handles.MenuOpenCampaign,'Enable','on')
+% set(handles.MenuOpenCampaign,'Enable','on')
 set(handles.MenuCampaign_1,'Enable','on')
 set(handles.MenuCampaign_2,'Enable','on')
@@ -1006,5 +912,5 @@
 ref_i=1;
 if isfield(SeriesData,'ref_i')
-ref_i=SeriesData.ref_i;
+    ref_i=SeriesData.ref_i;
 end
 if isempty(first_i)
@@ -1019,5 +925,5 @@
 ref_j=1;
 if isfield(SeriesData,'ref_j')
-ref_j=SeriesData.ref_j;
+    ref_j=SeriesData.ref_j;
 end
 if isempty(first_j)
@@ -1046,14 +952,14 @@
     last_j=first_j;
 end
-set(handles.num_first_i,'String',num2str(first_i)); 
+set(handles.num_first_i,'String',num2str(first_i));
 set(handles.num_first_j,'String',num2str(first_j));
-set(handles.num_last_i,'String',num2str(last_i)); 
+set(handles.num_last_i,'String',num2str(last_i));
 set(handles.num_last_j,'String',num2str(last_j));
 
 %% number of slices set by default
-NbSlice=1;%default
+NbSlice=[];%default
 % read  value set by the first series for the append mode (iwiew >1)
 if iview>1 && strcmp(get(handles.num_NbSlice,'Visible'),'on')
-    NbSlice=str2num(get(handles.num_NbSlice,'String'));
+    NbSlice=str2double(get(handles.num_NbSlice,'String'));
 end
 
@@ -1061,5 +967,5 @@
 TimeUnit='';
 % read  value set by the first series for the append mode (iwiew >1)
-if iview>1 
+if iview>1
     TimeUnit=get(handles.TimeUnit,'String');
 end
@@ -1078,18 +984,18 @@
     [XmlData,errormsg]=imadoc2struct(XmlFileName);
     if ~isempty(errormsg)
-         msgbox_uvmat('WARNING',['error in reading ' XmlFileName ': ' errormsg]);
+        msgbox_uvmat('WARNING',['error in reading ' XmlFileName ': ' errormsg]);
     end
     % read time if available
     if isfield(XmlData,'Time')
-         Time=XmlData.Time;
+        Time=XmlData.Time;
         TimeName='xml';
     end
     if isfield(XmlData,'Camera')
-        if isfield(XmlData.Camera,'NbSlice')&& ~isempty(XmlData.Camera.NbSlice)
-            if iview>1 && ~isempty(NbSlice) && ~strcmp(NbSlice,XmlData.Camera.NbSlice)
-                msgbox_uvmat('WARNING','inconsistent number of slices with the first field series');
-            end
-            NbSlice=XmlData.Camera.NbSlice;% Nbre of slices from camera
-        end
+        %         if isfield(XmlData.Camera,'NbSlice')&& ~isempty(XmlData.Camera.NbSlice)
+        %             if iview>1 && ~isempty(NbSlice) && ~strcmp(NbSlice,XmlData.Camera.NbSlice)
+        %                 msgbox_uvmat('WARNING','inconsistent number of slices with the first field series');
+        %             end
+        %             NbSlice=XmlData.Camera.NbSlice;% Nbre of slices from camera
+        %         end
         if isfield(XmlData.Camera,'TimeUnit')&& ~isempty(XmlData.Camera.TimeUnit)
             if iview>1 && ~isempty(TimeUnit) && ~strcmp(TimeUnit,XmlData.Camera.TimeUnit)
@@ -1100,17 +1006,28 @@
     end
     % number of slices
+    if isfield(XmlData,'TranslationMotor')&& isfield(XmlData.TranslationMotor,'NbSlice')
+        NbSlice_motor=XmlData.TranslationMotor.NbSlice;
+        if ~isempty(NbSlice) && ~isequal(NbSlice_motor,NbSlice)
+                msgbox_uvmat('WARNING','inconsistent Z numbers of Z indices');
+        else
+            NbSlice=NbSlice_motor;
+        end
+    end
+   
     if isfield(XmlData,'GeometryCalib')
         check_calib=1;
         if isfield(XmlData.GeometryCalib,'SliceCoord')
             siz=size(XmlData.GeometryCalib.SliceCoord);
-            if siz(1)>1
-                if iview>1 && ~isempty(NbSlice) && ~strcmp(NbSlice,siz(1))
-                    msgbox_uvmat('WARNING','inconsistent number of Z indices with the first field series');
-                end
+            if ~isempty(NbSlice)&& ~isequal(size(1),NbSlice)
+                msgbox_uvmat('WARNING','inconsistent numbers of Z indices between motor and calibration');
+            else
                 NbSlice=siz(1);
             end
         end
     end
-    set(handles.num_NbSlice,'String',num2str(NbSlice))
+end
+if ~isempty(NbSlice)
+set(handles.num_NbSlice,'String',num2str(NbSlice))
+set(handles.num_NbSlice,'Visible','on')
 end
 
@@ -2013,4 +1930,5 @@
                     '#!/bin/bash \n'...
                     '. /etc/sysprofile \n'...
+                    'module load matlab/8.6 \n'...% CHOICE OF MATLAB VERSION
                     'matlab -nodisplay -nosplash -nojvm -logfile ''' filelog{iprocess} ''' <<END_MATLAB \n'...
                     'addpath(''' path_series '''); \n'...
Index: /trunk/src/series/merge_proj.m
===================================================================
--- /trunk/src/series/merge_proj.m	(revision 936)
+++ /trunk/src/series/merge_proj.m	(revision 937)
@@ -381,16 +381,17 @@
         end
         
-    else
-        MergeData.ListGlobalAttribute={'Conventions','Project','InputFile_1','InputFile_end','nb_coord','nb_dim'};
+    else   %output as netcdf files
+        MergeData.ListGlobalAttribute={'Conventions','Project','InputFile_1','InputFile_end','NbCoord','NbDim'};
         MergeData.Conventions='uvmat';
-        MergeData.nb_coord=2;
-        MergeData.nb_dim=2;
-        dt=[];
-        if isfield(Data{1},'dt')&& isnumeric(Data{1}.dt)
-            dt=Data{1}.dt;
+        MergeData.NbCoord=2;
+        MergeData.NbDim=2;
+        % time interval of PIV
+        Dt=[];
+        if isfield(Data{1},'Dt')&& isnumeric(Data{1}.Dt)
+            Dt=Data{1}.Dt;
         end
         for iview =2:numel(Data)
-            if ~(isfield(Data{iview},'dt')&& isequal(Data{iview}.dt,dt))
-                dt=[];%dt not the same for all fields
+            if ~(isfield(Data{iview},'Dt')&& isequal(Data{iview}.Dt,Dt))
+                Dt=[];%dt not the same for all fields
             end
         end
@@ -399,7 +400,46 @@
             MergeData.Time=timeread;
         end
-        if ~isempty(dt)
-            MergeData.ListGlobalAttribute=[MergeData.ListGlobalAttribute {'dt'}];
-            MergeData.dt=dt;
+        % position of projection plane 
+        if isfield(Data{1},'ProjObjectCoord')&& isfield(Data{1},'ProjObjectAngle')
+            'test'
+            ProjObjectCoord=Data{1}.ProjObjectCoord;
+            ProjObjectAngle=Data{1}.ProjObjectAngle;
+            for iview =2:numel(Data)
+                if ~(isfield(Data{iview},'ProjObjectCoord')&& isequal(Data{iview}.ProjObjectCoord,ProjObjectCoord))...
+                        ||~(isfield(Data{iview},'ProjObjectAngle')&& isequal(Data{iview}.ProjObjectAngle,ProjObjectAngle))
+                    ProjObjectCoord=[];%dt not the same for all fields
+                end
+            end
+            if ~isempty(ProjObjectCoord)
+                MergeData.ListGlobalAttribute=[MergeData.ListGlobalAttribute {'ProjObjectCoord'} {'ProjObjectAngle'}];
+                MergeData.ProjObjectCoord=ProjObjectCoord;
+                MergeData.ProjObjectAngle=ProjObjectAngle;
+            end
+        end
+        % coord unit
+        if isfield(Data{1},'CoordUnit')
+            CoordUnit=Data{1}.CoordUnit;
+            for iview =2:numel(Data)
+                if ~(isfield(Data{iview},'CoordUnit')&& isequal(Data{iview}.CoordUnit,CoordUnit))
+                    CoordUnit=[];%CoordUnit not the same for all fields
+                end
+            end
+            if ~isempty(CoordUnit)
+                MergeData.ListGlobalAttribute=[MergeData.ListGlobalAttribute {'CoordUnit'}];
+                MergeData.CoordUnit=CoordUnit;
+            end
+        end
+        % time unit
+        if isfield(Data{1},'TimeUnit')
+            TimeUnit=Data{1}.TimeUnit;
+            for iview =2:numel(Data)
+                if ~(isfield(Data{iview},'TimeUnit')&& isequal(Data{iview}.TimeUnit,TimeUnit))
+                    TimeUnit=[];%TimeUnit not the same for all fields
+                end
+            end
+            if ~isempty(TimeUnit)
+                MergeData.ListGlobalAttribute=[MergeData.ListGlobalAttribute {'TimeUnit'}];
+                MergeData.TimeUnit=TimeUnit;
+            end
         end
         error=struct2nc(OutputFile,MergeData);%save result file
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 936)
+++ /trunk/src/uvmat.m	(revision 937)
@@ -1213,8 +1213,15 @@
 
 %% read the content of the GUI set_slice
-SliceData=read_GUI(get(hObject,'parent'));
+hset_slice=get(hObject, 'parent');
+hZ=findobj(hset_slice,'Tag','num_Z_1');
+Z_plane=str2num(get(hZ,'String'));% set of Z positions explicitly entered as a Matlab vector
+SliceData=read_GUI(hset_slice);
 GeometryCalib.NbSlice=SliceData.NbSlice;
 GeometryCalib.CheckVolumeScan=SliceData.CheckVolumeScan;
-Z_plane=linspace(SliceData.Z(1),SliceData.Z(2),SliceData.NbSlice);
+if numel(Z_plane)<=2
+    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
+end
 GeometryCalib.SliceCoord=Z_plane'*[0 0 1];
 GeometryCalib.SliceAngle=zeros(GeometryCalib.NbSlice,3);
