Changeset 627 for trunk/src/uvmat.m
- Timestamp:
- May 3, 2013, 10:11:43 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r625 r627 2551 2551 UvData.ProjObject{1}.Type='plane';%main plotting plane 2552 2552 UvData.ProjObject{1}.ProjMode='projection';%main plotting plane 2553 UvData.ProjObject{1}.Coord=[0 0 0];2553 % UvData.ProjObject{1}.Coord=[0 0 0]; 2554 2554 UvData.ProjObject{1}.DisplayHandle.uvmat=[]; %plane not visible in uvmat 2555 2555 UvData.ProjObject{1}.DisplayHandle.view_field=[]; %plane not visible in uvmat … … 2619 2619 end 2620 2620 end 2621 %write_plot_param(handles,PlotParamOut) %update the auto plot parameters2622 2621 2623 2622 %% 2D or 3D fieldname are generally projected … … 2945 2944 return 2946 2945 end 2947 test_civ2=isequal(get(handles.civ2,'BackgroundColor'),[1 1 0]); 2948 test_civ1=isequal(get(handles.VelType,'BackgroundColor'),[1 1 0]); 2946 MenuVelType=get(handles.VelType,'String'); 2947 test_civ2=strcmp(MenuVelType{get(handles.VelType,'Value')},'civ2'); 2948 test_civ1=strcmp(MenuVelType{get(handles.VelType,'Value')},'civ1'); 2949 2949 if ~test_civ2 && ~test_civ1 2950 2950 msgbox_uvmat('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields') 2951 2951 end 2952 2952 if test_civ2 2953 nbname='nb_vec tors2';2954 flagname=' vec2_FixFlag';2955 attrname='fix2';2953 nbname='nb_vec_2'; 2954 flagname='Civ2_FF'; 2955 CivStage=5; 2956 2956 end 2957 2957 if test_civ1 2958 nbname='nb_vec tors';2959 flagname=' vec_FixFlag';2960 attrname='fix';2958 nbname='nb_vec_1'; 2959 flagname='Civ1_FF'; 2960 CivStage=2; 2961 2961 end 2962 2962 %write fix flags in the netcdf file 2963 2963 UvData=get(handles.uvmat,'UserData'); 2964 2964 hhh=which('netcdf.open');% look for built-in matlab netcdf library 2965 if ~isequal(hhh,'')% case of newbuiltin Matlab netcdf library2965 if ~isequal(hhh,'')% case of builtin Matlab netcdf library 2966 2966 nc=netcdf.open(FileName,'NC_WRITE'); 2967 2967 netcdf.reDef(nc); 2968 netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'), attrname,1);2968 netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'),'CivStage',CivStage); 2969 2969 dimid = netcdf.inqDimID(nc,nbname); 2970 2970 try … … 3728 3728 if ~strcmp(CoordUnit,CoordUnitPrev) 3729 3729 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]) 3731 3731 hother=findobj('Tag','proj_object');%find all the proj objects 3732 3732 for iobj=1:length(hother) … … 3777 3777 %------------------------------------------------------------------------ 3778 3778 set(handles.CheckFixLimits,'Value',1) %suppress auto mode 3779 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])3779 % set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 3780 3780 update_plot(handles); 3781 3781 … … 3784 3784 %------------------------------------------------------------------------ 3785 3785 set(handles.CheckFixLimits,'Value',1) %suppress auto mode 3786 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])3786 % set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 3787 3787 update_plot(handles); 3788 3788 … … 3791 3791 %------------------------------------------ 3792 3792 set(handles.CheckFixLimits,'Value',1) %suppress auto mode 3793 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])3793 % set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 3794 3794 update_plot(handles); 3795 3795 … … 3798 3798 %------------------------------------------------------------------------ 3799 3799 set(handles.CheckFixLimits,'Value',1) %suppress auto mode 3800 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])3800 % set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 3801 3801 update_plot(handles); 3802 3802 … … 3808 3808 %------------------------------------------ 3809 3809 set(handles.CheckFixScalar,'Value',1) %suppress auto mode 3810 set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])3810 % set(handles.CheckFixScalar,'BackgroundColor',[1 1 0]) 3811 3811 MinA=str2double(get(handles.num_MinA,'String')); 3812 3812 MaxA=str2double(get(handles.num_MaxA,'String')); … … 3824 3824 %------------------------------------------------------------------------ 3825 3825 set(handles.CheckFixScalar,'Value',1) %suppress auto mode 3826 set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])3826 % set(handles.CheckFixScalar,'BackgroundColor',[1 1 0]) 3827 3827 MinA=str2double(get(handles.num_MinA,'String')); 3828 3828 MaxA=str2double(get(handles.num_MaxA,'String')); … … 3841 3841 test=get(handles.CheckFixScalar,'Value'); 3842 3842 if test 3843 set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])3843 % set(handles.CheckFixScalar,'BackgroundColor',[1 1 0]) 3844 3844 else 3845 set(handles.CheckFixScalar,'BackgroundColor',[0.7 0.7 0.7])3845 % set(handles.CheckFixScalar,'BackgroundColor',[0.7 0.7 0.7]) 3846 3846 update_plot(handles); 3847 3847 end … … 3901 3901 test=get(handles.CheckFixVectors,'Value'); 3902 3902 if test 3903 set(handles.CheckFixVectors,'BackgroundColor',[1 1 0])3903 % set(handles.CheckFixVectors,'BackgroundColor',[1 1 0]) 3904 3904 else 3905 3905 update_plot(handles); 3906 3906 %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]) 3908 3908 end 3909 3909 … … 4853 4853 4854 4854 4855 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4856 % MenuEdit Callbacks4857 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%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) 4870 4870 4871 4871 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 5046 5046 set(handles.ListObject,'Value',val); 5047 5047 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 5048 5052 npx=size(UvData.Field.A,2); 5049 5053 npy=size(UvData.Field.A,1); … … 5374 5378 end 5375 5379 end 5376 5377
Note: See TracChangeset
for help on using the changeset viewer.