Changeset 220
- Timestamp:
- Mar 11, 2011, 12:03:39 PM (14 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r219 r220 22 22 function varargout = civ(varargin) 23 23 24 % Last Modified by GUIDE v2.5 05-Jan-2011 16:19:3024 % Last Modified by GUIDE v2.5 11-Mar-2011 08:21:21 25 25 % Begin initialization code - DO NOT EDIT 26 26 gui_Singleton = 1; … … 225 225 set(handles.ref_j_civ2,'String',num2str(num_ref_j)); 226 226 set(handles.browse_root,'UserData',browse); 227 if exist('param','var') %varargin the interface is opened from uvmat227 if exist('param','var') && isfield(param,'RootName') && ~isempty(param.RootName)%varargin the interface is opened from uvmat 228 228 RootName_Callback(hObject, eventdata, handles); 229 229 end … … 1711 1711 if isfield(sparam,'CivBin') 1712 1712 if ~exist(sparam.CivBin,'file') 1713 CivBin=sparam.CivBin; 1713 1714 sparam.CivBin=fullfile(path_UVMAT,sparam.CivBin); 1715 if ~exist(sparam.CivBin,'file') 1716 msgbox_uvmat('ERROR',['CIVx binary ' CivBin ' defined in PARAM.xm does not exist']) 1717 return 1718 end 1714 1719 end 1715 1720 end 1716 1721 if isfield(sparam,'Civ1Bin') 1717 1722 if ~exist(sparam.Civ1Bin,'file') 1723 CivBin=sparam.Civ1Bin; 1718 1724 sparam.Civ1Bin=fullfile(path_UVMAT,sparam.Civ1Bin); 1725 if ~exist(sparam.CivBin,'file') 1726 msgbox_uvmat('ERROR',['civ1 binary ' CivBin ' defined in PARAM.xm does not exist']) 1727 return 1728 end 1719 1729 end 1720 1730 end 1721 1731 if isfield(sparam,'Civ2Bin') 1732 CivBin=sparam.Civ2Bin; 1722 1733 if ~exist(sparam.Civ2Bin,'file') 1723 1734 sparam.Civ2Bin=fullfile(path_UVMAT,sparam.Civ2Bin); 1735 if ~exist(sparam.Civ2Bin,'file') 1736 msgbox_uvmat('ERROR',['civ2 binary ' CivBin ' defined in PARAM.xm does not exist']) 1737 return 1738 end 1724 1739 end 1725 1740 end … … 1842 1857 %% MAIN LOOP 1843 1858 time=get(handles.RootName,'UserData'); %get the set of times 1844 civAll=get(handles. Experimental,'Value'); % Boolean for new civ excution method1859 civAll=get(handles.CivAll,'Value'); % Boolean for new civ excution method 1845 1860 super_cmd=[]; 1846 1861 … … 1853 1868 cmd=[cmd '#$ -cwd \n']; 1854 1869 cmd=[cmd 'hostname && date \n']; 1855 cmd=[cmd 'umask 002 \n'];%allow writting access for user group for created files1870 cmd=[cmd 'umask 002 \n'];%allow writting access to created files for user group 1856 1871 end 1857 1872 if civAll … … 2111 2126 else 2112 2127 civAllCmd=[civAllCmd ' civ2 ']; 2113 str=CIV2_CMD_Unified(f ilename_cmx([1:end-4]),namelog,par_civ2);2128 str=CIV2_CMD_Unified(flname,'',par_civ2); 2114 2129 fieldnames=fields(str); 2115 2130 [civAllxml,uid_civ2]=add(civAllxml,1,'element','civ2'); … … 2175 2190 else 2176 2191 patch2.inputFileName=filecell.nc.civ1{ifile,j} ; 2177 patch2.nopt=subdomain_patch 1;2178 patch2.maxdiff=thresh_patch 1;2179 patch2.ro=rho_patch 1;2192 patch2.nopt=subdomain_patch2; 2193 patch2.maxdiff=thresh_patch2; 2194 patch2.ro=rho_patch2; 2180 2195 test_grid=get(handles.get_gridpatch2,'Value'); 2181 2196 if test_grid … … 2216 2231 end 2217 2232 if isequal(civAll,1) 2218 save(civAllxml,[filename_cmx([1:end-4]) '.xml']); 2219 cmd=[cmd CivBin ' -f ' filename_cmx(1:end-4) '.xml ' civAllCmd '\n']; 2233 save(civAllxml,[flname '.xml']); 2234 'TEST' 2235 cmd=[cmd sparam.CivBin ' -f ' flname '.xml ' civAllCmd ' >' flname '.log' '\n'] 2236 'fincmd' 2220 2237 end 2221 2238 % create the .bat file: … … 4124 4141 civ1.mask=par.maskname; 4125 4142 end 4126 civ1.dt= par.Dt;4143 civ1.dt=1%par.Dt; 4127 4144 civ1.unit='pixel'; 4128 4145 civ1.absolut_time_T0=par.T0; … … 4733 4750 %------------------------------------------------------------------- 4734 4751 delete(gcbf) 4752 4753 4754 % --- Executes on button press in CivAll. 4755 function CivAll_Callback(hObject, eventdata, handles) 4756 % hObject handle to CivAll (see GCBO) 4757 % eventdata reserved - to be defined in a future version of MATLAB 4758 % handles structure with handles and user data (see GUIDATA) 4759 4760 % Hint: get(hObject,'Value') returns toggle state of CivAll 4761 4762 -
trunk/src/view_field.m
r198 r220 492 492 set_vec_col_bar(handles) 493 493 494 % %--------------------------------------------495 % %update the display of color code for vectors496 % %--------------------------------------------497 % function set_vec_col_bar(handles)498 % %get the image of the color display button 'vec_col_bar' in pixels499 % uni=get(handles.vec_col_bar,'Unit');500 % set(handles.vec_col_bar,'Unit','pixel')501 % pos_vert=get(handles.vec_col_bar,'Position');502 % set(handles.vec_col_bar,'Unit','Normalized')503 % width=ceil(pos_vert(3));504 % height=ceil(pos_vert(4));505 % %get slider indications506 % colcode.min=get(handles.slider1,'Min');507 % colcode.max=get(handles.slider1,'Max');508 % colcode.colcode1=get(handles.slider1,'Value');509 % colcode.colcode2=get(handles.slider2,'Value');510 % colcode.option=get(handles.vec_col_bar,'Value');511 % colcode.auto=1;512 % list_code=get(handles.col_vec,'String');% list menu fields513 % index_code=get(handles.col_vec,'Value');% selected string index514 % colcode.CName= list_code{index_code(1)}; % selected field used for vector color515 % vec_C=colcode.min+(colcode.max-colcode.min)*[0.5:width-0.5]/width;%sample of vec_C values from min to max516 % [colorlist,col_vec]=set_col_vec(colcode,vec_C);517 % oneheight=ones(1,height);518 % A1=colorlist(col_vec,1)*oneheight;519 % A2=colorlist(col_vec,2)*oneheight;520 % A3=colorlist(col_vec,3)*oneheight;521 % A(:,:,1)=A1';522 % A(:,:,2)=A2';523 % A(:,:,3)=A3';524 % set(handles.vec_col_bar,'Cdata',A)525 526 527 494 %------------------------------------------------ 528 495 %CALLBACKS FOR PLOTTING PARAMETERS … … 707 674 colcode.colcode2=str2num(get(handles.colcode2,'String')); 708 675 end 709 % colcode.option=get(handles.vec_col_bar,'Value');710 676 colcode.FixedCbounds=0; 711 % list_code=get(handles.col_vec,'String');% list menu fields712 % index_code=get(handles.col_vec,'Value');% selected string index713 % colcode.CName= list_code{index_code(1)}; % selected field used for vector color714 677 colcode.FixedCbounds=1; 715 678 vec_C=colcode.MinC+(colcode.MaxC-colcode.MinC)*[0.5:width-0.5]/width;%sample of vec_C values from min to max … … 724 687 set(handles.vec_col_bar,'Cdata',A) 725 688 726 %------------------------------------------------------------------- 689 %------------------------------------------------------------------------ 727 690 function PlotType=update_plot(handles) 728 %------------------------------------------------------------------- 691 %------------------------------------------------------------------------ 729 692 haxes= handles.axes3; 730 693 … … 737 700 write_plot_param(handles,PlotParamOut); %update the auto plot parameters 738 701 739 %------------------------------------------------------ 702 %------------------------------------------------------------------------ 740 703 % --- Executes on button press in Menu/Export/field in workspace. 741 %------------------------------------------------------742 704 function MenuExportField_Callback(hObject, eventdata, handles) 743 705 %------------------------------------------------------------------------ 744 706 global Data_view_field 745 707 % huvmat=findobj(allchild(0),'Name','uvmat'); … … 752 714 commandwindow; 753 715 754 %------------------------------------------------------ 716 %------------------------------------------------------------------------ 755 717 % --- Executes on button press in Menu/Export/extract figure. 756 %------------------------------------------------------757 718 function MenuExport_plot_Callback(hObject, eventdata, handles) 719 %------------------------------------------------------------------------ 758 720 huvmat=get(handles.MenuExport_plot,'parent'); 759 721 UvData=get(huvmat,'UserData'); … … 764 726 colorbar 765 727 766 767 768 function npx_Callback(hObject, eventdata, handles) 769 770 function text_display_CreateFcn(hObject, eventdata, handles)%to suppress 771 function MinX_CreateFcn(hObject, eventdata, handles)%to suppress 772 function MaxX_CreateFcn(hObject, eventdata, handles)%to suppress 773 function MinY_CreateFcn(hObject, eventdata, handles)%to suppress 774 function MaxY_CreateFcn(hObject, eventdata, handles)%to suppress 775 function npy_Callback(hObject, eventdata, handles) 776 777 778 function edit86_Callback(hObject, eventdata, handles) 779 780 781 function edit87_Callback(hObject, eventdata, handles) 782 783 784 % --- Executes on button press in auto_sclar. 785 function auto_sclar_Callback(hObject, eventdata, handles) 786 % hObject handle to auto_sclar (see GCBO) 787 % eventdata reserved - to be defined in a future version of MATLAB 788 % handles structure with handles and user data (see GUIDATA) 789 790 % Hint: get(hObject,'Value') returns toggle state of auto_sclar 791 792 793 794 % --- Executes on slider movement. 795 function slider9_Callback(hObject, eventdata, handles) 796 797 798 799 % --- Executes on slider movement. 800 function slider10_Callback(hObject, eventdata, handles) 801 802 803 728 %------------------------------------------------------------------------ 804 729 function closefcn(hObject, eventdata, handles) 730 %------------------------------------------------------------------------ 805 731 huvmat=findobj(allchild(0),'Name','uvmat'); 806 732 if ~isempty(huvmat) … … 812 738 813 739 814 % --- Executes on selection change in popupmenu18. 815 function popupmenu18_Callback(hObject, eventdata, handles) 816 817 818 819 740 741 742
Note: See TracChangeset
for help on using the changeset viewer.