Index: trunk/src/keyboard_callback.m
===================================================================
--- trunk/src/keyboard_callback.m	(revision 712)
+++ trunk/src/keyboard_callback.m	(revision 713)
@@ -52,7 +52,8 @@
             switch get(gco,'tag')% tag of the current edit box
                 case {'RootPath', 'SubDir','RootFile','FileExt','RootPath_1', 'SubDir_1','RootFile_1','FileExt_1'}
-                    set(handleshaxes.REFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (intyroduce the whole series)
+                    set(handleshaxes.InputFileREFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (intyroduce the whole series)
+                case 'num_IndexIncrement'% no action
                 otherwise
-                    set(handleshaxes.run0,'BackgroundColor',[1 0 1])%indicat that run0 must be activated
+                    set(handleshaxes.REFRESH,'BackgroundColor',[1 0 1])%indicat that run0 must be activated
             end
     end
Index: trunk/src/mouse_down.m
===================================================================
--- trunk/src/mouse_down.m	(revision 712)
+++ trunk/src/mouse_down.m	(revision 713)
@@ -140,5 +140,21 @@
                 msg_pos(1:2)=GUI_pos(1:2)+obj_pos(1:2).*GUI_pos(3:4);
                 display_str=get(hchild,'TooltipString');
-                msgbox_uvmat(['uicontrol: ' get(hchild,'Tag')],display_str,get(hchild,'String'),msg_pos);
+                output=msgbox_uvmat(['uicontrol: ' get(hchild,'Tag')],display_str,get(hchild,'String'),msg_pos);
+                %update the parent edit box and indicat that refresh is needed with the new input
+                if strcmp(get(hchild,'Style'),'edit')&&strcmp(get(hchild,'Enable'),'on')
+                    set(hchild,'String',output)
+                    if strcmp(get(get(hchild,'parent'),'tag'),'InputFile')
+                                hhREFRESH=hhCurrentGUI.InputFileREFRESH;
+                            else
+                                hhREFRESH=hhCurrentGUI.REFRESH;
+                            end
+                    switch get(hchild,'tag')% tag of the current edit box
+                        case {'RootPath', 'SubDir','RootFile','FileExt','RootPath_1', 'SubDir_1','RootFile_1','FileExt_1'}
+                            set(hhREFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (intyroduce the whole series)
+                        case 'num_IndexIncrement'% no action
+                        otherwise
+                            set(hhREFRESH,'BackgroundColor',[1 0 1])%indicat that run0 must be activated
+                    end
+                end
                 return %leave the function once a uicontrol has been selected
             end
@@ -164,5 +180,21 @@
                         msg_pos=GUI_pos(1:2)+panel_pos(1:2).*GUI_pos(3:4)+PosChildren(ind_object,1:2).*panel_pos(3:4).*GUI_pos(3:4);
                         display_str=get(hhchild,'TooltipString');
-                        msgbox_uvmat(['uicontrol: ' get(hhchild,'Tag')],display_str,get(hhchild,'String'),msg_pos);
+                        output=msgbox_uvmat(['uicontrol: ' get(hhchild,'Tag')],display_str,get(hhchild,'String'),msg_pos);
+                        %update the parent edit box and indicat that refresh is needed with the new input
+                        if strcmp(get(hhchild,'Style'),'edit')&&strcmp(get(hhchild,'Enable'),'on')
+                            set(hhchild,'String',output)
+                            if strcmp(get(get(hhchild,'parent'),'tag'),'InputFile')
+                                hhREFRESH=hhCurrentGUI.InputFileREFRESH;
+                            else
+                                hhREFRESH=hhCurrentGUI.REFRESH;
+                            end
+                            switch get(hhchild,'tag')% tag of the current edit box
+                                case {'RootPath', 'SubDir','RootFile','FileExt','RootPath_1', 'SubDir_1','RootFile_1','FileExt_1'}
+                                    set(hhREFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (intyroduce the whole series)
+                                case 'num_IndexIncrement'% no action
+                                otherwise
+                                    set(hhREFRESH,'BackgroundColor',[1 0 1])%indicat that run0 must be activated
+                            end
+                        end
                     else
                         set(hObject,'CurrentObject',hhchild)
Index: trunk/src/msgbox_uvmat.m
===================================================================
--- trunk/src/msgbox_uvmat.m	(revision 712)
+++ trunk/src/msgbox_uvmat.m	(revision 713)
@@ -62,5 +62,5 @@
 set(handles.Cancel,'Position',[300 2 60 30])
 set(handles.Cancel,'FontSize',15)
-
+%set(hObject,'WindowKeyPressFcn',{'@keyboard_callback',handles})%set keyboard action function
 
 % Update handles structure
@@ -206,15 +206,19 @@
     else
         if strcmp(get(handles.edit_box,'Style'),'listbox')
-             varargout{1}=get(handles.edit_box,'Value');
+            varargout{1}=get(handles.edit_box,'Value');
         else
-        varargout{1}=get(handles.edit_box,'String');
+            varargout{1}=get(handles.edit_box,'String');
         end
-        if isempty(varargout{1}) 
+        if isempty(varargout{1})
             varargout{1}='Yes';
         end
     end
+    if strcmp(get(handles.edit_box, 'Visible'), 'on')
+        varargout{2}=get(handles.edit_box,'String');
+    end
     % The figure can be deleted now
     delete(handles.figure1);
 end
+
 %  delete(handles.figure1);
 
@@ -276,6 +280,10 @@
 end    
 
-
-
-
-
+%'keyboard_callback:' function activated when a key is pressed on the keyboard
+%-----------------------------------
+function keyboard_callback(hObject,eventdata,handleshaxes)
+cur_axes=get(hObject,'CurrentAxes');%current plotting axes of the figure with handle hObject
+xx=double(get(hObject,'CurrentCharacter')) %get the keyboard character
+
+
+
Index: trunk/src/sub_field.m
===================================================================
--- trunk/src/sub_field.m	(revision 712)
+++ trunk/src/sub_field.m	(revision 713)
@@ -183,4 +183,5 @@
 
 function OutputCell=regexprep_r(InputCell,search_string,new_string)
+if ischar(InputCell); InputCell={InputCell}; end
 OutputCell=InputCell;%default
 for icell=1:numel(InputCell)
Index: trunk/src/uvmat.m
===================================================================
--- trunk/src/uvmat.m	(revision 712)
+++ trunk/src/uvmat.m	(revision 713)
@@ -46,5 +46,5 @@
 %          .HistoAxes: idem for histogram axes
 
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   DATA FLOW  (for run0_Callback) %%%%%%%%%%%%%%%%%%%%:
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   DATA FLOW  (for REFRESH_Callback) %%%%%%%%%%%%%%%%%%%%:
 %
 %
@@ -435,4 +435,5 @@
 set(handles.PlotAxes,'Units','pixels')
 set(handles.PlotAxes,'Position',pos)
+set(handles.PlotAxes,'Units','normalized')
 
 
@@ -594,5 +595,5 @@
 FileIndex=fullfile_uvmat('','','','',get(handles.NomType,'String'),i1,i2,j1,j2);
 set(handles.FileIndex,'String',FileIndex)
-% refresh the current settings and refresh the field view
+% inputfilerefresh the current settings and inputfilerefresh the field view
 RootPath_Callback(hObject,eventdata,handles)
 
@@ -607,12 +608,12 @@
 FileIndex=fullfile_uvmat('','','','',get(handles.NomType_1,'String'),i1,i2,j1,j2);
 set(handles.FileIndex_1,'String',FileIndex)
-% refresh the current settings and refresh the field view
+% inputfilerefresh the current settings and inputfilerefresh the field view
 RootPath_1_Callback(hObject,eventdata,handles)
 
 %------------------------------------------------------------------------
-% --- Executes on button press in REFRESH.
-function REFRESH_Callback(hObject, eventdata, handles)
+% --- Executes on button press in InputFileREFRESH.
+function InputFileREFRESH_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------   
-set(handles.REFRESH,'BackgroundColor',[1 1 0])% set button color to yellow to indicate that refresh is under action
+set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0])% set button color to yellow to indicate that refresh is under action
 % read the current input file name:
 [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles);
@@ -623,7 +624,7 @@
 % detect the file type, get the movie object if relevant, and look for the corresponding file series:
 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,FileInfo,MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]);
-% initiate the input file series and refresh the current field view: 
+% initiate the input file series and inputfilerefresh the current field view: 
 errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,1);
-% refresh the second series if selected
+% inputfilerefresh the second series if selected
 if get(handles.SubField,'Value')
     [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes_1(handles);
@@ -634,12 +635,12 @@
     % detect the file type, get the movie object if relevant, and look for the corresponding file series:
     [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]);
-    % initiate the input file series and refresh the current field view:
+    % initiate the input file series and inputfilerefresh the current field view:
     errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,2);
 end
 
 if isempty(errormsg)
-set(handles.REFRESH,'BackgroundColor',[1 0 0])% set button color to red to indicate that refresh has been updated
-else
-    set(handles.REFRESH,'BackgroundColor',[1 0 1])% keep button color magenta, input not succesfull
+set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0])% set button color to red to indicate that refresh has been updated
+else
+    set(handles.InputFileREFRESH,'BackgroundColor',[1 0 1])% keep button color magenta, input not succesfull
 end
 
@@ -681,5 +682,5 @@
     set(handles.TimeValue_1,'Visible','on')
 end
-set(handles.REFRESH,'BackgroundColor',[1 1 0])% paint REFRESH button to yellow to visualise root file input
+set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0])% paint REFRESH button to yellow to visualise root file input
 set(handles.uvmat,'Pointer','watch') % set the mouse pointer to 'watch'
 drawnow
@@ -801,5 +802,5 @@
         set(handles.MenuTools,'Enable','on')
 
-        % initiate input file series and refresh 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,FileType,MovieObject,index);
 
@@ -825,5 +826,5 @@
 end
 
-set(handles.REFRESH,'BackgroundColor',[1 0 0])% paint back button to red to indicate update is finished
+set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0])% paint back button to red to indicate update is finished
 set(handles.uvmat,'Pointer','arrow')% set back the mouse pointer to arrow
 
@@ -831,5 +832,5 @@
 %------------------------------------------------------------------------
 % --- Update information about a new field series (indices to scan, timing,
-%     calibration from an xml file, then refresh current plots
+%     calibration from an xml file, then inputfilerefresh current plots
 function errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,VideoObject,index)
 %------------------------------------------------------------------------
@@ -847,5 +848,5 @@
 set(handles.FieldName,'UserData',[])% reinialize data from uvmat opening
 UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface
-UvData.NewSeries=1; %flag for run0: begin a new series
+UvData.NewSeries=1; %flag for REFRESH: begin a new series
 UvData.FileName_1='';% name of the current second field (used to detect a  constant field during file scanning)
 UvData.FileType{index}=FileType;
@@ -916,5 +917,5 @@
 NbSlice=1;%default
 ImaDoc_str='';
-set(handles.REFRESH,'BackgroundColor',[1 1 0])
+set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0])
 if ~isempty(XmlFileName)
     set(handles.view_xml,'Visible','on')
@@ -1088,5 +1089,9 @@
         set(handles_Fields,'Value',1)
         set(handles_Fields,'String',{'get_field...'})
-        FieldName_Callback([],[], handles)
+        if index==1
+            FieldName_Callback([],[], handles)
+        else
+            FieldName_1_Callback([],[], handles)
+        end
     otherwise
         set(handles_Fields,'Value',1) % set menu to 'image'
@@ -1098,5 +1103,5 @@
 set(handles.uvmat,'UserData',UvData)
 
-%% set index navigation options and refresh plots
+%% set index navigation options and inputfilerefresh plots
 scan_option='i';%default
 state_j='off'; %default
@@ -1457,10 +1462,10 @@
 %------------------------------------------------------------------------
 %------------------------------------------------------------------------
-% III - MAIN REFRESH FUNCTIONS : 'FRAME PLOT'
+% III - MAIN InputFileREFRESH FUNCTIONS : 'FRAME PLOT'
 %------------------------------------------------------------------------
 
 %------------------------------------------------------------------------
 % --- Executes on button press in runplus: make one step forward and call
-% --- run0. 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)
@@ -1481,5 +1486,5 @@
 %------------------------------------------------------------------------
 % --- Executes on button press in runmin: make one step backward and call
-% --- run0. 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)
@@ -1782,5 +1787,5 @@
 filename=fullfile_uvmat(InputFile.RootPath,InputFile.SubDir,InputFile.RootFile,FileExt,NomType,i1,i2,j1,j2);
 
-%% refresh plots
+%% inputfilerefresh plots
 if sub_value
     filename_1=fullfile_uvmat(InputFile.RootPath_1,InputFile.SubDir_1,InputFile.RootFile_1,InputFile.FileExt_1,InputFile.NomType_1,i1_1,i2_1,j1_1,j2_1);
@@ -1789,5 +1794,5 @@
     errormsg=refresh_field(handles,filename,filename_1,i1,i2,j1,j2);
 end
-set(handles.run0,'BackgroundColor',[1 0 0])
+set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0])
 
 %% update the index counters if the index move is successfull
@@ -1840,5 +1845,5 @@
 else
     set(handles.movie_pair,'BusyAction','queue')
-    set(handles.run0,'BackgroundColor',[1 0 0])
+    set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0])
 end
 
@@ -1982,8 +1987,8 @@
 
 %------------------------------------------------------------------------
-% --- Executes on button press in run0.
-function run0_Callback(hObject, eventdata, handles)
-%------------------------------------------------------------------------
-set(handles.run0,'BackgroundColor',[1 1 0])%paint the command button in yellow
+% --- Executes on button press in InputFileREFRESH.
+function REFRESH_Callback(hObject, eventdata, handles)
+%------------------------------------------------------------------------
+set(handles.REFRESH,'BackgroundColor',[1 1 0])%paint the command button in yellow
 drawnow
 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles);
@@ -2018,9 +2023,9 @@
     set(handles.FileIndex,'BackgroundColor',[1 1 1])
     set(handles.FileIndex_1,'BackgroundColor',[1 1 1])  
-    set(handles.run0,'BackgroundColor',[1 0 0])
+    set(handles.REFRESH,'BackgroundColor',[1 0 0])
 end    
 
 %------------------------------------------------------------------------
-% --- read the input files and refresh all the plots, including projection.
+% --- read the input files and inputfilerefresh all the plots, including projection.
 % OUTPUT: 
 %  errormsg: error message char string  =[] by default
@@ -2063,5 +2068,5 @@
     set(handles.z_index,'String',num2str(z_index))
 end
-% refresh menu for save_mask if relevant
+% inputfilerefresh menu for save_mask if relevant
 masknumber=get(handles.masklevel,'String');
 if length(masknumber)>=z_index
@@ -2217,5 +2222,6 @@
         ParamIn_1.FieldName=FieldName_1;
         ParamIn_1.VelType=VelType_1;
-        %ParamIn_1.GUIName='get_field_1';
+        ParamIn_1.Coord_x=get(handles.Coord_x,'String');
+        ParamIn_1.Coord_y=get(handles.Coord_y,'Data');
         end  
         [Field{2},ParamOut_1,errormsg] = read_field(FileName_1,UvData.FileType{2},ParamIn_1,frame_index_1);
@@ -2273,7 +2279,6 @@
     %     end
 elseif ~test_keepdata_1
-    if (~strcmp(UvData.FileType{2},'netcdf')&&~strcmp(UvData.FileType{2},'civdata')&&~strcmp(UvData.FileType{2},'civx'))|| isequal(FieldName_1,'get_field...')
-        set(handles.VelType_1,'Visible','off')
-    else
+    if (strcmp(UvData.FileType{2},'civx')||strcmp(UvData.FileType{2},'civdata'))&& ~strcmp(FieldName_1,'get_field...')
+%     if (~strcmp(UvData.FileType{2},'netcdf')&&~strcmp(UvData.FileType{2},'civdata')&&~strcmp(UvData.FileType{2},'civx'))|| isequal(FieldName_1,'get_field...')
         test_veltype_1=1;
         set(handles.VelType_1,'Visible','on')
@@ -2282,4 +2287,6 @@
         set(handles.VelType_1,'Value',1+find(index_menu,1))
         set(handles.VelType_1,'String',[{''};menu])
+    else
+         set(handles.VelType_1,'Visible','off')
     end
     % update the second field menu: the same quantity
@@ -2436,5 +2443,5 @@
 UvData.ParamOut_1=ParamOut_1;
 if numel(Field)==2
-UvData.Field_1=Field{2}; %store the second field for possible use at next RUN
+    UvData.Field_1=Field{2}; %store the second field for possible use at next RUN
 end
 
@@ -2946,5 +2953,5 @@
         TransformName_Callback(hObject, eventdata, handles); 
     else
-        run0_Callback(hObject, eventdata, handles)
+        REFRESH_Callback(hObject, eventdata, handles)
     end  
 else
@@ -3164,5 +3171,5 @@
             UvData.FileType{1}='netcdf';
             set(handles.uvmat,'UserData',UvData)
-            run0_Callback(hObject, eventdata, handles)
+            REFRESH_Callback(hObject, eventdata, handles)
         end
        
@@ -3186,5 +3193,5 @@
         display_file_name(handles,imagename)%display the image
     otherwise
-        run0_Callback(hObject, eventdata, handles)
+        REFRESH_Callback(hObject, eventdata, handles)
 end
 
@@ -3223,19 +3230,116 @@
 switch field_1
     case 'get_field...'
-        set_veltype_display(0) % no veltype display
-        hget_field=findobj(allchild(0),'name','get_field_1');
-        if ~isempty(hget_field)
-            delete(hget_field)
-        end
-        hget_field=get_field(FileName_1);
-        set(hget_field,'name','get_field_1')
-        hhget_field=guidata(hget_field);
-        set(hhget_field.list_fig,'Value',1)
-        set(hhget_field.list_fig,'String',{'uvmat'})
-        if check_new
-            UvData.FileType{2}=UvData.FileType{1};
-            set(handles.FileIndex_1,'String',get(handles.FileIndex,'String'))
-              set(handles.uvmat,'UserData',UvData)
-        end
+         %% fill the coordinates and variables from selections in get_field
+        ParamIn=[];
+        % in case of civ data, we use the civ choice as default input for the GUI get_field
+        if strcmp(get(handles.VelType_1,'Visible'),'on')
+            ParamIn.SwitchVarIndexTime='attribute';
+            ListVelType=get(handles.VelType_1,'String');
+            VelType=ListVelType{get(handles.VelType_1,'Value')};
+            switch VelType
+                case 'civ1'
+                    ParamIn.TimeAttrName='Civ1_Time';
+                    ParamIn.vector_x='Civ1_U';
+                    ParamIn.vector_y='Civ1_V';
+                    ParamIn.vec_color='Civ1_C';
+                case 'filter1'
+                    ParamIn.TimeAttrName='Civ1_Time';
+                    ParamIn.vector_x='Civ1_U_smooth';
+                    ParamIn.vector_y='Civ1_V_smooth';
+                case 'civ2'
+                    ParamIn.TimeAttrName='Civ2_Time';
+                    ParamIn.vector_x='Civ2_U';
+                    ParamIn.vector_y='Civ2_V';
+                case 'filter2'
+                    ParamIn.TimeAttrName='Civ2_Time';
+                    ParamIn.vector_x='Civ2_U_smooth';
+                    ParamIn.vector_y='Civ2_V_smooth';
+                    ParamIn.vec_color='Civ2_C';
+            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);
+        FileName=[fullfile(RootPath,SubDir,RootFile) FileIndices FileExt];
+        GetFieldData=get_field(FileName,ParamIn);% inport field names from the GUI get_field
+        FieldList={};
+        VecColorList={};
+        switch GetFieldData.FieldOption
+            case 'vectors'
+                UName=GetFieldData.PanelVectors.vector_x;
+                VName=GetFieldData.PanelVectors.vector_y;
+                YName={GetFieldData.Coordinates.Coord_y};
+                CName=GetFieldData.PanelVectors.vec_color;
+                FieldList={['vec(' UName ',' VName ')'];...
+                    ['norm(' UName ',' VName ')'];...
+                    UName;VName};
+                VecColorList={['norm(' UName ',' VName ')'];...
+                    UName;VName};
+                if ~isempty(CName)
+                    VecColorList=[{CName};VecColorList];
+                end
+            case 'scalar'
+                AName=GetFieldData.PanelScalar.scalar;
+                YName={GetFieldData.Coordinates.Coord_y};
+                FieldList={AName};
+            case '1D plot'
+                YName=GetFieldData.PanelOrdinate.ordinate;
+            case 'civdata...'%reinitiate input, return to automatic civ data reading
+                display_file_name(handles,FileName,1)
+        end
+        if ~strcmp(GetFieldData.FieldOption,'civdata...')
+            XName=GetFieldData.Coordinates.Coord_x;
+            TimeNameStr=GetFieldData.Time.SwitchVarIndexTime;
+            switch TimeNameStr
+                case 'file index'
+                    set(handles.TimeName_1,'String','');
+                case 'attribute'
+                    set(handles.TimeName_1,'String',['att:' GetFieldData.Time.TimeName]);
+                case 'variable'
+                    set(handles.TimeName_1,'String',['var:' GetFieldData.Time.TimeName])
+                    set(handles.NomType_1,'String','*')
+                    set(handles.RootFile_1,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')])
+                    set(handles.FileIndex_1,'String','')
+                    ParamIn.TimeVarName=GetFieldData.Time.TimeName;
+                case 'matrix_index'
+                    set(handles.TimeName_1,'String',['dim:' GetFieldData.Time.TimeName]);
+                    set(handles.NomType_1,'String','*')
+                    set(handles.RootFile_1,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')])
+                    set(handles.FileIndex_1,'String','')
+                    ParamIn.TimeDimName_1=GetFieldData.Time.TimeName;
+            end
+            set(handles.Coord_x,'String',XName)
+            if ischar(YName)
+                YName={YName};
+            end
+            set(handles.Coord_y,'Data',YName)
+            set(handles.FieldName_1,'Value',1)
+            set(handles.FieldName_1,'String',[FieldList; {'get_field...'}]);
+            set(handles.ColorScalar,'Value',1)
+            set(handles.ColorScalar,'String',VecColorList);
+            UvData.FileType{2}='netcdf';
+            set(handles.uvmat,'UserData',UvData)
+            REFRESH_Callback(hObject, eventdata, handles)
+        end
+          
+%         set_veltype_display(0) % no veltype display
+%         hget_field=findobj(allchild(0),'name','get_field_1');
+%         if ~isempty(hget_field)
+%             delete(hget_field)
+%         end
+%         hget_field=get_field(FileName_1);
+%         set(hget_field,'name','get_field_1')
+%         hhget_field=guidata(hget_field);
+%         set(hhget_field.list_fig,'Value',1)
+%         set(hhget_field.list_fig,'String',{'uvmat'})
+%         if check_new
+%             UvData.FileType{2}=UvData.FileType{1};
+%             set(handles.FileIndex_1,'String',get(handles.FileIndex,'String'))
+%               set(handles.uvmat,'UserData',UvData)
+%         end
     case 'image'
         %% look for image corresponding to civ data
@@ -3283,5 +3387,5 @@
  
         if check_refresh && ~(isfield(UvData,'NewSeries')&&isequal(UvData.NewSeries,1))
-            run0_Callback(hObject, eventdata, handles)
+            REFRESH_Callback(hObject, eventdata, handles)
         end
 end
@@ -3328,7 +3432,7 @@
 function FixVelType_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
-% refresh the current plot if the fixed  veltype is unselected
+% inputfilerefresh the current plot if the fixed  veltype is unselected
 if ~get(handles.FixVelType,'Value')
-    run0_Callback(hObject, eventdata, handles)
+    REFRESH_Callback(hObject, eventdata, handles)
 end
 
@@ -3338,5 +3442,5 @@
 %------------------------------------------------------------------------
 set(handles.FixVelType,'Value',1)
-run0_Callback(hObject, eventdata, handles)
+REFRESH_Callback(hObject, eventdata, handles)
 
 %------------------------------------------------------------------------
@@ -3346,5 +3450,5 @@
 set(handles.FixVelType,'Value',1)% the velocity type is now imposed by the GUI (not automatic)
 UvData=get(handles.uvmat,'UserData');
-set(handles.run0,'BackgroundColor',[1 1 0])%paint run0 button in yellow to indicate its activation
+set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0])%paint REFRESH button in yellow to indicate its activation
 drawnow   
 InputFile=read_GUI(handles.InputFile);% read the input file parameters
@@ -3376,5 +3480,5 @@
 end
 
-% refresh the current plot if it has not been done previously
+% inputfilerefresh the current plot if it has not been done previously
 if check_refresh
     UvData.FileName_1='';% desactivate the use of a constant second file
@@ -3396,5 +3500,5 @@
         set(handles.FileIndex_1,'BackgroundColor',[1 1 1])
     end
-    set(handles.run0,'BackgroundColor',[1 0 0])
+    set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0])
 end
 
@@ -3715,10 +3819,10 @@
 set(handles.uvmat,'UserData',UvData)
 
-%% refresh the current plot
+%% inputfilerefresh the current plot
 if isempty(list_path{ichoice}) || nargin(transform_handle)<3
     set(handles.SubField,'Value',0)
     SubField_Callback(hObject, eventdata, handles)
 else
-    run0_Callback(hObject, eventdata, handles)
+    REFRESH_Callback(hObject, eventdata, handles)
 end
 
@@ -3945,5 +4049,5 @@
 update_color_code_boxes(handles);
 %replot the current graph
-run0_Callback(hObject, eventdata, handles)
+REFRESH_Callback(hObject, eventdata, handles)
 
 %----------------------------------------------------------------
@@ -4066,5 +4170,5 @@
 function update_plot(handles)
 %-------------------------------------------------------------------
-set(handles.run0,'BackgroundColor',[1 1 0]);% display plot activity by yellow color
+set(handles.REFRESH,'BackgroundColor',[1 1 0]);% display plot activity by yellow color
 drawnow
 UvData=get(handles.uvmat,'UserData');
@@ -4077,5 +4181,5 @@
     return
 end
-set(handles.run0,'BackgroundColor',[1 0 0]);
+set(handles.REFRESH,'BackgroundColor',[1 0 0]);
 
 %------------------------------------------------------------------------
@@ -4456,10 +4560,12 @@
 function MenuExportFigure_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
-% huvmat=get(handles.MenuExport,'parent');
 hfig=figure;
 copyobj(handles.PlotAxes,hfig);
+h=findobj(handles.PlotAxes,'tag','ima'); %look for image in the plot
+if ~isempty(h)
 map=colormap(handles.PlotAxes);
 colormap(map);%transmit the current colormap to the zoom fig
 colorbar
+end
 
 % --------------------------------------------------------------------
@@ -4523,5 +4629,5 @@
 % --------------------------------------------------------------------
 set(handles.MenuExportMovie,'BusyAction','queue')% activate the button
-huvmat=get(handles.run0,'parent');
+huvmat=get(handles.InputFileREFRESH,'parent');
 UvData=get(huvmat,'UserData');
 %[xx,xx,FileBase]=read_file_boxes(handles);
