Changeset 751 for trunk


Ignore:
Timestamp:
Apr 24, 2014, 8:46:31 AM (7 years ago)
Author:
sommeria
Message:

add aver_synchro (field analysis at different frequencies) and turb_stat

Location:
trunk/src/series
Files:
2 added
2 edited

Legend:

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

    r716 r751  
    9797NomType=Param.InputTable(:,4);
    9898FileExt=Param.InputTable(:,5);
     99hdisp=disp_uvmat('WAITING...','checking the file series',checkrun);
    99100[filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
     101if ~isempty(hdisp),delete(hdisp),end;
    100102%%%%%%%%%%%%
    101103% The cell array filecell is the list of input file names, while
  • trunk/src/series/time_series.m

    r736 r751  
    6868        msgbox_uvmat('WARNING',['the first input file ' FirstFileName ' does not exist'])
    6969    elseif isequal(size(Param.InputTable,1),1) && ~isfield(Param,'ProjObject')
    70         msgbox_uvmat('WARNING','a projection object  needs to be introduced for time_series')
     70        msgbox_uvmat('WARNING','a projection object may be needed to select points for the time_series')
    7171    end
    7272    return
     
    9494NomType=Param.InputTable(:,4);
    9595FileExt=Param.InputTable(:,5);
     96hdisp=disp_uvmat('WAITING...','checking the file series',checkrun);
    9697[filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
     98if ~isempty(hdisp),delete(hdisp),end;
    9799%%%%%%%%%%%%
    98100% The cell array filecell is the list of input file names, while
     
    268270        end
    269271       
    270         % calculate tps coefficients if needed
    271         if isfield(Param.ProjObject,'ProjMode')&& strcmp(Param.ProjObject.ProjMode,'interp_tps')
    272             Field=tps_coeff_field(Field,check_proj_tps);
    273         end
    274        
    275         %field projection on an object
     272        %field projection on an object
    276273        if Param.CheckObject
     274            % calculate tps coefficients if needed
     275            if isfield(Param.ProjObject,'ProjMode')&& strcmp(Param.ProjObject.ProjMode,'interp_tps')
     276                Field=tps_coeff_field(Field,check_proj_tps);
     277            end
    277278            [Field,errormsg]=proj_field(Field,Param.ProjObject);
    278279            if ~isempty(errormsg)
     
    291292            end
    292293            DataOut=Field;%default
    293             DataOut.NbDim=Field.NbDim+1; %add the time dimension for plots
     294%             DataOut.NbDim=Field.NbDim+1; %add the time dimension for plots
    294295            nbvar=length(Field.ListVarName);
    295296            if nbvar==0
     
    310311                            eval(['DataOut=rmfield(DataOut,''' Field.ListVarName{ivar} ''');']);%remove variable
    311312                        end
    312                         if isequal(var_role,'coord_x')| isequal(var_role,'coord_y')|...
    313                                 isequal(var_role,'coord_z')|isequal(var_role,'coord')
     313                        if strcmp(var_role,'coord_x')||strcmp(var_role,'coord_y')||strcmp(var_role,'coord_z')||strcmp(var_role,'coord')
    314314                            testsum(ivar)=1; %constant coordinates, record without time evolution
    315315                        end
     
    339339            if testsum(ivar)==2% test for recorded variable
    340340                if isempty(errormsg)
    341                     if isequal(Param.ProjObject.ProjMode,'inside')% take the average in the domain for 'inside' mode
     341                    if Param.CheckObject && strcmp(Param.ProjObject.ProjMode,'inside')% take the average in the domain for 'inside' projection mode
    342342                        if isempty(VarVal)
    343343                            disp_uvmat('ERROR',['empty result at frame index ' num2str(i1_series{iview}(index))],checkrun)
     
    394394% add time dimension
    395395for ivar=1:length(Field.ListVarName)
    396     DimCell=Field.VarDimName(ivar);
    397     if testsum(ivar)==2%variable used as time series
     396    DimCell=Field.VarDimName{ivar};
     397    if ischar(DimCell),DimCell={DimCell};end
     398    if testsum(ivar)==2% variable for which time series is calculated
    398399        DataOut.VarDimName{ivar}=[{'Time'} DimCell];
    399     elseif testsum(ivar)==1
     400    elseif testsum(ivar)==1 % variable represneting a fixed coordinate
    400401        DataOut.VarDimName{ivar}=DimCell;
    401402    end
Note: See TracChangeset for help on using the changeset viewer.