Changeset 550


Ignore:
Timestamp:
Oct 11, 2012, 10:07:12 AM (9 years ago)
Author:
sommeria
Message:

merge_proj updated to account for new format in field transform (variable nbre of input parma)

Location:
trunk/src/series
Files:
2 edited

Legend:

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

    r522 r550  
    8080end
    8181ParamOut=Param; %default output
     82if ~isfield(Param,'InputFields')
     83    Param.InputFields.FieldName='';
     84end
    8285OutputSubDir=[Param.OutputSubDir Param.OutputDirExt];
    8386
     
    210213            %transform the input field (e.g; phys) if requested
    211214            if ~isempty(transform_fct)
    212                 Data{iview}=transform_fct(Data{iview},XmlData{iview});  %transform to phys if requested
     215                switch nargin(transform_fct)
     216                    case {2,3,4}
     217                       Data{iview}=transform_fct(Data{iview},XmlData{iview});
     218                    case 1
     219                        Data{iview}=transform_fct(Data{iview});
     220                end
    213221            end
    214222           
     
    311319            GeometryCal.Tx_Ty_Tz=[T_x T_y 1];
    312320            ImaDoc.GeometryCalib=GeometryCal;
    313             t=struct2xml(ImaDoc);
    314             t=set(t,1,'name','ImaDoc');
    315             save(t,[filebase_merge '.xml'])
    316             display([filebase_merge '.xml saved'])
     321%             t=struct2xml(ImaDoc);
     322%             t=set(t,1,'name','ImaDoc');
     323%             save(t,[filebase_merge '.xml'])
     324%             display([filebase_merge '.xml saved'])
    317325        else
    318326            MergeData.ListGlobalAttribute={'Conventions','Project','InputFile_1','InputFile_end','nb_coord','nb_dim','dt','Time','civ'};
  • trunk/src/series/time_series.m

    r536 r550  
    350350                    end
    351351                elseif testsum(ivar)==1% variable representing fixed coordinates
    352                     eval(['VarInit=DataOut.' VarName ';']);
     352                    VarInit=DataOut.(VarName);
    353353                    if isempty(errormsg) && ~isequal(VarVal,VarInit)
    354354                        displ_uvmat('ERROR',['time series requires constant coordinates ' VarName],checkrun)
Note: See TracChangeset for help on using the changeset viewer.