Ignore:
Timestamp:
Mar 1, 2024, 8:09:20 PM (2 months ago)
Author:
sommeria
Message:

LIF calibration update and extrct_multitif

File:
1 edited

Legend:

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

    r1127 r1129  
    1 %'aver_stat': calculate Reynolds steress components over time series
     1%'aver_stat': calculate Reynolds stress components over time series
    22%------------------------------------------------------------------------
    33% function ParamOut=turb_stat(Param)
     
    8989RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
    9090WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series
    91 
    92 %% define the directory for result file (with path=RootPath{1})
    93 OutputDir=[Param.OutputSubDir Param.OutputDirExt];
    9491   
    9592%% root input file(s) name, type and index series
     
    201198Counter_1=0;
    202199
     200if Param.IndexRange.NbSlice==1
     201    interval=Param.IndexRange.incr_i% statistics is done taking into account the input index increment
     202else
     203    interval=Param.IndexRange.NbSlice;% statistics is done slice by slice without taking into account the input index increment
     204end
     205
    203206%%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%%
    204 % for i_slice=1:Param.IndexRange.NbSlice
    205 %     i_slice
     207for i_slice=1:Param.IndexRange.NbSlice
     208    i_slice
    206209    ind_first=Param.IndexRange.first_i;
    207     for index_i=ind_first:Param.IndexRange.NbSlice:Param.IndexRange.last_i
     210    for index_i=ind_first:interval:Param.IndexRange.last_i
    208211        if ~isempty(RUNHandle)&& ~strcmp(get(RUNHandle,'BusyAction'),'queue')
    209212            disp('program stopped by user')
     
    211214        end
    212215        for index_j=first_j:last_j
    213             InputFile=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},NomType{1},index_i,index_i,index_j,index_j);
    214             [Field,tild,errormsg] = read_field(InputFile,FileType{iview},InputFields{iview});
    215            
    216             %[Field,tild,errormsg] = read_field(filecell{1,index},FileType{iview},InputFields{iview},frame_index{iview}(index));
     216            InputFile=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},NomType{1},index_i,index_i,index_j,index_j)
     217            [Field,tild,errormsg] = read_field(InputFile,FileType{iview},InputFields{iview});       
    217218           
    218219            %%%%%%%%%%%% MAIN RUNNING OPERATIONS  %%%%%%%%%%%%
     
    289290   
    290291    %% writing the result file as netcdf file
    291     OutputFile=fullfile_uvmat(RootPath{1},OutputDir,RootFile{1},FileExtOut,NomTypeOut,ind_first,ind_first,first_j,last_j);
     292    RootPathOut=fullfile(Param.OutputPath,Param.Experiment,Param.Device);
     293    OutputDir=[Param.OutputSubDir Param.OutputDirExt];
     294    OutputFile=fullfile_uvmat(RootPathOut,OutputDir,RootFile{1},FileExtOut,NomTypeOut,ind_first,ind_first,first_j,last_j);
    292295    %case of netcdf input file , determine global attributes
    293296    errormsg=struct2nc(OutputFile,DataOut); %save result file
     
    296299    else
    297300        disp(['error in writting result file: ' errormsg])
    298     end
    299    
    300 % end
     301    end   
     302end
     303
    301304%% open the result file with uvmat (in RUN mode)
    302305if checkrun && isequal(Param.IndexRange.NbSlice,1)
Note: See TracChangeset for help on using the changeset viewer.