- Timestamp:
- Mar 15, 2016, 12:29:15 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r924 r932 1290 1290 h=findobj(haxes,'Tag','vel');% search existing lines in the current axes 1291 1291 sizh=size(h); 1292 set(h,'EraseMode','xor');1292 %set(h,'EraseMode','xor'); 1293 1293 set(haxes,'NextPlot','replacechildren'); 1294 1294 … … 1346 1346 set(h(2*icolor-1),'Xdata',matx,'Ydata',maty); 1347 1347 set(h(2*icolor-1),'Color',colorlist(icolor,:)); 1348 set(h(2*icolor-1),'EraseMode','xor');1348 % set(h(2*icolor-1),'EraseMode','xor'); 1349 1349 set(h(2*icolor),'Xdata',matxar,'Ydata',matyar); 1350 1350 set(h(2*icolor),'Color',colorlist(icolor,:)); 1351 set(h(2*icolor),'EraseMode','xor');1351 %set(h(2*icolor),'EraseMode','xor'); 1352 1352 end 1353 1353 end -
trunk/src/series.m
r928 r932 1644 1644 return 1645 1645 end 1646 [success,msg] = fileattrib(OutputDir,'+w','g','s');% allow writing access for the group of users, recursively in the folder1647 if success==01648 msgbox_uvmat('WARNING',{['unable to set group write access to ' OutputDir ':']; msg1});%error message for directory creation1649 end1650 1646 end 1651 1647 … … 1659 1655 errormsg=['cannot create ' DirXml ': ' msg1];%error message for directory creation 1660 1656 return 1661 end1662 [success,msg] = fileattrib(DirXml,'+w','g','s');% allow writing access for the group of users, recursively in the folder1663 if success==01664 msgbox_uvmat('WARNING',{['unable to set group write access to ' DirXml ':']; msg});%error message for directory creation1665 1657 end 1666 1658 end … … 1684 1676 incr_j=Param.IndexRange.incr_j; 1685 1677 end 1686 if last_i < first_i || last_j < first_j 1678 if last_i < first_i || last_j < first_j 1687 1679 errormsg= 'series/Run_Callback:last field index must be larger or equal to the first one'; 1688 1680 return … … 1707 1699 ref_i=ref_i(ref_i>=first_i & ref_i<=last_i); 1708 1700 end 1709 % increment i is defined: processing is done on first_i:incr_i:last_i;1701 % increment i is defined: processing is done on first_i:incr_i:last_i; 1710 1702 else 1711 1703 ref_i=first_i:incr_i:last_i; … … 1723 1715 end 1724 1716 nbfield_j=numel(ref_j); % number of j indices 1725 BlockLength=numel(ref_i);% by default, job involves the full set of i field indices 1717 BlockLength=numel(ref_i);% by default, job involves the full set of i field indices 1726 1718 NbProcess=1; 1727 1719 switch RunMode 1728 1720 case {'cluster_oar','cluster_pbs'} 1729 1721 if isempty(Param.IndexRange.NbSlice)% if NbSlice is not defined 1730 1731 1732 1722 BlockLength= ceil(20/(CPUTime*nbfield_j));% short iterations are grouped such that the minimum time of a process is 20 min. 1723 BlockLength=max(BlockLength,ceil(numel(ref_i)/500));% possibly increase the BlockLength to have less than 500 jobs 1724 NbProcess=ceil(numel(ref_i)/BlockLength) ; % nbre of processes sent to oar 1733 1725 else 1734 1726 NbProcess=Param.IndexRange.NbSlice;% the parameter NbSlice sets the nbre of run processes … … 1736 1728 end 1737 1729 otherwise 1738 1739 1740 1730 if ~isempty(Param.IndexRange.NbSlice) 1731 NbProcess=Param.IndexRange.NbSlice;% the parameter NbSlice sets the nbre of run processes 1732 end 1741 1733 end 1742 1734 … … 1749 1741 case 'NbInput_i' 1750 1742 StatusData.NbOutputFile=numel(ref_i); 1751 case 'NbSlice' 1743 case 'NbSlice' 1752 1744 StatusData.NbOutputFile=str2num(get(handles.num_NbSlice,'String')); 1753 1745 end … … 1827 1819 end 1828 1820 end 1821 % [success,msg] = fileattrib(filexml{iprocess},'+w','g');% allow writing access for the group of users, recursively in the folder 1822 % if success==0 1823 % msgbox_uvmat('WARNING',{['unable to set group write access to ' filexml{iprocess} ':']; msg});%error message for directory creation 1824 % end 1829 1825 end 1830 1826 if strcmp (RunMode,'local') … … 1832 1828 case '.m' 1833 1829 h_fun(Param);% direct launching 1830 1834 1831 case '.sh' 1835 1832 switch computer … … 1843 1840 end 1844 1841 end 1845 1842 % [success,msg] = fileattrib(DirXml,'+w','g','s');% allow writing access for the group of users, recursively in the folder 1843 % if success==0 1844 % msgbox_uvmat('WARNING',{['unable to set group write access to ' DirXml ':']; msg});%error message for directory creation 1845 % end 1846 1846 if ~strcmp (RunMode,'local') && ~strcmp(RunMode,'python') 1847 1847 %% processing on a different session of the same computer (background) or cluster, create executable files … … 1871 1871 end 1872 1872 end 1873 1873 1874 %create the executable file 1874 1875 file_exe_global=fullfile_uvmat('','',Param.InputTable{1,3},ExeExt,OutputNomType,... … … 1879 1880 filelog_global=fullfile(OutputDir,'0_LOG',filelog_global); 1880 1881 1881 1882 % [success,msg] = fileattrib(DirLog,'+w','g','s');% allow writing access for the group of users, recursively in the folder 1883 % if success==0 1884 % msgbox_uvmat('WARNING',{['unable to set group write access to ' DirLog ':']; msg});%error message for directory creation 1885 % end 1886 % [success,msg] = fileattrib(fullfile(OutputDir,'0_EXE'),'+w','g','s');% allow writing access for the group of users, recursively in the folder 1887 % if success==0 1888 % msgbox_uvmat('WARNING',{['unable to set group write access to ' fullfile(OutputDir,'0_EXE') ':']; msg});%error message for directory creation 1889 % end 1890 % 1882 1891 for iprocess=1:NbProcess 1883 1892 … … 1885 1894 1886 1895 batch_file_list{iprocess}=fullfile(OutputDir,'0_EXE',regexprep(extxml{iprocess},'.xml$',ExeExt)); 1887 % [fid,message]=fopen(batch_file_list{iprocess},'w');% create the executable file1888 % if isequal(fid,-1)1889 % errormsg=['creation of ' batch_file_list{iprocess} ':' message];1890 % return1891 % end1896 % [fid,message]=fopen(batch_file_list{iprocess},'w');% create the executable file 1897 % if isequal(fid,-1) 1898 % errormsg=['creation of ' batch_file_list{iprocess} ':' message]; 1899 % return 1900 % end 1892 1901 1893 1902 % set the log file name … … 1964 1973 case 'cluster_oar' % option 'oar-parexec' used 1965 1974 %create subdirectory for oar commands 1966 for iprocess=1:NbProcess 1975 for iprocess=1:NbProcess 1967 1976 [fid,message]=fopen(batch_file_list{iprocess},'w');% create the executable file 1968 1977 if isequal(fid,-1) … … 1970 1979 return 1971 1980 end 1981 % [success,msg] = fileattrib(batch_file_list{iprocess},'+w','g');% allow writing access for the group of users, recursively in the folder 1982 % if success==0 1983 % msgbox_uvmat('WARNING',{['unable to set group write access to ' batch_file_list{iprocess} ':']; msg});%error message for directory creation 1984 % end 1972 1985 if strcmp(ActionExt,'.sh') 1973 cmd=['#!/bin/bash \n '...1974 '#$ -cwd \n '...1975 'hostname && date \n '...1976 'umask 002 \n'...1977 ActionFullName ' ' RunTime ' ' filexml{iprocess}];%allow writting access to created files for user group1986 cmd=['#!/bin/bash \n '... 1987 '#$ -cwd \n '... 1988 'hostname && date \n '... 1989 'umask 002 \n'... 1990 ActionFullName ' ' RunTime ' ' filexml{iprocess}];%allow writting access to created files for user group 1978 1991 else 1979 1992 cmd=[... 1980 1981 1982 1983 1984 1985 1986 1987 1993 '#!/bin/bash \n'... 1994 '. /etc/sysprofile \n'... 1995 'matlab -nodisplay -nosplash -nojvm -logfile ''' filelog{iprocess} ''' <<END_MATLAB \n'... 1996 'addpath(''' path_series '''); \n'... 1997 'addpath(''' Param.Action.ActionPath '''); \n'... 1998 '' Param.Action.ActionName '( ''' filexml{iprocess} '''); \n'... 1999 'exit \n'... 2000 'END_MATLAB \n']; 1988 2001 end 1989 2002 fprintf(fid,cmd);%fill the executable file with the char string cmd … … 2005 2018 end 2006 2019 % create file containing the list of jobs 2007 filename_joblist=fullfile(DirOAR,'job_list.txt');% name of the file cont qining the list of executables2020 filename_joblist=fullfile(DirOAR,'job_list.txt');% name of the file containing the list of executables 2008 2021 fid=fopen(filename_joblist,'w');%open it for writting 2022 % [success,msg] = fileattrib(filename_joblist,'+w','g');% allow writing access for the group of users, 2009 2023 for iprocess=1:length(batch_file_list) 2010 2024 fprintf(fid,[batch_file_list{iprocess} '\n']);% write list of exe files … … 2036 2050 '-O ' filename_log ' '... 2037 2051 extra_oar ' '... 2038 '"oar-parexec -s -f ' filename_joblist ' '...2052 '"oar-parexec -s -f ' filename_joblist ' '... 2039 2053 '-l ' filename_joblist '.log"']; 2040 2054 2041 2055 2042 2056 2043 2057 fprintf(oar_command);% display system command on the Matlab command window … … 2049 2063 fclose(fid); 2050 2064 msgbox_uvmat('CONFIRMATION',[ActionFullName ' launched as ' num2str(NbProcess) ' processes in cluster: press STATUS to see results']) 2065 % [success,msg] = fileattrib(DirOAR,'+w','g','s');% allow writing access for the group of users, recursively in the folder 2066 % if success==0 2067 % msgbox_uvmat('WARNING',{['unable to set group write access to ' DirOAR ':']; msg});%error message for directory creation 2068 % end 2051 2069 2052 2070 case 'cluster_pbs' % for LMFA Kepler machine … … 2097 2115 system(command, '-echo'); 2098 2116 end 2099 2117 if exist(OutputDir,'dir') 2118 [success,msg] = fileattrib(OutputDir,'+w','g','s');% allow writing access for the group of users, recursively in the folder 2119 if success==0 2120 msgbox_uvmat('WARNING',{['unable to set group write access to ' OutputDir ':']; msg1});%error message for directory creation 2121 end 2122 end 2100 2123 %------------------------------------------------------------------------ 2101 2124 function STOP_Callback(hObject, eventdata, handles) -
trunk/src/series/civ_input.m
r924 r932 721 721 numlist_a(index)=numod_a; 722 722 numlist_b(index)=numod_b; 723 if size(time,2)>1 && ~checkframe 723 if size(time,2)>1 && ~checkframe && size(CivInputData.Time,1)>ref_i && size(CivInputData.Time,2)>numod_b 724 724 dt(numod_a,numod_b)=CivInputData.Time(ref_i+1,numod_b+1)-CivInputData.Time(ref_i+1,numod_a+1);%first time interval dt 725 725 displ_dt(index)=dt(numod_a,numod_b); -
trunk/src/series/civ_series.m
r924 r932 890 890 if isempty(errormsg) 891 891 disp([ncfile_out ' written']) 892 [success,msg] = fileattrib(ncfile_out ,'+w','g');% allow writing access for the group of users, recursively in the folder 892 893 else 893 894 disp(errormsg) -
trunk/src/series/extract_rdvision.m
r931 r932 451 451 uid_Dtj=find(t,'ImaDoc/Camera/BurstTiming/Dtj'); 452 452 uid_content=get(t,uid_Dtj,'contents'); 453 Dtj=str2num(get(t,uid_content,'value')); 454 nbfield2=numel(Dtj)+1; 455 timestamp=(reshape(timestamp,nbfield2,[]))'; 456 diff_Dtj=diff(timestamp(1,:))-Dtj; 457 if max(abs(diff_Dtj))>min(Dtj)/1000 458 disp(['Dtj from xml file differs from time stamp by ' num2str(max(abs(diff_Dtj))) ', '])%' 453 Dtjstring=get(t,uid_content,'value'); 454 if isempty(Dtjstring) 455 timestamp=timestamp'; 456 nbfield2=1; 459 457 else 460 disp('Dtj OK'); 461 end 462 458 Dtj=str2num(get(t,uid_content,'value')); 459 nbfield2=numel(Dtj)+1; 460 timestamp=(reshape(timestamp,nbfield2,[]))'; 461 diff_Dtj=diff(timestamp(1,:))-Dtj; 462 if max(abs(diff_Dtj))>min(Dtj)/1000 463 disp(['Dtj from xml file differs from time stamp by ' num2str(max(abs(diff_Dtj))) ', '])%' 464 else 465 disp('Dtj OK'); 466 end 467 end 463 468 %% correct NbDti 464 469 NbDti=size(timestamp,1); %default for series or burst … … 503 508 504 509 save(t,newxml) 505 506 507 508 510 [success,msg] = fileattrib(newxml,'+w','g');% allow writing access for the group of users 511 if success==0 512 msgbox_uvmat('WARNING',{['unable to set group write access to ' newxml ':']; msg1});%error message for directory creation 513 end 514 515 516
Note: See TracChangeset
for help on using the changeset viewer.