Changeset 782 for trunk/src/transform_field/phys.m
- Timestamp:
- Jun 3, 2014, 8:10:03 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/transform_field/phys.m
r753 r782 71 71 DataOut=phys_1(DataIn,Calib{1},ZIndex);% transform coordiantes and velocity components 72 72 %case of images or scalar: in case of two input fields, we need to project the transform on the same regular grid 73 if isfield(DataIn,'A') && isfield(DataIn,' AX') && ~isempty(DataIn.AX) && isfield(DataIn,'AY')&&...74 ~isempty(DataIn. AY) && length(DataIn.A)>173 if isfield(DataIn,'A') && isfield(DataIn,'Coord_x') && ~isempty(DataIn.Coord_x) && isfield(DataIn,'Coord_y')&&... 74 ~isempty(DataIn.Coord_y) && length(DataIn.A)>1 75 75 iscalar=1; 76 76 A{1}=DataIn.A; … … 117 117 end 118 118 end 119 if isfield(DataIn_1,'A')&&isfield(DataIn_1,' AX')&&~isempty(DataIn_1.AX) && isfield(DataIn_1,'AY')&&...120 ~isempty(DataIn_1. AY)&&length(DataIn_1.A)>1119 if isfield(DataIn_1,'A')&&isfield(DataIn_1,'Coord_x')&&~isempty(DataIn_1.Coord_x) && isfield(DataIn_1,'Coord_y')&&... 120 ~isempty(DataIn_1.Coord_y)&&length(DataIn_1.A)>1 121 121 iscalar=iscalar+1; 122 122 Calib{iscalar}=Calib{2}; … … 127 127 %% transform the scalar(s) or image(s) 128 128 if iscalar~=0 129 [A, AX,AY]=phys_Ima(A,Calib,ZIndex);%TODO : introduire interp2_uvmat ds phys_ima129 [A,Coord_x,Coord_y]=phys_Ima(A,Calib,ZIndex);%TODO : introduire interp2_uvmat ds phys_ima 130 130 if iscalar==1 && ~isempty(DataOut_1) % case for which only the second field is a scalar 131 131 DataOut_1.A=A{1}; 132 DataOut_1. AX=AX;133 DataOut_1. AY=AY;132 DataOut_1.Coord_x=Coord_x; 133 DataOut_1.Coord_y=Coord_y; 134 134 else 135 135 DataOut.A=A{1}; 136 DataOut. AX=AX;137 DataOut. AY=AY;136 DataOut.Coord_x=Coord_x; 137 DataOut.Coord_y=Coord_y; 138 138 end 139 139 if iscalar==2 140 140 DataOut_1.A=A{2}; 141 DataOut_1. AX=AX;142 DataOut_1. AY=AY;141 DataOut_1.Coord_x=Coord_x; 142 DataOut_1.Coord_y=Coord_y; 143 143 end 144 144 end … … 146 146 % subtract fields 147 147 if ~isempty(DataOut_1) 148 DataOut=sub_field(DataOut,[],DataOut_1);148 DataOut=sub_field(DataOut,[],DataOut_1); 149 149 end 150 150 %------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.