Changeset 912 for trunk/src/proj_field.m
 Timestamp:
 Jun 16, 2015, 8:15:10 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/proj_field.m
r908 r912 1010 1010 end 1011 1011 1012 %% interpolation range 1013 thresh2=[]; 1014 if isfield(ObjectData,'RangeInterp') 1015 thresh2=ObjectData.RangeInterp*ObjectData.RangeInterp;%square of interpolation range (do not interpolate beyond this range) 1016 end 1017 1012 1018 %% initiate Matlab structure for physical field 1013 1019 [ProjData,errormsg]=proj_heading(FieldData,ObjectData); … … 1303 1309 Disty=G(XI,YI)YI;% diff of y coordinates with the nearest measurement point 1304 1310 Dist=Distx.*Distx+Disty.*Disty; 1305 for ivar=1:numel(VarVal) 1306 VarVal{ivar}(Dist>16*ProjData.CoordMesh)=NaN;% % put to NaN interpolated positions further than 4 meshes from initial data 1307 end 1308 1311 if ~isempty(thresh2) 1312 for ivar=1:numel(VarVal) 1313 VarVal{ivar}(Dist>thresh2)=NaN;% % put to NaN interpolated positions further than 4 meshes from initial data 1314 end 1315 end 1309 1316 if isfield(CellInfo{icell},'CheckSub') && CellInfo{icell}.CheckSub && ~isempty(vector_x_proj) 1310 1317 ProjData.(FieldData.ListVarName{vector_x_proj})=ProjData.(FieldData.ListVarName{vector_x_proj})VarVal{1}; … … 1358 1365 for ilist=1:numel(ListVarName)% reshape data, excluding coordinates (ilist=12), TODO: rationalise 1359 1366 VarName=ListVarName{ilist}; 1367 VarDimName{ilist}={'coord_y','coord_x'}; 1360 1368 ProjData.(VarName)=DataOut.(VarName); 1361 ProjData.(VarName)(Dist>16*ProjData.CoordMesh)=NaN;% put to NaN interpolated positions further than 4 meshes from initial data 1362 VarDimName{ilist}={'coord_y','coord_x'}; 1369 if ~isempty(thresh2) 1370 ProjData.(VarName)(Dist>thresh2)=NaN;% put to NaN interpolated positions further than RangeInterp from initial data 1371 end 1363 1372 end 1364 1373 end
Note: See TracChangeset
for help on using the changeset viewer.