Changeset 452 for trunk/src/uvmat.m


Ignore:
Timestamp:
Jun 12, 2012, 8:53:51 PM (12 years ago)
Author:
sommeria
Message:

bugs repaired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r450 r452  
    14581458            axes(handles.axes3)
    14591459            hold on   
    1460             MaskData.maskhandle=image(Mask.AX,Mask.AY,imflag,'Tag','mask','HitTest','off','AlphaData',0.6*flagmask);
     1460            size(flagmask)
     1461           % MaskData.maskhandle=image(Mask.AX,Mask.AY,imflag,'Tag','mask','HitTest','off','AlphaData',0.6*flagmask);
     1462            MaskData.maskhandle=image(Mask.AX,Mask.AY,imflag,'Tag','mask','HitTest','off','AlphaData',0.6*ones(size(flagmask)));
    14611463%             set(MaskData.maskhandle,'AlphaData',0.6*flagmask)
    14621464            set(handles.CheckMask,'UserData',MaskData)
     
    20542056            end
    20552057    end
     2058    if isstruct (ParamIn)
    20562059    ParamIn.FieldName=FieldName;
    20572060    ParamIn.VelType=VelType;
    20582061    ParamIn.GUIName='get_field';
     2062    end
    20592063    [Field{1},ParamOut,errormsg] = read_field(FileName,UvData.FileType{1},ParamIn,frame_index);
    20602064    if ~isempty(errormsg)
     
    21862190end
    21872191% display the Fields menu from the input file and pick the selected one:
     2192if isstruct(ParamOut)
    21882193field_index=strcmp(ParamOut.FieldName,ParamOut.FieldList);
    21892194set(handles.Fields,'String',ParamOut.FieldList); %update the field menu
    21902195set(handles.Fields,'Value',find(field_index,1))
     2196end
    21912197
    21922198%% update the display menu for the second velocity type (second menuline)
     
    21942200if isempty(FileName_1)
    21952201    set(handles.Fields_1,'Value',1); %update the field menu
     2202    if isstruct(ParamOut)
    21962203    set(handles.Fields_1,'String',[{''};ParamOut.FieldList]); %update the field menu
     2204    end
    21972205elseif ~test_keepdata_1
    21982206    if (~strcmp(UvData.FileType{2},'netcdf')&&~strcmp(UvData.FileType{2},'civdata')&&~strcmp(UvData.FileType{2},'civx'))|| isequal(FieldName_1,'get_field...')
     
    23852393
    23862394%% calculate scalar
    2387 if ~strcmp(ParamOut.FieldName,'get_field...')&& (strcmp(UvData.FileType{1},'civdata')||strcmp(UvData.FileType{1},'civx'))%&&~strcmp(ParamOut.FieldName,'velocity')&& ~strcmp(ParamOut.FieldName,'get_field...');% ~isequal(ParamOut.CivStage,0)%&&~isempty(FieldName)%
     2395if isstruct(ParamOut)&&~strcmp(ParamOut.FieldName,'get_field...')&& (strcmp(UvData.FileType{1},'civdata')||strcmp(UvData.FileType{1},'civx'))%&&~strcmp(ParamOut.FieldName,'velocity')&& ~strcmp(ParamOut.FieldName,'get_field...');% ~isequal(ParamOut.CivStage,0)%&&~isempty(FieldName)%
    23882396    Field{1}=calc_field([{ParamOut.FieldName} {ParamOut.ColorVar}],Field{1});
    23892397end
    2390 if numel(Field)==2 && ~strcmp(ParamOut_1.FieldName,'get_field...')&& ~test_keepdata_1 && (strcmp(UvData.FileType{2},'civdata')||strcmp(UvData.FileType{2},'civx'))  &&~strcmp(ParamOut_1.FieldName,'velocity') && ~strcmp(ParamOut_1.FieldName,'get_field...')
     2398if isstruct(ParamOut_1)&& numel(Field)==2 && ~strcmp(ParamOut_1.FieldName,'get_field...')&& ~test_keepdata_1 && (strcmp(UvData.FileType{2},'civdata')||strcmp(UvData.FileType{2},'civx'))  &&~strcmp(ParamOut_1.FieldName,'velocity') && ~strcmp(ParamOut_1.FieldName,'get_field...')
    23912399     Field{2}=calc_field([{ParamOut_1.FieldName} {ParamOut_1.ColorVar}],Field{2});
    23922400end
Note: See TracChangeset for help on using the changeset viewer.