Changeset 174 for trunk/src/proj_field.m
- Timestamp:
- Jan 5, 2011, 9:43:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/proj_field.m
r173 r174 918 918 %----------------------------------------------------------------- 919 919 920 %initialisation of the input parameters of the projection plane 921 %----------------------------------------------------------------- 920 %% initialisation of the input parameters of the projection plane 922 921 ProjMode='projection';%direct projection by default 923 922 if isfield(ObjectData,'ProjMode'),ProjMode=ObjectData.ProjMode; end; … … 948 947 NormVec_Y=cos(Phi)*sin(Theta); 949 948 NormVec_Z=cos(Theta); 950 951 % test for 3D fields952 test3D=0;953 if isfield(FieldData,'nb_dim')954 test3D=isequal(FieldData.nb_dim,3);955 end956 test3C=test3D; %default 3 vel components957 949 958 950 %mesh sizes DX and DY … … 1248 1240 Coord_y=[]; 1249 1241 Coord_x=[]; 1250 nb_dim=numel( size(DimValue));1242 nb_dim=numel(DimValue); 1251 1243 for idim=1:nb_dim %loop on space dimensions 1252 1244 test_interp(idim)=0;%test for coordiate interpolation (non regular grid), =0 by default … … 1296 1288 if nb_dim==3 1297 1289 DZ=abs(DCoord_min(1)); 1298 Coord_z=linspace(Coord{1}(1),Coord{1}(end), npz);1290 Coord_z=linspace(Coord{1}(1),Coord{1}(end),DimValue(1)); 1299 1291 test_direct_z=test_direct(1); 1300 1292 end … … 1342 1334 % case with no rotation and interpolation 1343 1335 if isequal(ProjMode,'projection') && isequal(Phi,0) && isequal(Theta,0) && isequal(Psi,0) 1344 if ~testXMin && ~testXMax && ~testYMin && ~testYMax 1336 if ~testXMin && ~testXMax && ~testYMin && ~testYMax && nb_dim==2 1345 1337 ProjData=FieldData; 1346 1338 else … … 1367 1359 Xbound(1)=Coord{2}(1)+DXinit*(min_ind2-1); 1368 1360 end 1361 if nb_dim==3 %TODO: to update 1362 min_ind3=ceil((Coord{1}(1)-ZMax)/DZinit)+1; 1363 max_ind2=floor((Coord{1}(2)-XMin)/DZinit)+1; 1364 Zbound(2)=Coord{1}(1)+DXinit*(max_ind2-1); 1365 Zbound(1)=Coord{1}(1)+DXinit*(min_ind2-1); 1366 end 1369 1367 min_ind1=max(min_ind1,1);% deals with margin (bound lower than the first index) 1370 1368 min_ind2=max(min_ind2,1);
Note: See TracChangeset
for help on using the changeset viewer.