Changeset 520


Ignore:
Timestamp:
Aug 18, 2012, 12:51:28 AM (9 years ago)
Author:
sommeria
Message:

new bugs corrected

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_field.m

    r517 r520  
    4545%             ParamOut.FieldName='velocity';%Civx data found, set .FieldName='velocity' by default
    4646%                         ParamOut.ColorVar='ima_cor';
     47                        if isfield(ParamIn,'ColorVar')
    4748                        InputField=[{ParamIn.FieldName} {ParamIn.ColorVar}];
     49                        else
     50                           InputField= {ParamIn.FieldName};
     51                        end
    4852                        [Field,ParamOut.VelType,errormsg]=read_civdata(FileName,InputField,ParamIn.VelType);
    4953                        if ~isempty(errormsg),errormsg=['read_civdata:' errormsg];return,end
     
    5155         case 'civx'
    5256            ParamOut.FieldName='velocity';%Civx data found, set .FieldName='velocity' by default
    53                         ParamOut.ColorVar='ima_cor';
    54                         InputField=[{ParamOut.FieldName} {ParamOut.ColorVar}];
     57                       % ParamOut.ColorVar='ima_cor';
     58                       if isfield(ParamIn,'ColorVar')
     59                        InputField=[{ParamIn.FieldName} {ParamIn.ColorVar}];
     60                        else
     61                           InputField= {ParamIn.FieldName};
     62                        end
    5563                        [Field,ParamOut.VelType]=read_civxdata(FileName,InputField,ParamIn.VelType);
    5664                        if ~isempty(errormsg),errormsg=['read_civxdata:' errormsg];return,end
  • trunk/src/sub_field.m

    r515 r520  
    178178SubData.VarDimName(find(ind_remove))=[];
    179179SubData.VarAttribute(find(ind_remove))=[];
     180
     181function OutputCell=regexprep_r(InputCell,dimname,dimname_new)
     182for icell=1:numel(InputCell)
     183    OutputCell{icell}=regexprep(InputCell{icell},['^' dimname '$'],dimname_new);
     184end
    180185       
    181186   
  • trunk/src/uvmat.m

    r517 r520  
    21222122        case {'civx','civdata','netcdf'};
    21232123            list_fields=get(handles.Fields_1,'String');% list menu fields
     2124            if ischar(list_fields),list_fields={list_fields};end
    21242125            FieldName_1= list_fields{get(handles.Fields_1,'Value')}; % selected field
    21252126            if ~strcmp(FieldName,'get_field...')
     
    48654866end
    48664867param.list_fields=get(handles.Fields,'String');% list menu fields
    4867 param.list_fields(1)=[]; %suppress  'image' option
    4868 param.index_fields=get(handles.Fields,'Value');% selected string index
    4869 if param.index_fields>1
    4870     param.index_fields=param.index_fields-1;
    4871 end
     4868FieldName=param.list_fields{get(handles.Fields,'Value')};
     4869ind_image=find(strcmp('image',param.list_fields));
     4870if ~isempty(ind_image) && numel(param.list_fields)>1
     4871param.list_fields(ind_image)=[]; %suppress  'image' option
     4872end
     4873param.index_fields=find(strcmp(FieldName,param.list_fields));% selected string index
     4874% if param.index_fields>1
     4875%     param.index_fields=param.index_fields-1;
     4876% end
    48724877param.list_fields_1=get(handles.Fields_1,'String');% list menu fields
    4873 param.list_fields_1(1)=[]; %suppress  'image' option
    4874 param.index_fields_1=get(handles.Fields_1,'Value')-1;% selected string index
    4875 if param.index_fields_1>1
    4876     param.index_fields_1=param.index_fields_1-1;
    4877 end
     4878if ischar(param.list_fields_1),param.list_fields_1={param.list_fields_1};end
     4879FieldName_1=param.list_fields_1{get(handles.Fields_1,'Value')};
     4880ind_image=find(strcmp('image',param.list_fields_1));
     4881if ~isempty(ind_image) && numel(param.list_fields_1)>1
     4882param.list_fields_1(ind_image)=[]; %suppress  'image' option
     4883end
     4884param.index_fields_1=find(strcmp(FieldName_1,param.list_fields_1));% selected string index
     4885%param.index_fields=find(strcmp(FieldName,param.list_fields));% selected string index
     4886% param.index_fields_1=get(handles.Fields_1,'Value')-1;% selected string index
     4887% if param.index_fields_1>1
     4888%     param.index_fields_1=param.index_fields_1-1;
     4889% end
    48784890param.menu_coord_str=get(handles.transform_fct,'String');
    48794891param.menu_coord_val=get(handles.transform_fct,'Value');
Note: See TracChangeset for help on using the changeset viewer.