Changeset 1078 for trunk/src/series.m


Ignore:
Timestamp:
Mar 30, 2020, 3:48:19 PM (4 years ago)
Author:
sommeria
Message:

various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r1072 r1078  
    14591459    return
    14601460end
    1461 if isfield(Param,'InputFields')&& isfield(Param.InputFields,'FieldName')&& isequal(Param.InputFields.FieldName,'get_field...')
    1462     errormsg='input field name(s) not defined, select get_field...';
     1461if isfield(Param,'InputFields')&& isfield(Param.InputFields,'FieldName')&& isequal(Param.InputFields.FieldName,'add_field...')
     1462    errormsg='input field name(s) not defined, select add_field...';
    14631463    return
    14641464end
     
    24502450        set(handles.VelType_1,'Visible','on')
    24512451        set(handles.VelType_title_1,'Visible','on')
    2452         FieldList_1=[set_field_list('U','V');{'C'};{'get_field...'}]; % standard menu for civx data
     2452        FieldList_1=[set_field_list('U','V');{'C'};{'add_field...'}]; % standard menu for civx data
    24532453        CheckList_1=1;
    24542454        set(handles.FieldName_1,'Value',1); % velocity vector choice by default
     
    24672467    if FieldNameRequest && isfield(SeriesData.FileInfo{iview_netcdf(1)},'ListVarName')
    24682468        set(handles.FieldName,'Visible','on')
     2469        set(handles.Field_text,'Visible','on')
    24692470        ListVarName=SeriesData.FileInfo{iview_netcdf(1)}.ListVarName;
    24702471        ind_var=get(handles.FieldName,'Value'); % indices of previously selected variables
     
    24912492    else
    24922493        set(handles.FieldName,'Visible','off')
     2494        set(handles.Field_text,'Visible','off')
    24932495    end
    24942496   
    24952497    set(handles_coord,'Visible','on')
    2496     if isempty(find(strcmp('get_field...',FieldList)))
    2497     FieldList=[FieldList;{'get_field...'}];%add 'get_field...' to the menu FieldName if it is not already
     2498    if isempty(find(strcmp('add_field...',FieldList)))
     2499    FieldList=[FieldList;{'add_field...'}];%add 'add_field...' to the menu FieldName if it is not already
    24982500    end
    24992501    if FieldNameRequest_1 && numel(iview_netcdf)>=2
     
    25302532    end
    25312533    if isempty(FieldList)
     2534        set(handles.Field_text,'Visible','off')
    25322535        set(handles.FieldName,'Visible','off')
    25332536    else
     2537        set(handles.Field_text,'Visible','on')
    25342538        set(handles.FieldName,'Visible','on')
    25352539        set(handles.FieldName,'String',FieldList)
     
    27572761set(handles.ActionInput,'BackgroundColor',[1 0 0])
    27582762
     2763
     2764%------------------------------------------------------------------------
     2765% --- Executes on button press in RefreshField.
     2766function RefreshField_Callback(hObject, eventdata, handles)
     2767%------------------------------------------------------------------------
     2768set(handles.FieldName,'String',{'add_field...'});
     2769set(handles.FieldName,'Value',1);
     2770FieldName_Callback(hObject, eventdata, handles)
     2771
     2772
    27592773%------------------------------------------------------------------------
    27602774% --- Executes on selection change in FieldName.
    27612775function FieldName_Callback(hObject, eventdata, handles)
    27622776%------------------------------------------------------------------------
    2763 field_str=get(handles.FieldName,'String');
     2777FieldListInit=get(handles.FieldName,'String');
    27642778field_index=get(handles.FieldName,'Value');
    2765 field=field_str{field_index(1)};
    2766 if isequal(field,'get_field...')
     2779field=FieldListInit{field_index(1)};
     2780if isequal(field,'add_field...')
     2781    FieldListInit(field_index(1))=[];
    27672782    SeriesData=get(handles.series,'UserData');
    27682783    % input line for which the field choice is relevant
     
    27762791    % check the existence of the first file in the series
    27772792    first_j=[];last_j=[];MinIndex_j=1;MaxIndex_j=1; % default setting for index j
    2778     if isfield(Param.IndexRange,'first_j'); % if index j is used     
     2793    if isfield(Param.IndexRange,'first_j') % if index j is used     
    27792794        first_j=Param.IndexRange.first_j;
    27802795        last_j=Param.IndexRange.last_j;
     
    27892804        answer=msgbox_uvmat('INPUT_TXT',['select the line of the input table:' num2str(iview)] ,num2str(iview(1)));
    27902805        LineIndex=str2num(answer);
    2791 %         InputLine=str2num(get(handles.InputLine,'String'));
    2792 %         if ismember(InputLine,iview)
    2793 %             LineIndex=InputLine;
    2794 %         end
    27952806    end
    27962807    FirstFileName=fullfile_uvmat(InputTable{LineIndex,1},InputTable{LineIndex,2},InputTable{LineIndex,3},...
     
    28262837        end
    28272838        set(handles.FieldName,'Value',1)
    2828         set(handles.FieldName,'String',[FieldList; {'get_field...'}]);
     2839        set(handles.FieldName,'String',[FieldListInit; FieldList; {'add_field...'}]);
    28292840        if ~strcmp(GetFieldData.FieldOption,'civdata...')
    28302841           if ~isempty(regexp(FieldList{1},'^vec'))
     
    29132924field_index=get(handles.FieldName_1,'Value');
    29142925field=field_str{field_index(1)};
    2915 if isequal(field,'get_field...')
     2926if isequal(field,'add_field...')
    29162927    hget_field=findobj(allchild(0),'name','get_field');
    29172928    if ~isempty(hget_field)
     
    29732984        end
    29742985        set(handles.FieldName_1,'Value',1)
    2975         set(handles.FieldName_1,'String',[FieldList; {'get_field...'}]);
     2986        set(handles.FieldName_1,'String',[FieldList; {'add_field...'}]);
    29762987    end
    29772988end   
     
    33783389    ListField=Param.InputFields.FieldName;
    33793390    if ischar(ListField),ListField={ListField}; end
    3380     set(handles.FieldName,'String',[ListField;{'get-field...'}])
     3391    set(handles.FieldName,'String',[ListField;{'add_field...'}])
    33813392     set(handles.FieldName,'Value',1:numel(ListField))
    33823393     set(handles.FieldName,'Visible','on')
     
    38663877
    38673878
    3868 
    38693879% --- Executes on button press in Replicate.
    38703880function Replicate_Callback(hObject, eventdata, handles)
     
    38823892end
    38833893
    3884 
    3885 
Note: See TracChangeset for help on using the changeset viewer.