Changeset 594 for trunk/src/series


Ignore:
Timestamp:
Mar 26, 2013, 9:56:10 PM (11 years ago)
Author:
sommeria
Message:

bugs corrected. One step further for using compiled fcts and cluster with series

Location:
trunk/src/series
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/aver_stat.m

    r592 r594  
    6262
    6363%%%%%%%%%%%%  STANDARD PART  %%%%%%%%%%%%
     64ParamOut=[];
    6465%% read input parameters from an xml file if input is a file name (batch mode)
    6566checkrun=1;
  • trunk/src/series/check_data_files.m

    r592 r594  
    3434function ParamOut=check_data_files(Param)
    3535
    36 % %% set the input elements needed on the GUI series when the action is selected in the menu ActionName
    37 % if ~exist('Param','var') % case with no input parameter
    38 %     ParamOut={'NbViewMax';'';...% max nbre of input file series (default='' , no limitation)
    39 %         'AllowInputSort';'off';...% allow alphabetic sorting of the list of input files (options 'off'/'on', 'off' by default)
    40 %         'NbSlice';'on'; ...%nbre of slices ('off' by default)
    41 %         'VelType';'off';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
    42 %         'FieldName';'off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
    43 %         'FieldTransform'; 'off';...%can use a transform function
    44 %         'ProjObject';'off';...%can use projection object(option 'off'/'on',
    45 %         'Mask';'off';...%can use mask option   (option 'off'/'on', 'off' by default)
    46 %         'OutputDirExt';'';...%set the output dir extension
    47 %                ''};
    48 %         return
    49 % end
    5036%% input preparation mode (no RUN)
    5137if isstruct(Param) && isequal(Param.Action.RUN,0)
    52     ParamOut.AllowInputSort='off';...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
    53     ParamOut.WholeIndexRange='off';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
    54     ParamOut.NbSlice='on'; ...%nbre of slices ('off' by default)
    55     ParamOut.VelType='off';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
    56     ParamOut.FieldName='off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
    57     ParamOut.FieldTransform = 'off';...%can use a transform function
    58     ParamOut.ProjObject='off';...%can use projection object(option 'off'/'on',
    59     ParamOut.Mask='off';...%can use mask option   (option 'off'/'on', 'off' by default)
     38    ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
     39    ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
     40    ParamOut.NbSlice='on';%nbre of slices ('off' by default)
     41    ParamOut.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
     42    ParamOut.FieldName='off';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
     43    ParamOut.FieldTransform = 'off';%can use a transform function
     44    ParamOut.ProjObject='off';%can use projection object(option 'off'/'on',
     45    ParamOut.Mask='off';%can use mask option   (option 'off'/'on', 'off' by default)
    6046    ParamOut.OutputDirExt='';%set the output dir extension (blank=no output dir)
    6147return
    6248end
    6349%%%%%%%%%%%%  STANDARD PART  %%%%%%%%%%%%
    64 %% select different modes,  RUN, parameter input, BATCH
    65 % BATCH  case: read the xml file for batch case
     50
     51%% read input parameters from an xml file if input is a file name (batch mode)
     52checkrun=1;
    6653if ischar(Param)
    67         Param=xml2struct(Param);
    68         checkrun=0;
    69 % RUN case: parameters introduced as the input structure Param
    70 else
    71     if isfield(Param,'Specific')&& strcmp(Param.Specific,'?')
    72         checkrun=1;% will only search interactive input parameters (preparation of BATCH mode)
    73     else
    74         checkrun=2; % indicate the RUN option is used
    75     end
    76     hseries=guidata(Param.hseries);%handles of the GUI series
     54    Param=xml2struct(Param);% read Param as input file (batch case)
     55    checkrun=0;
    7756end
    78 ParamOut=Param; %default output
    79 %OutputDir=[Param.OutputSubDir Param.OutputDirExt];NO OUTPUT FILE
    80    
     57
    8158%% root input file(s) and type
    8259RootPath=Param.InputTable(:,1);
     
    126103        Tabchar{4}=FileInfo.ImageType;
    127104        Tabchar{5}=['  compression' FileInfo.VideoCompression];
    128         Tabchar{6}=[ 'quality ' num2str(FileInfo.Quality)];   
     105        Tabchar{6}=[ 'quality ' num2str(FileInfo.Quality)];
    129106    else
    130107        Tabchar={};
     
    135112            datnum=zeros(1,nbfield_j);
    136113            for ifile=1:nbfield_i
    137                 stopstate=get(hseries.RUN,'BusyAction');
     114                if checkrun
     115                    stopstate=get(Param.RUNHandle,'BusyAction');
     116                    update_waitbar(Param.WaitbarHandle,ifile/nbfield_i)
     117                else
     118                    stopstate='queue';
     119                end
    138120                if isequal(stopstate,'queue')% enable STOP command
    139                     update_waitbar(hseries.Waitbar,ifile/nbfield_i)         
    140121                    file=filecell{iview,index_slice(ifile)};
    141122                    [Path,Name,ext]=fileparts(file);
     
    148129                            datnum(ifile)=datfile.datenum;
    149130                            filefound(ifile)={datfile.name};
    150                         end                     
     131                        end
    151132                        lastfield='';
    152133                        [FileType{iview},FileInfo,Object]=get_file_type(file);
    153134                        if strcmp(FileType{iview},'civx')||strcmp(FileType{iview},'civdata')
    154135                            if isfield(FileInfo,'CivStage')
    155                             liststage={'civ1','fix1','patch1','civ2','fix2','patch2'};
    156                             lastfield=liststage{FileInfo.CivStage};
     136                                liststage={'civ1','fix1','patch1','civ2','fix2','patch2'};
     137                                lastfield=liststage{FileInfo.CivStage};
    157138                            end
    158139                        end
    159                         lastfield=[FileType{iview} ', ' lastfield];                   
     140                        lastfield=[FileType{iview} ', ' lastfield];
    160141                    end
    161142                    Tabchar(1,i_slice)={['slice #' num2str(i_slice)]};
     
    168149                message=['no set of ' num2str(NbSlice) ' (NbSlices) files found'];
    169150            else
    170                  message='no file found';
     151                message='no file found';
    171152            end
    172153        else
     
    177158            message={['oldest modification:  ' filefound{ind} ' : ' datestr(first)];...
    178159                ['latest modification:  ' filefound{indlast} ' : ' datestr(last)]};
    179         end 
     160        end
    180161        if ~isempty(Tabchar)
    181           Tabchar=reshape(Tabchar,NbSlice*(nbfield_i+1),1);
     162            Tabchar=reshape(Tabchar,NbSlice*(nbfield_i+1),1);
    182163        end
    183164    end
Note: See TracChangeset for help on using the changeset viewer.