Changeset 93 for trunk/src/transform_field/phys_polar.m
 Timestamp:
 May 27, 2010, 7:25:58 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/transform_field/phys_polar.m
r40 r93 28 28 end 29 29 test_1=0; 30 if nargin==4 30 if nargin==4% case of two input fields 31 31 test_1=1; 32 32 Data_1=varargin{3}; … … 65 65 66 66 iscalar=0; 67 %transform first field to cartesian phys coordiantes 67 68 if ~isempty(Calib{1}) 68 69 DataOut=phys_1(Data,Calib{1},origin_xy,radius_offset,angle_offset,angle_scale); … … 80 81 end 81 82 end 82 83 %transform second field (if exists) to cartesian phys coordiantes 83 84 if test_1 84 85 DataOut_1=phys_1(Data_1,Calib{2},origin_xy,radius_offset,angle_offset,angle_scale); … … 153 154 DataOut.V=(UX.*sin(theta)+VY.*cos(theta));%./(DataOut.X)%+radius_ref);%angular velocity calculated 154 155 %shift and renormalize the angular velocity 156 end 157 end 158 %transform of spatial derivatives 159 if isfield(Data,'X') && ~isempty(Data.X) && isfield(Data,'DjUi') && ~isempty(Data.DjUi)... 160 && isfield(Data,'dt') 161 if ~isempty(Data.dt) 162 % estimate the Jacobian matrix DXpx/DXphys 163 for ip=1:length(Data.X) 164 [Xp1,Yp1]=phys_XYZ(Calib,Data.X(ip)+0.5,Data.Y(ip),Z); 165 [Xm1,Ym1]=phys_XYZ(Calib,Data.X(ip)0.5,Data.Y(ip),Z); 166 [Xp2,Yp2]=phys_XYZ(Calib,Data.X(ip),Data.Y(ip)+0.5,Z); 167 [Xm2,Ym2]=phys_XYZ(Calib,Data.X(ip),Data.Y(ip)0.5,Z); 168 %Jacobian matrix DXpphys/DXpx 169 DjXi(1,1)=(Xp1Xm1); 170 DjXi(2,1)=(Yp1Ym1); 171 DjXi(1,2)=(Xp2Xm2); 172 DjXi(2,2)=(Yp2Ym2); 173 DjUi(:,:)=Data.DjUi(ip,:,:); 174 DjUi=(DjXi*DjUi')/DjXi;% =J1*M*J , curvature effects (derivatives of J) neglected 175 DataOut.DjUi(ip,:,:)=DjUi'; 176 end 177 DataOut.DjUi = DataOut.DjUi/Data.dt; % min(Data.DjUi(:,1,1))=DUDX 155 178 end 156 179 end
Note: See TracChangeset
for help on using the changeset viewer.