Changeset 1078 for trunk/src/series.m
- Timestamp:
- Mar 30, 2020, 3:48:19 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r1072 r1078 1459 1459 return 1460 1460 end 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...';1461 if isfield(Param,'InputFields')&& isfield(Param.InputFields,'FieldName')&& isequal(Param.InputFields.FieldName,'add_field...') 1462 errormsg='input field name(s) not defined, select add_field...'; 1463 1463 return 1464 1464 end … … 2450 2450 set(handles.VelType_1,'Visible','on') 2451 2451 set(handles.VelType_title_1,'Visible','on') 2452 FieldList_1=[set_field_list('U','V');{'C'};{' get_field...'}]; % standard menu for civx data2452 FieldList_1=[set_field_list('U','V');{'C'};{'add_field...'}]; % standard menu for civx data 2453 2453 CheckList_1=1; 2454 2454 set(handles.FieldName_1,'Value',1); % velocity vector choice by default … … 2467 2467 if FieldNameRequest && isfield(SeriesData.FileInfo{iview_netcdf(1)},'ListVarName') 2468 2468 set(handles.FieldName,'Visible','on') 2469 set(handles.Field_text,'Visible','on') 2469 2470 ListVarName=SeriesData.FileInfo{iview_netcdf(1)}.ListVarName; 2470 2471 ind_var=get(handles.FieldName,'Value'); % indices of previously selected variables … … 2491 2492 else 2492 2493 set(handles.FieldName,'Visible','off') 2494 set(handles.Field_text,'Visible','off') 2493 2495 end 2494 2496 2495 2497 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 already2498 if isempty(find(strcmp('add_field...',FieldList))) 2499 FieldList=[FieldList;{'add_field...'}];%add 'add_field...' to the menu FieldName if it is not already 2498 2500 end 2499 2501 if FieldNameRequest_1 && numel(iview_netcdf)>=2 … … 2530 2532 end 2531 2533 if isempty(FieldList) 2534 set(handles.Field_text,'Visible','off') 2532 2535 set(handles.FieldName,'Visible','off') 2533 2536 else 2537 set(handles.Field_text,'Visible','on') 2534 2538 set(handles.FieldName,'Visible','on') 2535 2539 set(handles.FieldName,'String',FieldList) … … 2757 2761 set(handles.ActionInput,'BackgroundColor',[1 0 0]) 2758 2762 2763 2764 %------------------------------------------------------------------------ 2765 % --- Executes on button press in RefreshField. 2766 function RefreshField_Callback(hObject, eventdata, handles) 2767 %------------------------------------------------------------------------ 2768 set(handles.FieldName,'String',{'add_field...'}); 2769 set(handles.FieldName,'Value',1); 2770 FieldName_Callback(hObject, eventdata, handles) 2771 2772 2759 2773 %------------------------------------------------------------------------ 2760 2774 % --- Executes on selection change in FieldName. 2761 2775 function FieldName_Callback(hObject, eventdata, handles) 2762 2776 %------------------------------------------------------------------------ 2763 field_str=get(handles.FieldName,'String');2777 FieldListInit=get(handles.FieldName,'String'); 2764 2778 field_index=get(handles.FieldName,'Value'); 2765 field=field_str{field_index(1)}; 2766 if isequal(field,'get_field...') 2779 field=FieldListInit{field_index(1)}; 2780 if isequal(field,'add_field...') 2781 FieldListInit(field_index(1))=[]; 2767 2782 SeriesData=get(handles.series,'UserData'); 2768 2783 % input line for which the field choice is relevant … … 2776 2791 % check the existence of the first file in the series 2777 2792 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 used2793 if isfield(Param.IndexRange,'first_j') % if index j is used 2779 2794 first_j=Param.IndexRange.first_j; 2780 2795 last_j=Param.IndexRange.last_j; … … 2789 2804 answer=msgbox_uvmat('INPUT_TXT',['select the line of the input table:' num2str(iview)] ,num2str(iview(1))); 2790 2805 LineIndex=str2num(answer); 2791 % InputLine=str2num(get(handles.InputLine,'String'));2792 % if ismember(InputLine,iview)2793 % LineIndex=InputLine;2794 % end2795 2806 end 2796 2807 FirstFileName=fullfile_uvmat(InputTable{LineIndex,1},InputTable{LineIndex,2},InputTable{LineIndex,3},... … … 2826 2837 end 2827 2838 set(handles.FieldName,'Value',1) 2828 set(handles.FieldName,'String',[FieldList ; {'get_field...'}]);2839 set(handles.FieldName,'String',[FieldListInit; FieldList; {'add_field...'}]); 2829 2840 if ~strcmp(GetFieldData.FieldOption,'civdata...') 2830 2841 if ~isempty(regexp(FieldList{1},'^vec')) … … 2913 2924 field_index=get(handles.FieldName_1,'Value'); 2914 2925 field=field_str{field_index(1)}; 2915 if isequal(field,' get_field...')2926 if isequal(field,'add_field...') 2916 2927 hget_field=findobj(allchild(0),'name','get_field'); 2917 2928 if ~isempty(hget_field) … … 2973 2984 end 2974 2985 set(handles.FieldName_1,'Value',1) 2975 set(handles.FieldName_1,'String',[FieldList; {' get_field...'}]);2986 set(handles.FieldName_1,'String',[FieldList; {'add_field...'}]); 2976 2987 end 2977 2988 end … … 3378 3389 ListField=Param.InputFields.FieldName; 3379 3390 if ischar(ListField),ListField={ListField}; end 3380 set(handles.FieldName,'String',[ListField;{' get-field...'}])3391 set(handles.FieldName,'String',[ListField;{'add_field...'}]) 3381 3392 set(handles.FieldName,'Value',1:numel(ListField)) 3382 3393 set(handles.FieldName,'Visible','on') … … 3866 3877 3867 3878 3868 3869 3879 % --- Executes on button press in Replicate. 3870 3880 function Replicate_Callback(hObject, eventdata, handles) … … 3882 3892 end 3883 3893 3884 3885
Note: See TracChangeset
for help on using the changeset viewer.