Changeset 627 for trunk/src/uvmat.m


Ignore:
Timestamp:
May 3, 2013, 10:11:43 AM (12 years ago)
Author:
sommeria
Message:

a few bugs repaired, display of the local mouse indication in a separate window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r625 r627  
    25512551        UvData.ProjObject{1}.Type='plane';%main plotting plane
    25522552        UvData.ProjObject{1}.ProjMode='projection';%main plotting plane
    2553         UvData.ProjObject{1}.Coord=[0 0 0];
     2553       % UvData.ProjObject{1}.Coord=[0 0 0];
    25542554        UvData.ProjObject{1}.DisplayHandle.uvmat=[]; %plane not visible in uvmat
    25552555        UvData.ProjObject{1}.DisplayHandle.view_field=[]; %plane not visible in uvmat
     
    26192619        end
    26202620    end
    2621     %write_plot_param(handles,PlotParamOut) %update the auto plot parameters
    26222621   
    26232622%% 2D or 3D fieldname are generally projected
     
    29452944     return
    29462945end
    2947 test_civ2=isequal(get(handles.civ2,'BackgroundColor'),[1 1 0]);
    2948 test_civ1=isequal(get(handles.VelType,'BackgroundColor'),[1 1 0]);
     2946MenuVelType=get(handles.VelType,'String');
     2947test_civ2=strcmp(MenuVelType{get(handles.VelType,'Value')},'civ2');
     2948test_civ1=strcmp(MenuVelType{get(handles.VelType,'Value')},'civ1');
    29492949if ~test_civ2 && ~test_civ1
    29502950    msgbox_uvmat('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields')
    29512951end
    29522952if test_civ2
    2953     nbname='nb_vectors2';
    2954    flagname='vec2_FixFlag';
    2955    attrname='fix2';
     2953    nbname='nb_vec_2';
     2954   flagname='Civ2_FF';
     2955   CivStage=5;
    29562956end
    29572957if test_civ1
    2958     nbname='nb_vectors';
    2959    flagname='vec_FixFlag';
    2960    attrname='fix';
     2958    nbname='nb_vec_1';
     2959   flagname='Civ1_FF';
     2960    CivStage=2;
    29612961end
    29622962%write fix flags in the netcdf file
    29632963UvData=get(handles.uvmat,'UserData');
    29642964hhh=which('netcdf.open');% look for built-in matlab netcdf library
    2965 if ~isequal(hhh,'')% case of new builtin Matlab netcdf library
     2965if ~isequal(hhh,'')% case of builtin Matlab netcdf library
    29662966    nc=netcdf.open(FileName,'NC_WRITE');
    29672967    netcdf.reDef(nc);
    2968     netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'),attrname,1);
     2968    netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'),'CivStage',CivStage);
    29692969    dimid = netcdf.inqDimID(nc,nbname);
    29702970    try
     
    37283728if ~strcmp(CoordUnit,CoordUnitPrev)
    37293729    set(handles.CheckFixLimits,'Value',0)
    3730 set(handles.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7])
     3730% set(handles.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7])
    37313731    hother=findobj('Tag','proj_object');%find all the proj objects
    37323732    for iobj=1:length(hother)
     
    37773777%------------------------------------------------------------------------
    37783778set(handles.CheckFixLimits,'Value',1) %suppress auto mode
    3779 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
     3779% set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    37803780update_plot(handles);
    37813781
     
    37843784%------------------------------------------------------------------------
    37853785set(handles.CheckFixLimits,'Value',1) %suppress auto mode
    3786 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
     3786% set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    37873787update_plot(handles);
    37883788
     
    37913791%------------------------------------------
    37923792set(handles.CheckFixLimits,'Value',1) %suppress auto mode
    3793 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
     3793% set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    37943794update_plot(handles);
    37953795
     
    37983798%------------------------------------------------------------------------
    37993799set(handles.CheckFixLimits,'Value',1) %suppress auto mode
    3800 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
     3800% set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    38013801update_plot(handles);
    38023802
     
    38083808%------------------------------------------
    38093809set(handles.CheckFixScalar,'Value',1) %suppress auto mode
    3810 set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
     3810% set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
    38113811MinA=str2double(get(handles.num_MinA,'String'));
    38123812MaxA=str2double(get(handles.num_MaxA,'String'));
     
    38243824%------------------------------------------------------------------------
    38253825set(handles.CheckFixScalar,'Value',1) %suppress auto mode
    3826 set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
     3826% set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
    38273827MinA=str2double(get(handles.num_MinA,'String'));
    38283828MaxA=str2double(get(handles.num_MaxA,'String'));
     
    38413841test=get(handles.CheckFixScalar,'Value');
    38423842if test
    3843     set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
     3843%     set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
    38443844else
    3845     set(handles.CheckFixScalar,'BackgroundColor',[0.7 0.7 0.7])
     3845%     set(handles.CheckFixScalar,'BackgroundColor',[0.7 0.7 0.7])
    38463846    update_plot(handles);
    38473847end
     
    39013901test=get(handles.CheckFixVectors,'Value');
    39023902if test
    3903     set(handles.CheckFixVectors,'BackgroundColor',[1 1 0])
     3903%     set(handles.CheckFixVectors,'BackgroundColor',[1 1 0])
    39043904else
    39053905    update_plot(handles);
    39063906    %set(handles.num_VecScale,'String',num2str(ScalOut.num_VecScale,3))
    3907     set(handles.CheckFixVectors,'BackgroundColor',[0.7 0.7 0.7])
     3907%     set(handles.CheckFixVectors,'BackgroundColor',[0.7 0.7 0.7])
    39083908end
    39093909
     
    48534853
    48544854
    4855 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    4856 % MenuEdit Callbacks
    4857 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    4858 %------------------------------------------------------------------------
    4859 function MenuEditObject_Callback(hObject, eventdata, handles)
    4860 %------------------------------------------------------------------------
    4861 set(handles.edit_object,'Value',1)
    4862 edit_Callback(hObject, eventdata, handles)
    4863 
    4864 %------------------------------------------------------------------------
    4865 function MenuEditVectors_Callback(hObject, eventdata, handles)
    4866 %------------------------------------------------------------------------
    4867 set(handles.edit_vect,'Visible','on')
    4868 set(handles.edit_vect,'Value',1)
    4869 edit_vect_Callback(hObject, eventdata, handles)
     4855% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     4856% % MenuEdit Callbacks
     4857% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     4858% %------------------------------------------------------------------------
     4859% function MenuEditObject_Callback(hObject, eventdata, handles)
     4860% %------------------------------------------------------------------------
     4861% set(handles.edit_object,'Value',1)
     4862% edit_Callback(hObject, eventdata, handles)
     4863%
     4864% %------------------------------------------------------------------------
     4865% function MenuEditVectors_Callback(hObject, eventdata, handles)
     4866% %------------------------------------------------------------------------
     4867% set(handles.edit_vect,'Visible','on')
     4868% set(handles.edit_vect,'Value',1)
     4869% edit_vect_Callback(hObject, eventdata, handles)
    48704870
    48714871%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    50465046    set(handles.ListObject,'Value',val);
    50475047    flag=1;
     5048    if ~isfield(UvData.Field,'A')
     5049            msgbox_uvmat('ERROR','an image needs to be opened to set the mask size');
     5050    return
     5051    end
    50485052    npx=size(UvData.Field.A,2);
    50495053    npy=size(UvData.Field.A,1);
     
    53745378    end
    53755379end
    5376 
    5377 
Note: See TracChangeset for help on using the changeset viewer.