Changeset 954 for trunk/src/series.m


Ignore:
Timestamp:
Jun 22, 2016, 1:36:50 PM (7 years ago)
Author:
sommeria
Message:

update calib modfied + various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r951 r954  
    22922292CheckList_1=1;% indicate whether FieldName_1 has been updated
    22932293handles_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 
     2294if VelTypeRequest && numel(iview_civ)>=1
    22952295    menu=set_veltype_display(SeriesData.FileInfo{iview_civ(1)}.CivStage,SeriesData.FileType{iview_civ(1)});
    22962296    set(handles.VelType,'Value',1)% set first choice by default
     
    23012301    %CheckList=1;
    23022302    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
    23042304        menu=set_veltype_display(SeriesData.FileInfo{iview_civ(2)}.CivStage,SeriesData.FileType{iview_civ(2)});
    23052305        set(handles.VelType_1,'Value',1)% set first choice by default
     
    23172317    set(handles.VelType,'Visible','off')
    23182318    set(handles.VelType_title,'Visible','off')
    2319 end   
     2319end
    23202320
    23212321%% Detect the types of input files and set menus and default options in 'FieldName'
    23222322if (FieldNameRequest || VelTypeRequest) && numel(iview_netcdf)>=1
    2323     set(handles.InputFields,'Visible','on')   
     2323    set(handles.InputFields,'Visible','on')% set the frame InputFields visible
    23242324    if FieldNameRequest && isfield(SeriesData.FileInfo{iview_netcdf(1)},'ListVarName')
    23252325        set(handles.FieldName,'Visible','on')
     
    23462346            end
    23472347        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           
    23512377            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)
    23812380        end
    23822381    else
     2382        set(handles.FieldName_1,'Visible','off')
     2383    end
     2384    if isempty(FieldList)
    23832385        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
    23862390else
    23872391    set(handles.InputFields,'Visible','off')
Note: See TracChangeset for help on using the changeset viewer.