Changeset 954 for trunk/src/series.m
- Timestamp:
- Jun 22, 2016, 1:36:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r951 r954 2292 2292 CheckList_1=1;% indicate whether FieldName_1 has been updated 2293 2293 handles_coord=[handles.Coord_x handles.Coord_y handles.Coord_z handles.Coord_x_title handles.Coord_y_title handles.Coord_z_title]; 2294 if VelTypeRequest && numel(iview_civ)>=1 2294 if VelTypeRequest && numel(iview_civ)>=1 2295 2295 menu=set_veltype_display(SeriesData.FileInfo{iview_civ(1)}.CivStage,SeriesData.FileType{iview_civ(1)}); 2296 2296 set(handles.VelType,'Value',1)% set first choice by default … … 2301 2301 %CheckList=1; 2302 2302 set(handles.FieldName,'Value',1); %velocity vector choice by default 2303 if VelTypeRequest_1 && numel(iview_civ)>=2 2303 if VelTypeRequest_1 && numel(iview_civ)>=2 2304 2304 menu=set_veltype_display(SeriesData.FileInfo{iview_civ(2)}.CivStage,SeriesData.FileType{iview_civ(2)}); 2305 2305 set(handles.VelType_1,'Value',1)% set first choice by default … … 2317 2317 set(handles.VelType,'Visible','off') 2318 2318 set(handles.VelType_title,'Visible','off') 2319 end 2319 end 2320 2320 2321 2321 %% Detect the types of input files and set menus and default options in 'FieldName' 2322 2322 if (FieldNameRequest || VelTypeRequest) && numel(iview_netcdf)>=1 2323 set(handles.InputFields,'Visible','on') 2323 set(handles.InputFields,'Visible','on')% set the frame InputFields visible 2324 2324 if FieldNameRequest && isfield(SeriesData.FileInfo{iview_netcdf(1)},'ListVarName') 2325 2325 set(handles.FieldName,'Visible','on') … … 2346 2346 end 2347 2347 end 2348 set(handles_coord,'Visible','on') 2349 FieldList=[FieldList;{'get_field...'}]; 2350 if FieldNameRequest_1 && numel(iview_netcdf)>=2 2348 end 2349 2350 set(handles_coord,'Visible','on') 2351 FieldList=[FieldList;{'get_field...'}]; 2352 if FieldNameRequest_1 && numel(iview_netcdf)>=2 2353 set(handles.FieldName_1,'Visible','on') 2354 if CheckList_1==0 % not civ input made 2355 ListVarName=SeriesData.FileInfo{iview_netcdf(2)}.ListVarName; 2356 ind_var=get(handles.FieldName,'Value');%indices of previously selected variables 2357 for ilist=1:numel(ind_var) 2358 if isempty(find(strcmp(FieldList{ind_var(ilist)},ListVarName))) 2359 FieldList_1={};% previous choice not consistent with new input field 2360 set(handles.FieldName_1,'Value',1) 2361 break 2362 end 2363 end 2364 warn_coord=0; 2365 if isempty(find(strcmp(get(handles.Coord_x,'String'),ListVarName)))||... 2366 isempty(find(strcmp(get(handles.Coord_y,'String'),ListVarName))) 2367 warn_coord=1; 2368 end 2369 if ~isempty(Coord_z) && isempty(find(strcmp(Coord_z,ListVarName))) 2370 FieldList_1={}; 2371 warn_coord=1; 2372 end 2373 if warn_coord 2374 msgbox_uvmat('WARNING','coordiante names do not exist in the second netcdf input file') 2375 end 2376 2351 2377 set(handles.FieldName_1,'Visible','on') 2352 if CheckList_1==0 % not civ input made 2353 ListVarName=SeriesData.FileInfo{iview_netcdf(2)}.ListVarName; 2354 ind_var=get(handles.FieldName,'Value');%indices of previously selected variables 2355 for ilist=1:numel(ind_var) 2356 if isempty(find(strcmp(FieldList{ind_var(ilist)},ListVarName))) 2357 FieldList_1={};% previous choice not consistent with new input field 2358 set(handles.FieldName_1,'Value',1) 2359 break 2360 end 2361 end 2362 warn_coord=0; 2363 if isempty(find(strcmp(get(handles.Coord_x,'String'),ListVarName)))||... 2364 isempty(find(strcmp(get(handles.Coord_y,'String'),ListVarName))) 2365 warn_coord=1; 2366 end 2367 if ~isempty(Coord_z) && isempty(find(strcmp(Coord_z,ListVarName))) 2368 FieldList_1={}; 2369 warn_coord=1; 2370 end 2371 if warn_coord 2372 msgbox_uvmat('WARNING','coordiante names do not exist in the second netcdf input file') 2373 end 2374 set(handles.FieldName,'String',[FieldList;{'get_field...'}]) 2375 set(handles.FieldName_1,'Visible','on') 2376 set(handles.FieldName_1,'Value',1) 2377 set(handles.FieldName_1,'String',FieldList_1) 2378 end 2379 else 2380 set(handles.FieldName_1,'Visible','off') 2378 set(handles.FieldName_1,'Value',1) 2379 set(handles.FieldName_1,'String',FieldList_1) 2381 2380 end 2382 2381 else 2382 set(handles.FieldName_1,'Visible','off') 2383 end 2384 if isempty(FieldList) 2383 2385 set(handles.FieldName,'Visible','off') 2384 end 2385 set(handles.FieldName,'String',FieldList) 2386 else 2387 set(handles.FieldName,'Visible','on') 2388 set(handles.FieldName,'String',FieldList) 2389 end 2386 2390 else 2387 2391 set(handles.InputFields,'Visible','off')
Note: See TracChangeset
for help on using the changeset viewer.