- Timestamp:
- Nov 23, 2014, 10:51:26 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r824 r825 528 528 set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed 529 529 xx=double(get(handles.series,'CurrentCharacter')); %get the keyboard character 530 if ~isempty(xx) 530 531 switch xx 531 532 case 31 %downward arrow … … 544 545 end 545 546 end 546 547 end 547 548 548 549 %------------------------------------------------------------------------ … … 1451 1452 1452 1453 %% create the output data directory if needed 1454 OutpuDir=''; 1453 1455 if isfield(Param,'OutputSubDir') 1454 1456 SubDirOut=[get(handles.OutputSubDir,'String') Param.OutputDirExt]; … … 1491 1493 end 1492 1494 end 1493 OutputNomType=nomtype2pair(Param.InputTable{1,4});% nomenclature for output files 1494 DirXml=fullfile(OutputDir,'0_XML'); 1495 if ~exist(DirXml,'dir') 1496 [tild,msg1]=mkdir(DirXml); 1497 if ~strcmp(msg1,'') 1498 msgbox_uvmat('ERROR',['cannot create ' DirXml ': ' msg1]);%error message for directory creation 1499 return 1500 end 1501 [success,msg] = fileattrib(DirXml,'+w','g','s');% allow writing access for the group of users, recursively in the folder 1502 if success==0 1503 msgbox_uvmat('WARNING',{['unable to set group write access to ' DirXml ':']; msg});%error message for directory creation 1504 end 1505 end 1506 end 1507 1495 1496 elseif isfield(Param,'ActionInput')&&isfield(Param.ActionInput,'LogPath')% custom definition of the output dir 1497 OutputDir=Param.ActionInput.LogPath; 1498 end 1499 DirXml=fullfile(OutputDir,'0_XML'); 1500 if ~exist(DirXml,'dir') 1501 [tild,msg1]=mkdir(DirXml); 1502 if ~strcmp(msg1,'') 1503 msgbox_uvmat('ERROR',['cannot create ' DirXml ': ' msg1]);%error message for directory creation 1504 return 1505 end 1506 [success,msg] = fileattrib(DirXml,'+w','g','s');% allow writing access for the group of users, recursively in the folder 1507 if success==0 1508 msgbox_uvmat('WARNING',{['unable to set group write access to ' DirXml ':']; msg});%error message for directory creation 1509 end 1510 end 1511 OutputNomType=nomtype2pair(Param.InputTable{1,4});% nomenclature for output files 1512 1508 1513 %% get the set of reference field indices 1509 1514 first_i=1; … … 1610 1615 end 1611 1616 end 1612 elseif strcmp(get(handles.OutputDirExt,'Visible'),'off')1613 msgbox_uvmat('ERROR',['no output file for Action ' ActionName ', use run mode = local']);% a output dir is needed for background option1614 return1617 % elseif strcmp(get(handles.OutputDirExt,'Visible'),'off') 1618 % msgbox_uvmat('ERROR',['no output file for Action ' ActionName ', use run mode = local']);% a output dir is needed for background option 1619 % return 1615 1620 else 1616 1621 %% processing on a different session of the same computer (background) or cluster, create executable files … … 2168 2173 2169 2174 %% definition of the directory containing the output files 2175 SubDirOut='';%default 2176 OutputDirExt='series'; %default 2177 if isfield(ParamOut,'OutputDirExt')&&~isempty(ParamOut.OutputDirExt) 2178 OutputDirExt=ParamOut.OutputDirExt; 2179 end 2180 set(handles.OutputDirExt,'String',OutputDirExt) 2170 2181 OutputDirVisible='off'; 2171 if isfield(ParamOut,'OutputDirExt')&& ~isequal(ActionIndex,1)%&&~isempty(ParamOut.OutputDirExt) 2172 OutputSubDirMode='all';%default 2173 if isfield(ParamOut,'OutputSubDirMode') 2174 OutputSubDirMode=ParamOut.OutputSubDirMode; 2175 end 2176 set(handles.OutputDirExt,'String',ParamOut.OutputDirExt) 2177 OutputDirVisible='on'; 2178 SubDir=InputTable(1:end,2); %set of subdirectories sorted in alphabetical order 2179 if strcmp(OutputSubDirMode,'last') 2180 SubDirOut=SubDir{end}; 2181 else 2182 OutputSubDirMode='auto';%default 2183 if isfield(ParamOut,'OutputSubDirMode') 2184 OutputSubDirMode=ParamOut.OutputSubDirMode; 2185 end 2186 switch OutputSubDirMode 2187 case 'auto';%default 2188 OutputDirVisible='on'; 2189 SubDir=InputTable(1:end,2); %set of subdirectories sorted in alphabetical order 2182 2190 SubDirOut=SubDir{1}; 2183 if ~strcmp(OutputSubDirMode,'first') &&numel(SubDir)>12191 if numel(SubDir)>1 2184 2192 for ilist=2:numel(SubDir) 2185 2193 SubDirOut=[SubDirOut '-' SubDir{ilist}]; 2186 2194 end 2187 2195 end 2188 end 2189 if isfield(ParamOut,'OutputSubDir') 2190 SubDirOut=ParamOut.OutputSubDir; 2191 end 2192 set(handles.OutputSubDir,'String',SubDirOut) 2193 end 2194 2196 case 'first' 2197 OutputDirVisible='on'; 2198 SubDirOut=InputTable{1,2}; %use the first subdir name (+OutputDirExt) as output subdirectory 2199 case 'last' 2200 OutputDirVisible='on'; 2201 SubDirOut=InputTable{end,2}; %use the last subdir name (+OutputDirExt) as output subdirectory 2202 end 2203 set(handles.OutputSubDir,'String',SubDirOut) 2195 2204 set(handles.OutputDirExt,'Visible',OutputDirVisible) 2196 2205 set(handles.OutputSubDir,'Visible',OutputDirVisible) 2197 2206 set(handles.OutputDir_title,'Visible',OutputDirVisible) 2198 set(handles.RunMode,'Visible',OutputDirVisible) 2199 set(handles.ActionExt,'Visible',OutputDirVisible) 2200 set(handles.RunMode_title,'Visible',OutputDirVisible) 2201 set(handles.ActionExt_title,'Visible',OutputDirVisible) 2207 2208 %% visibility of the run mode (local or background or cluster) 2209 if strcmp(OutputSubDirMode,'none') 2210 RunModeVisible='off';% only local mode available if no output file is produced 2211 else 2212 RunModeVisible='on'; 2213 end 2214 set(handles.RunMode,'Visible',RunModeVisible) 2215 set(handles.ActionExt,'Visible',RunModeVisible) 2216 set(handles.RunMode_title,'Visible',RunModeVisible) 2217 set(handles.ActionExt_title,'Visible',RunModeVisible) 2202 2218 2203 2219 … … 2952 2968 RootPath=Param.InputTable{1,1}; 2953 2969 if ~isfield(Param,'OutputSubDir') 2954 msgbox_uvmat('ERROR','no directory defined for output files')2970 msgbox_uvmat('ERROR','no standard sub-directory definition for output files, use a browser to check the output') 2955 2971 return 2956 2972 end
Note: See TracChangeset
for help on using the changeset viewer.