Changeset 905 for trunk/src/series.m


Ignore:
Timestamp:
May 30, 2015, 8:44:20 PM (9 years ago)
Author:
sommeria
Message:

projection with tps corrected + minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r904 r905  
    16071607    detect=exist(fullfile(Param.InputTable{1,1},SubDirOutNew),'dir');% test if  the dir  already exist
    16081608    check_create=1; %need to create the result directory by default
     1609    CheckOverwrite=1;
     1610    if isfield(Param,'CheckOverwrite')
     1611        CheckOverwrite=Param.CheckOverwrite;
     1612    end
    16091613    while detect
    1610         if Param.CheckOverwrite
     1614        if CheckOverwrite
    16111615            comment=', possibly overwrite previous data';
    16121616        else
     
    17191723end
    17201724nbfield_j=numel(ref_j); % number of j indices
     1725BlockLength=numel(ref_i);%default
    17211726if isempty(Param.IndexRange.NbSlice)
    17221727    NbProcess=NbCore;% choose one process per core by default if NbSlice is not imposed
     
    18051810    %% processing on a different session of the same computer (background) or cluster, create executable files
    18061811    batch_file_list=cell(NbProcess,1);% initiate the list of executable files
    1807     DirBat=fullfile(OutputDir,'0_EXE');
     1812    DirExe=fullfile(OutputDir,'0_EXE');%directory name for executable files
    18081813    switch computer
    18091814        case {'PCWIN','PCWIN64'} %Windows system
     
    18131818    end
    18141819    %create subdirectory for executable files
    1815     if ~exist(DirBat,'dir')
    1816         [tild,msg1]=mkdir(DirBat);
     1820    if ~exist(DirExe,'dir')
     1821        [tild,msg1]=mkdir(DirExe);
    18171822        if ~strcmp(msg1,'')
    1818             errormsg=['cannot create ' DirBat ': ' msg1];%error message for directory creation
     1823            errormsg=['cannot create ' DirExe ': ' msg1];%error message for directory creation
    18191824            return
    18201825        end
     
    18521857       
    18531858        %create the executable file
    1854          filebat=fullfile_uvmat(DirBat,'',Param.InputTable{1,3},ExeExt,OutputNomType,...
     1859         filebat=fullfile_uvmat(DirExe,'',Param.InputTable{1,3},ExeExt,OutputNomType,...
    18551860           Param.IndexRange.first_i,Param.IndexRange.last_i,first_j,last_j);
    18561861        batch_file_list{iprocess}=filebat;
     
    19191924    case 'cluster_oar' % option 'oar-parexec' used
    19201925        %create subdirectory for oar command and log files
    1921         DirOAR=fullfile(OutputDir,'0_LOG');
    1922         if exist(DirOAR,'dir')% delete the content of the dir 0_LOG to allow new input
    1923             curdir=pwd;
    1924             cd(DirOAR)
    1925             delete('*')
    1926             cd(curdir)
    1927         else
    1928             [tild,msg1]=mkdir(DirOAR);
    1929             if ~strcmp(msg1,'')
    1930                 errormsg=['cannot create ' DirOAR ': ' msg1];%error message for directory creation
    1931                 return
    1932             end
    1933         end
    1934         filename_joblist=fullfile(DirOAR,'0_job_list.txt');%create name of the global executable file
     1926        %DirOARLog=fullfile(OutputDir,'0_LOG');
     1927        %DirOARExe=fullfile(OutputDir,'0_EXE');
     1928%         if exist(DirOAR,'dir')% delete the content of the dir 0_LOG to allow new input
     1929%             curdir=pwd;
     1930%             cd(DirOAR)
     1931%             delete('*')
     1932%             cd(curdir)
     1933%         else
     1934%             [tild,msg1]=mkdir(DirOAR);
     1935%             if ~strcmp(msg1,'')
     1936%                 errormsg=['cannot create ' DirOAR ': ' msg1];%error message for directory creation
     1937%                 return
     1938%             end
     1939%         end
     1940        filename_joblist=fullfile(DirExe,'0_job_list.txt');%create name of the global executable file
     1941        filename_log=fullfile(DirLog,'0_job_list.stdout');%file for output messages of the master oar process
     1942        filename_errors=fullfile(DirLog,'0_job_list.stderr');%file for error messages of the master oar process
     1943       
    19351944        fid=fopen(filename_joblist,'w');
    19361945        for p=1:length(batch_file_list)
     
    19581967            '-l /core=' num2str(NbCore) ','...
    19591968            'walltime=' datestr(WallTimeOneJob/24,13) ' '...
    1960             '-E ' regexprep(filename_joblist,'\.txt\>','.stderr') ' '...
    1961             '-O ' regexprep(filename_joblist,'\.txt\>','.stdout') ' '...
     1969            '-E ' filename_errors ' '...
     1970            '-O ' filename_log ' '...
    19621971            extra_oar ' '...
    19631972            '"oar-parexec -s -f ' filename_joblist ' '...
    19641973            '-l ' filename_joblist '.log"\n'];
    19651974       
    1966         filename_oarcommand=fullfile(DirOAR,'0_oar_command');
     1975        filename_oarcommand=fullfile(DirExe,'0_oar_command');
    19671976        fid=fopen(filename_oarcommand,'w');
    19681977        fprintf(fid,oar_command);
     
    35973606% --- Executes on button press in CheckOverwrite.
    35983607function CheckOverwrite_Callback(hObject, eventdata, handles)
    3599 % hObject    handle to CheckOverwrite (see GCBO)
    3600 % eventdata  reserved - to be defined in a future version of MATLAB
    3601 % handles    structure with handles and user data (see GUIDATA)
    3602 
    3603 % Hint: get(hObject,'Value') returns toggle state of CheckOverwrite
     3608
    36043609
    36053610
Note: See TracChangeset for help on using the changeset viewer.