Changeset 71 for trunk/src/civ_3D.m
- Timestamp:
- Mar 29, 2010, 6:34:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ_3D.m
r42 r71 22 22 function varargout = civ_3D(varargin) 23 23 24 % Last Modified by GUIDE v2.5 2 5-Feb-2009 23:14:1624 % Last Modified by GUIDE v2.5 26-Mar-2010 22:51:31 25 25 % Begin initialization code - DO NOT EDIT 26 26 gui_Singleton = 1; … … 234 234 set(handles.first_i,'String',num2str(num_ref_i)); 235 235 set(handles.last_i,'String',num2str(num_ref_i)); 236 set(handles.first_j,'String',num2str(num_ref_j));237 set(handles.last_j,'String',num2str(num_ref_j));238 236 set(handles.ref_i,'String',num2str(num_ref_i)); 239 set(handles.ref_j,'String',num2str(num_ref_j));240 237 set(handles.browse_root,'UserData',browse); 241 238 if ~isempty(varargin)% the interface is opened from uvmat … … 381 378 set(handles.ref_i,'String',num2str(ref_i)); 382 379 end 383 if isempty(str2num(str_a))384 set(handles.ref_j,'String','1');385 else386 ref_j=str2num(str_a);387 if ~isempty(str2num(str_b))388 ref_j=floor((str2num(str_a)+str2num(str_b))/2);389 browse.incr_pair(2)=str2num(str_b)-str2num(str_a);390 end391 set(handles.first_j,'String',num2str(ref_j));392 set(handles.last_j,'String',num2str(ref_j));393 set(handles.ref_j,'String',num2str(ref_j));394 end;395 380 if isequal(ind_opening,1) 396 381 set(handles.CIV1,'Value',1) … … 470 455 last_i=first_i; %default last_i 471 456 end 472 first_j=str2num(get(handles.first_j,'String')); 473 if isempty(first_j)| first_j < 1 474 first_j=1; %default first_j 475 end 476 last_j=str2num(get(handles.last_j,'String')); 477 if isempty(last_j)| last_j < first_j 478 last_j=first_j; %default last_j 479 end 457 480 458 incr_i=str2num(get(handles.incr_i,'String')); 481 459 if isempty(incr_i) | incr_i < 1; 482 460 set(handles.incr_i,'String','1') %default incr_i 483 end484 incr_j=str2num(get(handles.incr_j,'String'));485 if isempty(incr_j) | incr_j < 1;486 set(handles.incr_j,'String','1') %default incr_j487 461 end 488 462 dt=[];%default … … 514 488 %%%%%%%% read image documentation file %%%%%%%%%%%%%%%%%%%%%%%%%%% 515 489 mode=''; %default 516 %read the image documentation file if found517 if isequal(ext,'.xml')518 set(handles.ref_i,'Visible','On')%use a reference index519 set(handles.ref_j,'Visible','On')520 set(handles.dt,'Visible','Off')521 set(handles.dt_text,'String','ref. ind.')522 elseif isequal(ext,'.avi') | isequal(ext,'.AVI')523 set(handles.ref_j,'Visible','Off')524 set(handles.dt,'Visible','Off')525 set(handles.dt_text,'String','ref. ind.')526 else527 set(handles.ref_i,'Visible','Off')528 set(handles.ref_j,'Visible','Off')529 set(handles.dt,'Visible','On')530 set(handles.dt_text,'String','dt(ms)=')531 end532 533 490 if isequal(ext,'.xml') 534 [XmlData,warntext]=imadoc2struct([filebase '.xml']) ;491 [XmlData,warntext]=imadoc2struct([filebase '.xml']) 535 492 if isfield(XmlData,'Heading')&&isfield(XmlData.Heading','ImageName') 536 493 [PP,FF,fc,str2,str_a,str_b,ext_ima_read,nom_type_read]=name2display(XmlData.Heading.ImageName); 537 494 end 538 if isfield(XmlData,'Camera') 539 if isfield(XmlData.Camera,'TimeUnit') 540 TimeUnit=XmlData.Camera.TimeUnit; 541 end 542 if isfield(XmlData.Camera,'ImageSize') 543 ImageSize=XmlData.Camera.ImageSize; 544 if ~isempty(ImageSize)&& ~isempty(ImageSize) 545 xindex=findstr(ImageSize,'x'); 546 if length(xindex)>=2 547 npx=str2num(ImageSize(1:xindex(1)-1)); 548 npy=str2num(ImageSize(xindex(1)+1:xindex(2)-1)); 549 end 550 end 551 end 495 if isfield(XmlData,'TimeUnit') 496 TimeUnit=XmlData.TimeUnit; 497 end 498 if isfield(XmlData,'Npx')&&isfield(XmlData,'Npy') 499 set(handles.npx,'String',num2str(XmlData.Npx)); 500 set(handles.npy,'String',num2str(XmlData.Npy)); 501 end 502 if isfield(XmlData,'Time')&&~isempty(XmlData.Time) 503 time=XmlData.Time; 504 set(handles.npz,'String',num2str(size(time,2))); 552 505 end 553 506 pxcmx_search=1; … … 641 594 last_j=1; 642 595 end 596 UvData.XmlData=XmlData; 597 643 598 if exist('time','var') 644 siztime=size(time); 645 nbfield=siztime(1); 646 nbfield2=siztime(2); 599 nbfield=size(time,1); 647 600 set(handles.displ_filebase,'UserData',time); %store the set of times 648 set(handles.dt_unit,'String',['m' TimeUnit]);649 601 set(handles.TimeUnit,'String',TimeUnit); 650 602 set(handles.nb_field,'String',num2str(nbfield)); 651 set(handles.nb_field2,'String',num2str(nbfield2));652 603 end 653 604 set(handles.CoordUnit,'String',[CoordUnit '/']) 654 set(handles.pxcmx,'String',num2str(pxcmx));655 set(handles.pxcmy,'String',num2str(pxcmy));656 605 if isempty(pxcmx_search) 657 606 set(handles.calcul_search,'UserData',[pxcmx pxcmy]); … … 659 608 set(handles.calcul_search,'UserData',[pxcmx_search pxcmy_search]); 660 609 end 661 set(handles.pxcmx,'UserData',npx);662 set(handles.pxcmy,'UserData',npy);663 610 set(handles.first_i,'String',num2str(first_i)); 664 611 set(handles.last_i,'String',num2str(last_i));% 665 set(handles.first_j,'String',num2str(first_j));666 set(handles.last_j,'String',num2str(last_j));%667 612 browse.ext_ima=ext_ima; 668 613 browse.nom_type_ima=nom_type_ima; … … 830 775 set(handles.nb_field,'Visible','On') 831 776 set(handles.ref_i,'Visible','On') 832 if nbfield2 > 1833 set(handles.jtext,'Visible','On')834 set(handles.first_j,'Visible','On')835 set(handles.last_j,'Visible','On')836 set(handles.incr_j,'Visible','On')837 set(handles.nb_field2,'Visible','On')838 set(handles.ref_j,'Visible','On')839 else840 set(handles.jtext,'Visible','Off')841 set(handles.first_j,'Visible','Off')842 set(handles.last_j,'Visible','Off')843 set(handles.incr_j,'Visible','Off')844 set(handles.nb_field2,'Visible','Off')845 set(handles.ref_j,'Visible','Off')846 end847 777 elseif isequal(mode,'displacement')%the pairs have the same indices 848 778 displ_num(1,1)=0; … … 939 869 end 940 870 ref_i=str2num(get(handles.ref_i,'String')); 941 if isequal(mode,'pair j1-j2')|isequal(mode,'st_pair j1-j2')942 ref_j=0;943 else944 ref_j=str2num(get(handles.ref_j,'String'));945 end946 if isequal(get(handles.dt_text,'String'),'dt(ms)=')%simple series(Di) with equal interval947 ref_i=floor((first_i+last_i)/2);948 ref_j=1;949 end950 871 time=get(handles.displ_filebase,'UserData');%get the set of times 951 872 if isempty(time) 952 873 time=[0 1]; 953 874 end 954 dt_unit=str2num(get(handles.dt,'String'));% used when there is no image documentation file955 875 displ_num=get(handles.list_pair_civ1,'UserData'); 956 876 … … 1006 926 end 1007 927 end 1008 if isequal(mode,'series(Di)') | isequal(mode,'st_series(Di)')928 if isequal(mode,'series(Di)') 1009 929 if testpair 1010 930 displ_pair{1}=['Di= ' num2str(-floor(browse.incr_pair(1)/2)) '|' num2str(ceil(browse.incr_pair(1)/2))]; 1011 else if ~isequal(get(handles.dt_text,'String'),'dt(ms)=')931 else 1012 932 for ipair=1:nbpair 1013 933 if select(ipair) 1014 dt=time(ref_i+displ_num(4,ipair), ref_j+displ_num(2,ipair))-time(ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair));%time interval dt934 dt=time(ref_i+displ_num(4,ipair),1)-time(ref_i+displ_num(3,ipair),1);%time interval dt 1015 935 displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt*1000)]; 1016 936 else … … 1018 938 end 1019 939 end 1020 else 1021 for ipair=1:nbpair 1022 if select(ipair) 1023 displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt_unit*ipair)]; 1024 else 1025 displ_pair{ipair}='...'; %pair not displayed in the menu 1026 end 1027 end 1028 end 1029 elseif isequal(mode,'series(Dj)')|isequal(mode,'st_series(Dj)')% series on the j index 1030 if testpair 1031 displ_pair{1}=['Dj= ' num2str(-floor(browse.incr_pair(1)/2)) '|' num2str(ceil(browse.incr_pair(1)/2))]; 1032 else 1033 for ipair=1:nbpair 1034 if select(ipair) 1035 dt=time(ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair))-time(ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair));%time interval dt 1036 displ_pair{ipair}=['Dj= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt*1000)]; 1037 elseif testpair 1038 displ_pair{1}=['Dj= ' num2str(-floor(browse.incr_pair(2)/2)) '|' num2str(ceil(browse.incr_pair(2)/2))]; 1039 else 1040 displ_pair{ipair}='...'; %pair not displayed in the menu 1041 end 1042 end 1043 end 1044 elseif isequal(mode,'pair j1-j2')|isequal(mode,'st_pair j1-j2')%case of pairs 940 end 941 elseif isequal(mode,'pair j1-j2')%case of pairs 1045 942 for ipair=1:nbpair 1046 943 if select(ipair) … … 1073 970 %-------------------------------------------------------------- 1074 971 function find_netcpair_civ2(hObject, eventdata, handles) 972 return %do not exist in 3D 1075 973 set(gcf,'Pointer','watch') 1076 974 %nomenclature types … … 1124 1022 ref_j=str2num(get(handles.ref_j,'String')); 1125 1023 end 1126 if isequal(get(handles.dt_text,'String'),'dt(ms)=')%simple series(Di) with equal interval1127 ref_i=ceil((first_i+last_i)/2);1128 ref_j=1;1129 end1130 % ref_i=browse.num_ref;%field number initially selected by the browser1131 1024 time=get(handles.displ_filebase,'UserData'); %get the set of times 1132 1025 if isempty(time) … … 1185 1078 end 1186 1079 if isequal(mode,'series(Di)') | isequal(mode,'st_series(Di)') 1187 if ~isequal(get(handles. dt_text,'String'),'dt(ms)=')1080 if ~isequal(get(handles.ext_txt,'String'),'dt(ms)=') 1188 1081 for ipair=1:nbpair 1189 1082 if select(ipair) … … 1240 1133 last_i=str2num(get(handles.last_i,'String')); 1241 1134 incr=str2num(get(handles.incr_i,'String')); 1242 first_j=str2num(get(handles.first_j,'String'));1243 last_j=str2num(get(handles.last_j,'String'));1244 incr_j=str2num(get(handles.incr_j,'String'));1245 1135 list_civ1=get(handles.list_pair_civ1,'String'); 1246 1136 index_civ1=get(handles.list_pair_civ1,'Value'); … … 1249 1139 index_civ2=get(handles.list_pair_civ2,'Value'); 1250 1140 str_civ2=list_civ2{index_civ2}; 1251 if ise qual(first_i,[])|isequal(first_j,[]), errordlg('first field number not defined'),...1141 if isempty(first_i), msgbox_uvmat('ERROR','first field number not defined'),... 1252 1142 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end; 1253 if ise qual(last_i,[])| isequal(last_j,[]),errordlg('last field number not defined'),...1143 if isempty(last_i),msgbox_uvmat('ERROR','last field number not defined'),... 1254 1144 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end; 1255 if ise qual(incr,[])| isequal(incr_j,[]),errordlg('increment in field number not defined'),...1145 if isempty(incr), msgbox_uvmat('ERROR','increment in field number not defined'),... 1256 1146 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end; 1257 if last_i < first_i | last_j < first_j , errordlg('last field number must be larger than the first one'),...1147 if last_i < first_i , msgbox_uvmat('ERROR','last field number must be larger than the first one'),... 1258 1148 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end; 1259 1149 num1=[first_i:incr:last_i]; 1260 num_j=[first_j:incr_j:last_j]; 1261 if isequal (mode,'series(Di)') |isequal(mode,'st_series(Di)') 1150 if isequal (mode,'series(Di)') 1262 1151 %recognize the pair civ1 from the display 1263 1152 indsel=find((double(str_civ1)<48)|(double(str_civ1)>57));% character indices of non numerical characters … … 1273 1162 num1_civ1=num1-d1;% set of first image numbers 1274 1163 num2_civ1=num1+d2; 1275 num_a_civ1= num_j;1276 num_b_civ1= num_j;1164 num_a_civ1=1; 1165 num_b_civ1=1; 1277 1166 num1_civ2=num1-floor(index_civ2/2)*ones(size(num1));% set of first image numbers 1278 1167 num2_civ2=num1+ceil(index_civ2/2)*ones(size(num1)); 1279 1168 num1_civ2=num1-d1;% set of first image numbers 1280 1169 num2_civ2=num1+d2; 1281 num_a_civ2= num_j;1282 num_b_civ2= num_j;1170 num_a_civ2=1; 1171 num_b_civ2=1; 1283 1172 % adjust the first and last field number 1284 1173 lastfield=str2num(get(handles.nb_field,'String')); … … 1439 1328 global civ1_exe civ2_exe patch_exe patch_new_exe fix_exe todo_path sge Civ_exe 1440 1329 1441 pxcmx=get(handles.pxcmx,'String');1442 pxcmy=get(handles.pxcmy,'String');1443 npx=get(handles.pxcmx,'UserData');1444 npy=get(handles.pxcmy,'UserData');1330 % pxcmx=get(handles.pxcmx,'String'); 1331 % pxcmy=get(handles.pxcmy,'String'); 1332 % npx=get(handles.pxcmx,'UserData'); 1333 % npy=get(handles.pxcmy,'UserData'); 1445 1334 1446 1335 %check the list of operations: … … 1489 1378 path_uvmat=which('uvmat');% check the path detected for source file uvmat 1490 1379 path_UVMAT=fileparts(path_uvmat); %path to UVMAT 1491 if isunix 1492 %fid = fopen(fullfile(path_UVMAT,'PARAM_LINUX.txt'),'r');%open the file with civ_3D binary names 1493 xmlfile=fullfile(path_UVMAT,'PARAM_LINUX.xml'); 1494 if exist(xmlfile,'file') 1495 t=xmltree(xmlfile); 1496 sparam=convert(t); 1497 end 1498 else 1499 %fid = fopen(fullfile(path_UVMAT,'PARAM_WIN.txt'),'r');%open the file with civ_3D binary names 1500 xmlfile=fullfile(path_UVMAT,'PARAM_WIN.xml'); 1501 if exist(xmlfile,'file') 1502 t=xmltree(xmlfile); 1503 sparam=convert(t); 1504 end 1505 end 1506 sge=0; 1507 if isfield(sparam,'Civ_exe') 1508 Civ_exe=sparam.Civ_exe 1509 end 1510 if isfield(sparam,'Civ1_exe') 1511 civ1_exe=sparam.Civ1_exe 1512 end 1513 if isfield(sparam,'Civ2_exe') 1514 civ2_exe=sparam.Civ2_exe 1515 end 1516 if isfield(sparam,'Patch_exe') 1517 patch_exe=sparam.Patch_exe 1518 end 1519 if isfield(sparam,'PatchNew_exe') 1520 patch_new_exe=sparam.PatchNew_exe 1521 end 1522 if isfield(sparam,'Fix_exe') 1523 fix_exe=sparam.Fix_exe 1524 end 1525 if isfield(sparam,'Todo_path') 1526 todo_path=sparam.Todo_path 1527 end 1528 if isfield(sparam,'SGE') 1529 sge=str2num(sparam.SGE) 1530 end 1380 %fid = fopen(fullfile(path_UVMAT,'PARAM_LINUX.txt'),'r');%open the file with civ_3D binary names 1381 xmlfile=fullfile(path_UVMAT,'PARAM.xml'); 1382 if exist(xmlfile,'file') 1383 t=xmltree(xmlfile); 1384 sparam=convert(t); 1385 end 1386 if isfield(sparam.BatchParam,'Civ3D3CBin') 1387 Civ3D3CBin=sparam.BatchParam.Civ3D3CBin; 1388 else 1389 msgbox_uvmat('ERROR','binary for CIV3D3C not defined in PARAM.xml') 1390 return 1391 end 1392 1531 1393 %choice of batch priority 1532 1394 ind_answer=2; 1533 if sge1395 % if sge 1534 1396 [s,w]=unix('qstat -q civ_3D.q|grep job_| wc -l'); %check the waiting list (command unix) 1535 1397 if isequal(s,0) … … 1547 1409 return 1548 1410 end 1549 end1411 % end 1550 1412 %initialize the waitbars 1551 1413 set(handles.waitbar_1,'Position',[0.946 0.876 0.03 0.001]) … … 1635 1497 % for j=1:nbslice 1636 1498 filename=name_generator(filebase,num1_civ1(ifile),[],'.nc',... 1637 nom_type_nc,1,num2_civ1(ifile),[],subdir_civ1);%1499 '_i1-i2',1,num2_civ1(ifile),[],subdir_civ1);% 1638 1500 detect=exist(filename,'file') 1639 1501 if detect% if a netcdf file already exists … … 1657 1519 %get image names 1658 1520 for ifile=1:nbfield 1659 filecell_ima1_civ1{ifile}=name_generator(filebase, num1_civ1(ifile),[], ext_ima,nom_type_ima);%first image1660 filecell_ima2_civ1{ifile}=name_generator(filebase, num2_civ1(ifile),[], ext_ima,nom_type_ima); %second image1521 filecell_ima1_civ1{ifile}=name_generator(filebase, num1_civ1(ifile),[],'.vol','_i');%first image 1522 filecell_ima2_civ1{ifile}=name_generator(filebase, num2_civ1(ifile),[],'.vol','_i'); %second image 1661 1523 if ~exist(filecell_ima1_civ1{ifile},'file') 1662 1524 msgbox_uvmat('ERROR',[filecell_ima1_civ1{ifile} ' not found']) … … 1684 1546 set(handles.browse_root,'UserData',browse);%update the nomenclature type for uvmat 1685 1547 1686 %COPY IMAGES TO THE FORMAT .vol IF NEEDED1687 if isequal(nom_type_ima,'avi')1688 nom_type_imanew='_i';1689 else1690 nom_type_imanew=nom_type_ima;1691 end1692 1693 if ~isequal(ext_ima,'.vol')1694 if box_test(1)==1 %if civ1 is performed1695 h = waitbar(0,['copy images to the .png format for civ1']);% display a wait bar1696 for ifile=1:nbfield1697 waitbar(ifile/nbfield);1698 Atot=[];1699 filename_A=name_generator(filebase,num1_civ1(ifile),1,'.png','_i');%A VOIR1700 idetect_cur=exist(filename_A,'file');1701 for j=1:nbslice1702 if idetect_cur==01703 A=read_image(cell2mat(filecell_ima1_civ1(ifile,j)),nom_type_ima2,npx,npy,num1_civ1(ifile));1704 Atot=[Atot;A];1705 %imwrite(A,filename,'BitDepth',16);1706 end1707 end1708 imwrite(Atot,filename_A,'BitDepth',16);1709 %filecell_ima1_civ1(ifile,j)={filename};1710 Atot=[];1711 filename_B=name_generator(filebase, num2_civ1(ifile),1,'.png','_i');1712 idetect_cur=exist(filename_B,'file');1713 for j=1:nbslice1714 if idetect_cur==01715 A=read_image(cell2mat(filecell_ima2_civ1(ifile,j)),nom_type_ima2,npx,npy,num2_civ1(ifile));1716 Atot=[Atot;A];1717 % imwrite(A,filename,'BitDepth',16);1718 end1719 %filecell_ima2_civ1(ifile,j)={filename};1720 end1721 imwrite(Atot,filename_B,'BitDepth',16);1722 end1723 close(h)1724 end1725 end1726 1727 if ~sge1728 %OPEN THE WAIT LIST FOR BATCH PROCESSES1729 name_lock=fullfile(todo_path,'lock'); %lock file1730 iwait=0;1731 while(exist(name_lock) & iwait<15)1732 pause(1); %wait 1 second1733 iwait=iwait+1;1734 end1735 if iwait==151736 errordlg(['I''m tired to wait for the lock file, please delete it then click again on BATCH' name_lock ])1737 set(handles.BATCH, 'Enable','On')1738 set(handles.BATCH,'BackgroundColor',[1 0 0])1739 return1740 end1741 p0=fopen(name_lock,'w'); %create the file name_lock: prevents other users to interfere1742 name_todo=fullfile(todo_path,'TODO.txt');1743 p1=fopen(name_todo,'a');1744 if (p1<0)1745 errordlg(['error in opening ' name_todo])1746 set(handles.BATCH, 'Enable','On')1747 set(handles.BATCH,'BackgroundColor',[1 0 0])1748 return;1749 end1750 end1751 'TESTciv3D'1752 nbfield1753 1548 for ifile=1:nbfield 1754 1549 i_cmd=0; … … 1770 1565 [par_civ1.path,resu_file,resu_ext]=fileparts(filecell_nc1{ifile}); 1771 1566 par_civ1.volume1=filecell_ima1_civ1{ifile}; 1772 par_civ1.volume2=filecell_ima2_civ1{ifile} 1773 par_civ1.nx= 1024;1774 par_civ1.ny= 1024;1567 par_civ1.volume2=filecell_ima2_civ1{ifile}; 1568 par_civ1.nx=str2double(get(handles.npx,'String')); 1569 par_civ1.ny=str2double(get(handles.npy,'String'));; 1775 1570 par_civ1.nz=par_civ1.gridLimits_Zmax - par_civ1.gridLimits_Zmin; 1776 1571 'TEST' … … 1782 1577 % save(civAllxml) 1783 1578 par_civ1_3d_xml=fullfile(par_civ1.path,[resu_file '.xml']);%[par_civ1.path '/test_to_change.xml']; 1784 pvalue=num2str((1-ind_answer)*500); 1579 pvalue=num2str((1-ind_answer)*500) 1785 1580 save(civAllxml,par_civ1_3d_xml); 1786 if(isunix && sge) 1787 ['echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C /CIVX/bin/civ3d3c -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose 16 -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ] 1788 eval ( ['!echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C /CIVX/bin/civ3d3c -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose 16 -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ]) 1789 else 1790 '3D mode is NOT supported without sge' 1791 end 1792 return 1581 1582 % if(isunix && sge) 1583 ['echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose 16 -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ] 1584 eval ( ['!echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose 16 -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ]) 1585 % else 1586 % '3D mode is NOT supported without sge' 1587 % end 1588 return 1793 1589 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1794 1590 % fichier xml produit … … 2723 2519 par.gridSpacing_Z=get(handles.dz_civ1,'String'); 2724 2520 % Zmin=str2num(get(handles.first_j,'String'))-1; 2725 Zmax=str2num(get(handles.n b_field2,'String'));2521 Zmax=str2num(get(handles.npz,'String')); 2726 2522 par.gridLimits_Xmin=0; 2727 2523 par.gridLimits_Ymin=0; … … 2729 2525 % A=imread(file_ima);%read the first image to get the size 2730 2526 %sizim=size(A); 2731 par.gridLimits_Xmax= 1024;%num2str(sizim(2));2732 par.gridLimits_Ymax= 1024;%num2str(sizim(1));2527 par.gridLimits_Xmax=str2double(get(handles.npx,'String'));%num2str(sizim(2)); 2528 par.gridLimits_Ymax=str2double(get(handles.npy,'String'));%num2str(sizim(1)); 2733 2529 par.gridLimits_Zmax=Zmax; 2734 2530 par.grid='grille'; … … 3301 3097 3302 3098 3303 3304 function edit75_Callback(hObject, eventdata, handles)3305 % hObject handle to edit75 (see GCBO)3306 % eventdata reserved - to be defined in a future version of MATLAB3307 % handles structure with handles and user data (see GUIDATA)3308 3309 % Hints: get(hObject,'String') returns contents of edit75 as text3310 % str2double(get(hObject,'String')) returns contents of edit75 as a double3311 3312 3313 % --- Executes during object creation, after setting all properties.3314 function edit75_CreateFcn(hObject, eventdata, handles)3315 % hObject handle to edit75 (see GCBO)3316 % eventdata reserved - to be defined in a future version of MATLAB3317 % handles empty - handles not created until after all CreateFcns called3318 3319 % Hint: edit controls usually have a white background on Windows.3320 % See ISPC and COMPUTER.3321 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))3322 set(hObject,'BackgroundColor','white');3323 end3324 3325 3326 3327 3099 function dz_civ1_Callback(hObject, eventdata, handles) 3328 3100 % hObject handle to dz_civ1 (see GCBO) … … 3334 3106 3335 3107 3336 % --- Executes during object creation, after setting all properties. 3337 function dz_civ1_CreateFcn(hObject, eventdata, handles) 3338 % hObject handle to dz_civ1 (see GCBO) 3108 function edit77_Callback(hObject, eventdata, handles) 3109 % hObject handle to edit77 (see GCBO) 3339 3110 % eventdata reserved - to be defined in a future version of MATLAB 3340 % handles empty - handles not created until after all CreateFcns called 3341 3342 % Hint: edit controls usually have a white background on Windows. 3343 % See ISPC and COMPUTER. 3344 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 3345 set(hObject,'BackgroundColor','white'); 3346 end 3347 3348 3111 % handles structure with handles and user data (see GUIDATA) 3112 3113 % Hints: get(hObject,'String') returns contents of edit77 as text 3114 % str2double(get(hObject,'String')) returns contents of edit77 as a double 3115 3116 3117 3118 function edit78_Callback(hObject, eventdata, handles) 3119 % hObject handle to ref_i (see GCBO) 3120 % eventdata reserved - to be defined in a future version of MATLAB 3121 % handles structure with handles and user data (see GUIDATA) 3122 3123 % Hints: get(hObject,'String') returns contents of ref_i as text 3124 % str2double(get(hObject,'String')) returns contents of ref_i as a double 3125 3126 3127 function edit79_Callback(hObject, eventdata, handles) 3128 % hObject handle to edit79 (see GCBO) 3129 % eventdata reserved - to be defined in a future version of MATLAB 3130 % handles structure with handles and user data (see GUIDATA) 3131 3132 % Hints: get(hObject,'String') returns contents of edit79 as text 3133 % str2double(get(hObject,'String')) returns contents of edit79 as a double 3134 3135 3136 3137 function npz_Callback(hObject, eventdata, handles) 3138 % hObject handle to npz (see GCBO) 3139 % eventdata reserved - to be defined in a future version of MATLAB 3140 % handles structure with handles and user data (see GUIDATA) 3141 3142 % Hints: get(hObject,'String') returns contents of npz as text 3143 % str2double(get(hObject,'String')) returns contents of npz as a double 3144 3145 3146 function npy_Callback(hObject, eventdata, handles) 3147 % hObject handle to npy (see GCBO) 3148 % eventdata reserved - to be defined in a future version of MATLAB 3149 % handles structure with handles and user data (see GUIDATA) 3150 3151 % Hints: get(hObject,'String') returns contents of npy as text 3152 % str2double(get(hObject,'String')) returns contents of npy as a double 3153 3154 3155 3156 3157 function npx_Callback(hObject, eventdata, handles) 3158 % hObject handle to npx (see GCBO) 3159 % eventdata reserved - to be defined in a future version of MATLAB 3160 % handles structure with handles and user data (see GUIDATA) 3161 3162 % Hints: get(hObject,'String') returns contents of npx as text 3163 % str2double(get(hObject,'String')) returns contents of npx as a double 3164 3165 3166 3167
Note: See TracChangeset
for help on using the changeset viewer.