Index: /trunk/src/read_field.m
===================================================================
--- /trunk/src/read_field.m	(revision 519)
+++ /trunk/src/read_field.m	(revision 520)
@@ -45,5 +45,9 @@
 %             ParamOut.FieldName='velocity';%Civx data found, set .FieldName='velocity' by default
 %                         ParamOut.ColorVar='ima_cor';
+                        if isfield(ParamIn,'ColorVar')
                         InputField=[{ParamIn.FieldName} {ParamIn.ColorVar}];
+                        else
+                           InputField= {ParamIn.FieldName};
+                        end
                         [Field,ParamOut.VelType,errormsg]=read_civdata(FileName,InputField,ParamIn.VelType);
                         if ~isempty(errormsg),errormsg=['read_civdata:' errormsg];return,end
@@ -51,6 +55,10 @@
          case 'civx'
             ParamOut.FieldName='velocity';%Civx data found, set .FieldName='velocity' by default
-                        ParamOut.ColorVar='ima_cor';
-                        InputField=[{ParamOut.FieldName} {ParamOut.ColorVar}];
+                       % ParamOut.ColorVar='ima_cor';
+                       if isfield(ParamIn,'ColorVar')
+                        InputField=[{ParamIn.FieldName} {ParamIn.ColorVar}];
+                        else
+                           InputField= {ParamIn.FieldName};
+                        end
                         [Field,ParamOut.VelType]=read_civxdata(FileName,InputField,ParamIn.VelType);
                         if ~isempty(errormsg),errormsg=['read_civxdata:' errormsg];return,end
Index: /trunk/src/sub_field.m
===================================================================
--- /trunk/src/sub_field.m	(revision 519)
+++ /trunk/src/sub_field.m	(revision 520)
@@ -178,4 +178,9 @@
 SubData.VarDimName(find(ind_remove))=[];
 SubData.VarAttribute(find(ind_remove))=[];
+
+function OutputCell=regexprep_r(InputCell,dimname,dimname_new)
+for icell=1:numel(InputCell)
+    OutputCell{icell}=regexprep(InputCell{icell},['^' dimname '$'],dimname_new);
+end
         
     
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 519)
+++ /trunk/src/uvmat.m	(revision 520)
@@ -2122,4 +2122,5 @@
         case {'civx','civdata','netcdf'};
             list_fields=get(handles.Fields_1,'String');% list menu fields
+            if ischar(list_fields),list_fields={list_fields};end
             FieldName_1= list_fields{get(handles.Fields_1,'Value')}; % selected field
             if ~strcmp(FieldName,'get_field...')
@@ -4865,15 +4866,26 @@
 end
 param.list_fields=get(handles.Fields,'String');% list menu fields
-param.list_fields(1)=[]; %suppress  'image' option 
-param.index_fields=get(handles.Fields,'Value');% selected string index
-if param.index_fields>1
-    param.index_fields=param.index_fields-1;
-end
+FieldName=param.list_fields{get(handles.Fields,'Value')};
+ind_image=find(strcmp('image',param.list_fields));
+if ~isempty(ind_image) && numel(param.list_fields)>1
+param.list_fields(ind_image)=[]; %suppress  'image' option 
+end
+param.index_fields=find(strcmp(FieldName,param.list_fields));% selected string index
+% if param.index_fields>1
+%     param.index_fields=param.index_fields-1;
+% end
 param.list_fields_1=get(handles.Fields_1,'String');% list menu fields
-param.list_fields_1(1)=[]; %suppress  'image' option
-param.index_fields_1=get(handles.Fields_1,'Value')-1;% selected string index
-if param.index_fields_1>1
-    param.index_fields_1=param.index_fields_1-1;
-end
+if ischar(param.list_fields_1),param.list_fields_1={param.list_fields_1};end
+FieldName_1=param.list_fields_1{get(handles.Fields_1,'Value')};
+ind_image=find(strcmp('image',param.list_fields_1));
+if ~isempty(ind_image) && numel(param.list_fields_1)>1
+param.list_fields_1(ind_image)=[]; %suppress  'image' option 
+end
+param.index_fields_1=find(strcmp(FieldName_1,param.list_fields_1));% selected string index
+%param.index_fields=find(strcmp(FieldName,param.list_fields));% selected string index
+% param.index_fields_1=get(handles.Fields_1,'Value')-1;% selected string index
+% if param.index_fields_1>1
+%     param.index_fields_1=param.index_fields_1-1;
+% end
 param.menu_coord_str=get(handles.transform_fct,'String');
 param.menu_coord_val=get(handles.transform_fct,'Value');
