Changeset 54 for trunk/src/civ.m
- Timestamp:
- Mar 16, 2010, 7:41:52 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r45 r54 114 114 if isunix 115 115 syst='LINUX'; 116 xmlfile=fullfile(path_UVMAT,'PARAM_LINUX.xml');117 if exist(xmlfile,'file')118 try119 t=xmltree(xmlfile);120 sparam=convert(t);121 catch122 errormsg={[' Problem for reading ' xmlfile]; lasterr};123 end124 else125 erromsg=[xmlfile ' not found: path to civx binaries undefined'];126 end127 116 else 128 117 syst='WIN'; 129 xmlfile=fullfile(path_UVMAT,'PARAM_WIN.xml'); 130 if exist(xmlfile,'file') 131 try 132 t=xmltree(xmlfile);133 sparam=convert(t);134 catch135 errormsg={[' Problem for reading ' xmlfile]; lasterr};136 end137 e lse138 erromsg=[xmlfile ' not found: path to civx binaries undefined']; 139 e nd118 end 119 xmlfile=fullfile(path_UVMAT,'PARAM.xml'); 120 if exist(xmlfile,'file') 121 try 122 t=xmltree(xmlfile); 123 sparam=convert(t); 124 catch 125 errormsg={[' Problem for reading ' xmlfile]; lasterr}; 126 end 127 else 128 errormsg=[xmlfile ' not found: path to civx binaries undefined']; 140 129 end 141 130 display(syst) … … 160 149 if ~sge 161 150 if isequal(todo_path,'') || isequal(todo_path,[]) 162 display(['no batch distributed processing available:file path TODO.txt not defined in UVMAT/PARAM _' syst])151 display(['no batch distributed processing available:file path TODO.txt not defined in UVMAT/PARAM.xml']) 163 152 test_batch=0; 164 153 end … … 327 316 end 328 317 end 329 [RootPath,RootFile,str1,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput) 318 [RootPath,RootFile,str1,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput); 330 319 filebase=fullfile(RootPath,RootFile); 331 if isequal(nom_type,'*')% all fields in a single file ( movie files) 332 num_i1=1;num_i2=1;num_j1=1;num_j2=1; 333 else 334 num_i1=str2double(str1); 335 num_i2=str2double(str2); 336 num_j1=str2double(str_a); 337 num_j2=str2double(str_b); 338 end 320 % if isequal(nom_type,'*')% all fields in a single file ( movie files) 321 % num_i1=1;num_i2=1;num_j1=1;num_j2=1; 322 % else 323 num_i1=stra2num(str1); 324 if isempty(num_i1),num_i1=1;end 325 num_i2=stra2num(str2); 326 if isempty(num_i2),num_i2=1;end 327 num_j1=stra2num(str_a); 328 if isempty(num_j1),num_j1=1;end 329 num_j2=stra2num(str_b); 330 if isempty(num_j2),num_j2=1;end 339 331 if isequal(get(handles.compare,'Value'),1) 340 332 browse=[];%initialisation … … 460 452 461 453 %------------------------------------------------------------------------ 462 % function activated when a new filebase (image series) is introduced454 % --- function activated when a new filebase (image series) is introduced 463 455 function displ_filebase_Callback(hObject, eventdata, handles) 464 456 %------------------------------------------------------------------------ … … 566 558 if isfield(XmlData,'Time') 567 559 time=XmlData.Time; 568 nbfield=size( XmlData.Time,1);569 nburst=size( XmlData.Time,2);560 nbfield=size(time,1); 561 nburst=size(time,2); 570 562 end 571 563 ext_ima_read=[]; … … 835 827 end 836 828 displ_num=[];%default 837 first_i=str2num(get(handles.first_i,'String'));829 ref_i=str2num(get(handles.ref_i,'String')); 838 830 % last_i=str2num(get(handles.last_i,'String')); 839 831 time=get(handles.displ_filebase,'UserData'); %get the set of times … … 857 849 numlist_b(index)=numod_b; 858 850 if ~isempty(time) 859 dt(numod_a,numod_b)=time( first_i,numod_b)-time(first_i,numod_a);%first time interval dt851 dt(numod_a,numod_b)=time(ref_i,numod_b)-time(ref_i,numod_a);%first time interval dt 860 852 displ_dt(index)=dt(numod_a,numod_b); 861 853 else … … 1634 1626 path_uvmat=which('uvmat');% check the path detected for source file uvmat 1635 1627 path_UVMAT=fileparts(path_uvmat); %path to UVMAT 1636 if isunix 1637 %fid = fopen(fullfile(path_UVMAT,'PARAM_LINUX.txt'),'r');%open the file with civ binary names 1638 xmlfile=fullfile(path_UVMAT,'PARAM_LINUX.xml'); 1639 if exist(xmlfile,'file') 1640 t=xmltree(xmlfile); 1641 sparam=convert(t); 1642 end 1643 else 1644 %fid = fopen(fullfile(path_UVMAT,'PARAM_WIN.txt'),'r');%open the file with civ binary names 1645 xmlfile=fullfile(path_UVMAT,'PARAM_WIN.xml'); 1646 if exist(xmlfile,'file') 1647 t=xmltree(xmlfile); 1648 sparam=convert(t); 1649 end 1650 end 1628 %fid = fopen(fullfile(path_UVMAT,'PARAM_LINUX.txt'),'r');%open the file with civ binary names 1629 xmlfile=fullfile(path_UVMAT,'PARAM.xml'); 1630 if exist(xmlfile,'file') 1631 t=xmltree(xmlfile); 1632 sparam=convert(t); 1633 end 1651 1634 if isfield(sparam,'Civ1_exe') 1652 1635 civ1_exe=sparam.Civ1_exe; 1653 if isequal(civ1_exe(1:4),'civx')%the binary is defined in /civx, default setting1636 if ~exist(civ1_exe,'file') 1654 1637 civ1_exe=fullfile(path_UVMAT,civ1_exe); 1655 1638 end … … 1657 1640 if isfield(sparam,'Civ2_exe') 1658 1641 civ2_exe=sparam.Civ2_exe; 1659 if isequal(civ2_exe(1:4),'civx')%the binary is defined in /civx, default setting1642 if ~exist(civ2_exe,'file')%the binary is defined in /bin, default setting 1660 1643 civ2_exe=fullfile(path_UVMAT,civ2_exe); 1661 1644 end … … 1663 1646 if isfield(sparam,'Patch_exe') 1664 1647 patch_exe=sparam.Patch_exe; 1665 if isequal(patch_exe(1:4),'civx')%the binary is defined in /civx, default setting1648 if ~exist(patch_exe,'file')%the binary is defined in /bin, default setting 1666 1649 patch_exe=fullfile(path_UVMAT,patch_exe); 1667 1650 end … … 2118 2101 path_uvmat=which('uvmat');% check the path detected for source file uvmat 2119 2102 path_UVMAT=fileparts(path_uvmat); %path to UVMAT 2120 if isunix 2121 xmlfile=fullfile(path_UVMAT,'PARAM_LINUX.xml'); 2122 if exist(xmlfile,'file') 2123 t=xmltree(xmlfile); 2124 sparam=convert(t); 2125 end 2126 else 2127 xmlfile=fullfile(path_UVMAT,'PARAM_WIN.xml'); 2128 if exist(xmlfile,'file') 2129 t=xmltree(xmlfile); 2130 sparam=convert(t); 2131 end 2132 end 2103 xmlfile=fullfile(path_UVMAT,'PARAM.xml'); 2104 if exist(xmlfile,'file') 2105 t=xmltree(xmlfile); 2106 sparam=convert(t); 2107 end 2108 % else 2109 % xmlfile=fullfile(path_UVMAT,'PARAM_WIN.xml'); 2110 % if exist(xmlfile,'file') 2111 % t=xmltree(xmlfile); 2112 % sparam=convert(t); 2113 % end 2114 % end 2133 2115 sge=0; 2134 2116 if isfield(sparam,'Civ_exe') … … 2350 2332 time=get(handles.displ_filebase,'UserData'); %get the set of times 2351 2333 civAll=get(handles.Experimental,'Value'); % Boolean for new civ excution method 2352 'TESTbatch'2353 size(filecell.nc.civ1)2354 nbslice2355 nbfield2356 2334 for ifile=1:nbfield 2357 2335 for j=1:nbslice … … 2409 2387 end 2410 2388 2411 %TESTgrid2412 2389 test_grid=get(handles.browse_gridciv1,'Value'); 2413 2390 if test_grid … … 2432 2409 par_civ1.gridflag='n'; 2433 2410 end 2434 %endTESTgrid 2435 2411 % 2436 2412 i_cmd=i_cmd+1; 2437 2413 if isequal(civAll,0)
Note: See TracChangeset
for help on using the changeset viewer.