Changeset 1134 for trunk/src/series.m


Ignore:
Timestamp:
Apr 19, 2024, 8:21:23 PM (2 weeks ago)
Author:
sommeria
Message:

adapted to reading hdf5 data from fluidimage, extract_rdvision improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r1133 r1134  
    654654        i1=str2num(get(handles.num_first_i,'String'));
    655655        j1=str2num(get(handles.num_first_j,'String'));
    656         InputFile=fullfile_uvmat('','',InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},i1,[],j1,[])
     656        InputFile=fullfile_uvmat('','',InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},i1,[],j1,[]);
    657657            [RootPath,~,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=...
    658658                find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),InputFile);
     
    725725[FilePath,FileName,FileExt]=fileparts(fileinput);
    726726%%%%%%%%%%%%%%%%%%
    727 %TODO: case of input by uvmat: do not check agai the input seies %%%%%%%
     727%TODO: case of input by uvmat: do not check agai the input series %%%%%%%
    728728%%%%%%%%%%%%%%%%%%%
    729729% detect the file type, get the movie object if relevant, and look for the corresponding file series:
     
    20462046        end
    20472047       
    2048         %create the executable file
     2048        %create the executable and log file names
    20492049        file_exe_global=fullfile_uvmat('','',Param.InputTable{1,3},ExeExt,OutputNomType,...
    20502050            first_i,last_i,first_j,last_j);
     
    20552055       
    20562056        for iprocess=1:NbProcess
    2057             %create the executable file
    2058             batch_file_list{iprocess}=fullfile(OutputDir,'0_EXE',regexprep(extxml{iprocess},'.xml$',ExeExt));
    2059            
    2060             % set the log file name
    2061             filelog{iprocess}=fullfile(OutputDir,'0_LOG',regexprep(extxml{iprocess},'.xml$','.log'));
     2057            batch_file_list{iprocess}=fullfile(OutputDir,'0_EXE',regexprep(extxml{iprocess},'.xml$',ExeExt)); % executable file names
     2058            filelog{iprocess}=fullfile(OutputDir,'0_LOG',regexprep(extxml{iprocess},'.xml$','.log'));% corresponding log file names
    20622059        end
    20632060    end
     
    20772074                    switch computer
    20782075                        case {'GLNX86','GLNXA64','MACI64'}
    2079                             matlab_ver = ver('MATLAB');
    2080                             matlab_version = matlab_ver.Version;
    2081                             cmd=[...
    2082                                 '#!/bin/bash\n'...
    2083                                 'source /etc/profile\n'...
    2084                                 'module purge\n'...
    2085                                 'module load matlab/' matlab_version '\n'...% CHOICE OF MATLAB VERSION
    2086                                 'time_start=$(date +%%s)\n'...
    2087                                 'matlab -nodisplay -nosplash -nojvm -logfile ''' filelog_global ''' <<END_MATLAB\n'...
    2088                                 'addpath(''' path_series ''');\n'...
    2089                                 'addpath(''' Param.Action.ActionPath ''');\n'];
    2090                             for iprocess=1:NbProcess
    2091                                 cmd=[cmd '' Param.Action.ActionName  '(''' filexml{iprocess} ''');\n'];
    2092                             end
    2093                             cmd=[cmd  'exit\n' 'END_MATLAB\n'...
    2094                                 'time_end=$(date +%%s)\n'...
    2095                                 'echo "global time = " $(($time_end - $time_start)) >> ''' filelog_global '''\n'];
     2076                            cmd=command_launch_matlab(filelog_global,path_series,Param.Action.ActionPath,Param.Action.ActionName,filexml,'background');
    20962077                            fprintf(fid,cmd); % fill the executable file with the  char string cmd
    20972078                            fclose(fid); % close the executable filefilelog_global
     
    21502131                        ActionFullName ' ' RunTime ' ' filexml{iprocess}]; % allow writting access to created files for user group
    21512132                else
    2152                     matlab_ver = ver('MATLAB');
    2153                     matlab_version = matlab_ver.Version;
    2154                     cmd=[...
    2155                         '#!/bin/bash\n'...
    2156                         'source /etc/profile\n'...
    2157                         'module purge\n'...
    2158                         'module load matlab/' matlab_version '\n'...% CHOICE OF CURRENT MATLAB VERSION
    2159                         'matlab -nodisplay -nosplash -nojvm -singleCompThread -logfile ''' filelog{iprocess} ''' <<END_MATLAB\n'...% open a new Matlab session without display
    2160                         'addpath(''' path_series ''');\n'...
    2161                         'addpath(''' Param.Action.ActionPath ''');\n'...
    2162                         '' Param.Action.ActionName  '(''' filexml{iprocess} ''');\n'...% launch the Matlab function selected by the GUI 'series'
    2163                         'exit\n'...
    2164                         'END_MATLAB\n'];
     2133                    cmd=command_launch_matlab(filelog_global,path_series,Param.Action.ActionPath,Param.Action.ActionName,filexml{iprocess},'cluster');
     2134                    % matlab_ver = ver('MATLAB');
     2135                    % matlab_version = matlab_ver.Version;
     2136                    % cmd=[...
     2137                    %     '#!/bin/bash\n'...
     2138                    %     'source /etc/profile\n'...
     2139                    %     'module purge\n'...
     2140                    %     'module load matlab/' matlab_version '\n'...% CHOICE OF CURRENT MATLAB VERSION
     2141                    %     'matlab -nodisplay -nosplash -nojvm -singleCompThread -logfile ''' filelog{iprocess} ''' <<END_MATLAB\n'...% open a new Matlab session without display
     2142                    %     'addpath(''' path_series ''');\n'...
     2143                    %     'addpath(''' Param.Action.ActionPath ''');\n'...
     2144                    %     '' Param.Action.ActionName  '(''' filexml{iprocess} ''');\n'...% launch the Matlab function selected by the GUI 'series'
     2145                    %     'exit\n'...
     2146                    %     'END_MATLAB\n'];
    21652147                end
    21662148                fprintf(fid,cmd); % fill the executable file with the  char string cmd
     
    30062988[i1,i2,j1,j2] = get_file_index(ref_i,ref_j,PairString);
    30072989FileName=fullfile_uvmat(InputTable{1},InputTable{2},InputTable{3},InputTable{5},InputTable{4},i1,i2,j1,j2);
    3008 Data=nc2struct(FileName,[]);
     2990%Data=nc2struct(FileName,[]);
    30092991TimeValue=[];
    30102992DtValue=[];
    3011 if isequal(FileInfo.FileType,'civdata')
     2993switch FileInfo.FileType
     2994    case 'civdata'
     2995    Data=nc2struct(FileName,[]);
    30122996    if ismember(TimeName,{'civ1','filter1'})
    30132997        if isfield(Data,'Civ1_Time')
     
    30253009        end
    30263010    end
    3027 else
     3011    case 'pivdata_fluidimage'
     3012      TimeValue=ref_i;%default
     3013      DtValue=1;%default
     3014    case 'netcdf'
     3015        Data=nc2struct(FileName,[]);
    30283016    if ~isempty(TimeName)&& isfield(Data,TimeName)
    30293017        TimeValue=Data.(TimeName);
Note: See TracChangeset for help on using the changeset viewer.