Changeset 1070 for trunk/src/series.m


Ignore:
Timestamp:
Jul 11, 2019, 7:02:27 PM (5 years ago)
Author:
sommeria
Message:

browse_data improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r1069 r1070  
    612612function REFRESH_Callback(hObject, eventdata, handles)
    613613%------------------------------------------------------------------------
     614check_input_file_series(handles)
     615
     616%% enable field and veltype menus, in accordance with the current action
     617ActionInput_Callback([],[], handles)
     618
     619
     620function check_input_file_series(handles)
    614621InputTable=get(handles.InputTable,'Data');
    615622set(handles.series,'Pointer','watch') % set the mouse pointer to 'watch'
     
    676683set(handles.series,'Pointer','arrow') % set the mouse pointer to 'watch'
    677684
    678 %% enable field and veltype menus, in accordance with the current action
    679 ActionInput_Callback([],[], handles)
    680685
    681686
     
    16611666        Param.InputTable(:,1)=ListPath(:,iexp);
    16621667        Param.InputTable(:,2)=ListSubdir(:,iexp);
    1663         if size(Param.InputTable,1)==1% case of single input line
    1664         Param.OutputSubDir=ListSubdir{iexp};
    1665         end
    1666         set(handles.InputTable,'Data',Param.InputTable)
    1667 %         set(handles.OutputSubDir,'String',ListSubdir{iexp})
     1668        OutputSubDir=unique(ListSubdir(:,iexp));
     1669        Param.OutputSubDir=OutputSubDir{1};
     1670        if numel(OutputSubDir)>1% case
     1671            for iout=2:numel(OutputSubDir)
     1672                Param.OutputSubDir=[Param.OutputSubDir '-' OutputSubDir{iout}];
     1673            end               
     1674        end       
    16681675    end
    16691676    [xx,ExpName]=fileparts(Param.InputTable{1,1});
    16701677    Param.IndexRange.first_i=str2num(get(handles.num_first_i,'String'));%reset the firrst_i and last_i for multiple experiments, modified by the splitting into NbProcess
    16711678    Param.IndexRange.last_i=str2num(get(handles.num_last_i,'String'));
    1672     %% create the output data directory if needed
     1679   
     1680    %% create the output data directory if needed, after chcking its existence
    16731681    OutputDir='';
    16741682    answer='';
    16751683    if isfield(Param,'OutputSubDir')% possibly update the output dir if it already exists
    1676         SubDirOut=[get(handles.OutputSubDir,'String') Param.OutputDirExt];
     1684        SubDirOut=[Param.OutputSubDir Param.OutputDirExt];
    16771685        SubDirOutNew=SubDirOut;
    16781686        detect=exist(fullfile(Param.InputTable{1,1},SubDirOutNew),'dir'); % test if  the dir  already exist
     
    17081716            continue
    17091717        end
    1710         Param.OutputDirExt=regexprep(SubDirOutNew,Param.OutputSubDir,'');
     1718        Param.OutputDirExt=regexprep(SubDirOutNew,['^' Param.OutputSubDir],'');
    17111719        Param.OutputRootFile=Param.InputTable{1,3}; % the first sorted RootFile taken for output
    1712         set(handles.OutputDirExt,'String',Param.OutputDirExt)
    1713         OutputDir=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]) % full name (with path) of output directory
     1720        OutputDir=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]); % full name (with path) of output directory
    17141721        if check_create    % create output directory if it does not exist
    17151722            [tild,msg1]=mkdir(OutputDir);
     
    17221729    elseif isfield(Param,'ActionInput')&&isfield(Param.ActionInput,'LogPath')% custom definition of the output dir
    17231730        OutputDir=Param.ActionInput.LogPath;
     1731    end
     1732   
     1733    set(handles.OutputSubDir,'String',Param.OutputSubDir)
     1734    set(handles.OutputDirExt,'String',Param.OutputDirExt)
     1735    drawnow
     1736    if get(handles.Replicate,'Value')
     1737        set(handles.InputTable,'Data',Param.InputTable)
     1738        check_input_file_series(handles)
    17241739    end
    17251740    DirXml=fullfile(OutputDir,'0_XML');
     
    22092224end
    22102225set(handles.Replicate,'BackgroundColor',[0 1 0])
    2211 if NbExp>1
    2212     set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta (input file features need to be updated)
    2213 end
     2226
    22142227%------------------------------------------------------------------------
    22152228function STOP_Callback(hObject, eventdata, handles)
     
    38163829% --- Executes on button press in MonitorCluster.
    38173830function MonitorCluster_Callback(hObject, eventdata, handles)
    3818 disp('format: R/W=run/wait, time lapsed, R=nbre of cores,W=walltime')
    3819 system('oarstat |grep N=UVmat')% check the list of jobs launched with uvmat
     3831
     3832[rr,ss]=system('oarstat |grep N=UVmat');% check the list of jobs launched with uvmat
     3833if isempty(ss)
     3834   disp( 'no job presently submitted with uvmat')
     3835else
     3836    disp('format: R/W=run/wait, time lapsed, R=nbre of cores,W=walltime')
     3837    disp(ss)
     3838end
    38203839
    38213840
Note: See TracChangeset for help on using the changeset viewer.