Changeset 174 for trunk/src/proj_field.m


Ignore:
Timestamp:
Jan 5, 2011, 9:43:28 AM (14 years ago)
Author:
sommeria
Message:

civ.m : clarification of .cmx : creation of .civ1.cmx and .civ2.cmx
uvmat: reading and projecting volume images (not yet successfull)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/proj_field.m

    r173 r174  
    918918%-----------------------------------------------------------------
    919919
    920 %initialisation of the input parameters of the projection plane
    921 %-----------------------------------------------------------------
     920%% initialisation of the input parameters of the projection plane
    922921ProjMode='projection';%direct projection by default
    923922if isfield(ObjectData,'ProjMode'),ProjMode=ObjectData.ProjMode; end;
     
    948947NormVec_Y=cos(Phi)*sin(Theta);
    949948NormVec_Z=cos(Theta);
    950 
    951 % test for 3D fields
    952 test3D=0;
    953 if isfield(FieldData,'nb_dim')
    954     test3D=isequal(FieldData.nb_dim,3);
    955 end
    956 test3C=test3D; %default 3 vel components
    957949
    958950%mesh sizes DX and DY
     
    12481240        Coord_y=[];
    12491241        Coord_x=[];   
    1250         nb_dim=numel(size(DimValue));
     1242        nb_dim=numel(DimValue);
    12511243        for idim=1:nb_dim %loop on space dimensions
    12521244            test_interp(idim)=0;%test for coordiate interpolation (non regular grid), =0 by default
     
    12961288        if nb_dim==3
    12971289            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));
    12991291            test_direct_z=test_direct(1);
    13001292        end 
     
    13421334        % case with no rotation and interpolation
    13431335        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
    13451337                ProjData=FieldData;
    13461338            else
     
    13671359                    Xbound(1)=Coord{2}(1)+DXinit*(min_ind2-1);
    13681360                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
    13691367                min_ind1=max(min_ind1,1);% deals with margin (bound lower than the first index)
    13701368                min_ind2=max(min_ind2,1);
Note: See TracChangeset for help on using the changeset viewer.