Changeset 236 for trunk/src/proj_field.m
- Timestamp:
- Apr 12, 2011, 12:12:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/proj_field.m
r231 r236 1189 1189 end 1190 1190 elseif isequal(ObjectData.ProjMode,'interp')||isequal(ObjectData.ProjMode,'filter')%interpolate data on a regular grid 1191 if isequal(ObjectData.ProjMode,'filter') 1192 rho=1000;%smoothing parameter, (small for strong smoothing) 1193 else 1194 rho=0; 1195 end 1191 1196 coord_x_proj=XMin:DX:XMax; 1192 1197 coord_y_proj=YMin:DY:YMax; … … 1225 1230 eval(['FieldData.' VarName '=FieldData.' VarName '(indsel);']) 1226 1231 end 1227 eval(['ProjData.' VarName '=griddata_uvmat(double(coord_X),double(coord_Y),double(FieldData.' VarName '),coord_x_proj,coord_y_proj'' );'])1232 eval(['ProjData.' VarName '=griddata_uvmat(double(coord_X),double(coord_Y),double(FieldData.' VarName '),coord_x_proj,coord_y_proj'',rho);']) 1228 1233 eval(['varline=reshape(ProjData.' VarName ',1,length(coord_y_proj)*length(coord_x_proj));']) 1229 1234 FFlag= isnan(varline); %detect undefined values NaN … … 1394 1399 ProjData=FieldData;% no change by projection 1395 1400 else 1396 test_direct 1397 indY=NbDim-1 1401 indY=NbDim-1; 1398 1402 if test_direct(indY) 1399 1403 min_indy=ceil((YMin-Coord{indY}(1))/DYinit)+1; … … 1402 1406 Ybound(2)=Coord{indY}(1)+DYinit*(max_indy-1); 1403 1407 else 1404 min_indy=ceil((Coord{indY}(1)-YMax)/DYinit)+1 1405 max_indy=floor((Coord{indY}(1)-YMin)/DYinit)+1 1406 Ybound(2)=Coord{indY}(1)-DYinit*(max_indy-1) 1407 Ybound(1)=Coord{indY}(1)-DYinit*(min_indy-1) 1408 min_indy=ceil((Coord{indY}(1)-YMax)/DYinit)+1; 1409 max_indy=floor((Coord{indY}(1)-YMin)/DYinit)+1; 1410 Ybound(2)=Coord{indY}(1)-DYinit*(max_indy-1); 1411 Ybound(1)=Coord{indY}(1)-DYinit*(min_indy-1); 1408 1412 end 1409 1413 if test_direct(NbDim)==1 … … 1423 1427 if test90y 1424 1428 ind_new=[3 2 1]; 1425 DimCell={AYProjName,AXProjName} 1429 DimCell={AYProjName,AXProjName}; 1426 1430 % DimValue=DimValue(ind_new); 1427 1431 iz=ceil((ObjectData.Coord(1,1)-Coord{3}(1))/DX)+1; … … 1568 1572 ProjData 1569 1573 ProjData.VarDimName{3} 1574 1570 1575 %----------------------------------------------------------------- 1571 1576 %projection in a volume
Note: See TracChangeset
for help on using the changeset viewer.