Changeset 392 for trunk/src/series


Ignore:
Timestamp:
Apr 24, 2012, 10:40:31 AM (12 years ago)
Author:
sommeria
Message:

bugs corrected for phys ort other transform functions

Location:
trunk/src/series
Files:
2 edited

Legend:

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

    r381 r392  
    5151[filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
    5252
    53 %% coordinate transform or other user defined transform (TODO: case BATCH ?)
    54 transform_fct='';%default
    55 if isfield(Param,'transform_fct') % transform function handle
    56     transform_fct=Param.transform_fct;
    57 end
    58 
    5953%% projection object
    6054test_object=get(hseries.GetObject,'Value');
     
    6357    %ProjObject=read_set_object(guidata(hset_object));
    6458    ProjObject=read_GUI(hset_object);
    65     %answeryes=questdlg({['field series projected on ' Series.ProjObject.Style]});
    6659    answeryes=msgbox_uvmat('INPUT_Y-N',['field series projected on ' ProjObject.Style ' before averaging']);
    6760    if ~isequal(answeryes,'Yes')
     
    138131%% number of slices
    139132NbSlice=Param.IndexRange.NbSlice;
    140 NbSlice_name=num2str(NbSlice);
    141133
    142134%% Field and velocity type (the same for the two views)
     
    157149           return
    158150        end
    159         %hhget_field=guidata(hget_field);%handles of GUI elements in get_field
    160151        SubField=read_get_field(hget_field); %read the names of the variables to plot in the get_field GUI
    161152    end
     
    164155%% get the velocity type
    165156testcivx=0;
    166 % FileExt=get(hseries.FileExt,'String');
    167157if ~isequal(FieldName,{'get_field...'})
    168158    testcivx=isequal(FileType{1},'netcdf');
     
    223213end
    224214
    225 %% check coincidence in time
     215%% check coincidence in time for several input file series
    226216multitime=0;
    227217if isempty(timecell)
     
    249239    end   
    250240end
    251 if size(time,2) < i2_series{1}(end) || size(time,3) < num_j2{1}(end)% ime array absent or too short in ImaDoc xml file'
     241if size(time,2) < i2_series{1}(end) || size(time,3) < num_j2{1}(end)% time array absent or too short in ImaDoc xml file'
    252242    time=[];
    253243end
     
    269259        %NomTypeOut=nomtype2pair(Param.InputTable{1,4},i2_series{end}(end)-i1_series{1}(1),j2_series{end}(end)-j1_series{1}(1));
    270260        NomTypeOut='_1-2';
    271 %         RootPath,SubDir,RootFile,FileExt,NomType,i1,i2,j1,j2)
    272         fileresult{1}=fullfile_uvmat(RootPath{1},subdir_result,RootFile{1},ext_out,NomTypeOut,i1_series{1}(1),[],[],[]);
    273 %         fileresult{1}=name_generator(filebase_out,i1_series{1}(1),j1_series{1}(1),ext_out,NomTypeOut,1,i2_series{end}(end),j2_series{end}(end),subdir_result);
     261        fileresult{1}=fullfile_uvmat(RootPath{1},subdir_result,RootFile{1},ext_out,NomTypeOut,i1_series{1}(1),i1_series{1}(end),[],[]);
    274262        testexist=exist(fileresult{1},'file');
    275263    else % simplified indexing with i_slice for multiple slices
     
    277265        for i_slice=1:NbSlice
    278266            fileresult{1}=fullfile_uvmat(RootPath{1},subdir_result,RootFile{1},ext_out,NomTypeOut,i_slice,[],[],[]);
    279             %fileresult{i_slice}=name_generator(filebase_out,i_slice,[],ext_out,'_1',1,i_slice,[],subdir_result);
    280267            if exist(fileresult{i_slice},'file')
    281268                testexist=1;
     
    303290%% coordinate transform or other user defined transform
    304291transform_fct='';%default
    305 if isfield(Param,'FieldTransform')&&isfield(Param.FieldTransform,'transform_fct')
    306     transform_fct=Param.FieldTransform.transform_fct;
     292if isfield(Param,'FieldTransform')&&isfield(Param.FieldTransform,'fct_handle')
     293    transform_fct=Param.FieldTransform.fct_handle;
    307294end
    308295
     
    329316            % reading input file(s)
    330317            for iview=1:nbview
    331 %                 [filename]=...
    332 %                     name_generator(filebase{iview},num_i1{iview}(ifile),num_j1{iview}(ifile),FileExt{iview},NomType{iview},1,num_i2{iview}(ifile),j2_series{iview}(ifile),SubDir{iview});
    333318                    filename=filecell{iview,index};
    334319                    if ~isequal(FileType{iview},'netcdf')
     
    442427    end
    443428    if isempty(time) % time read from files  prevails
    444         time_end=[];
    445429        if isfield(Field,'Time')
    446430            time_end=Field.Time(1);%last time read
     
    490474%% reproduce ImaDoc/GeometryCalib for image series
    491475if isfield(XmlData{1},'GeometryCalib') && ~isempty(XmlData{1}.GeometryCalib)
    492     [pp,RootFile]=fileparts(filebase_out);
    493     outputxml=fullfile(pathdir,[RootFile '.xml'])
     476    [tild,RootFile]=fileparts(filebase_out);
     477    outputxml=fullfile(pathdir,[RootFile '.xml']);
    494478    errormsg=update_imadoc(XmlData{1}.GeometryCalib,outputxml);% introduce the calibration data in the xml file
    495479    if strcmp(errormsg,'')
  • trunk/src/series/time_series.m

    r381 r392  
    4343[filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
    4444
    45 
    46 %% coordinate transform or other user defined transform (TODO: case BATCH ?)
     45%% coordinate transform or other user defined transform
    4746transform_fct='';%default
    48 if isfield(Param,'transform_fct') % transform function handle
    49     transform_fct=Param.transform_fct;
     47if isfield(Param,'FieldTransform')&&isfield(Param.FieldTransform,'fct_handle')
     48    transform_fct=Param.FieldTransform.fct_handle;
    5049end
    5150
Note: See TracChangeset for help on using the changeset viewer.