Changeset 782 for trunk/src/transform_field
- Timestamp:
- Jun 3, 2014, 8:10:03 PM (11 years ago)
- Location:
- trunk/src/transform_field
- Files:
-
- 2 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 %------------------------------------------------ -
trunk/src/transform_field/phys_polar.m
r658 r782 80 80 DataOut=phys_1(Data,Calib{1},origin_xy,radius_offset,angle_offset,angle_scale); 81 81 %case of images or scalar 82 if isfield(Data,'A')&isfield(Data,' AX')&~isempty(Data.AX) & isfield(Data,'AY')&...83 ~isempty(Data. AY)&length(Data.A)>182 if isfield(Data,'A')&isfield(Data,'Coord_x')&~isempty(Data.Coord_x) & isfield(Data,'Coord_y')&... 83 ~isempty(Data.Coord_y)&length(Data.A)>1 84 84 iscalar=1; 85 85 A{1}=Data.A; … … 96 96 if test_1 97 97 DataOut_1=phys_1(Data_1,Calib{2},origin_xy,radius_offset,angle_offset,angle_scale); 98 if isfield(Data_1,'A')&isfield(Data_1,' AX')&~isempty(Data_1.AX) & isfield(Data_1,'AY')&...99 ~isempty(Data_1. AY)&length(Data_1.A)>198 if isfield(Data_1,'A')&isfield(Data_1,'Coord_x')&~isempty(Data_1.Coord_x) & isfield(Data_1,'Coord_y')&... 99 ~isempty(Data_1.Coord_y)&length(Data_1.A)>1 100 100 iscalar=iscalar+1; 101 101 Calib{iscalar}=Calib{2}; … … 105 105 end 106 106 if iscalar==1% case for which only the second field is a scalar 107 [A, AX,AY]=phys_Ima_polar(A,Calib,ZIndex,origin_xy,radius_offset,angle_offset,angle_scale);107 [A,Coord_x,Coord_y]=phys_Ima_polar(A,Calib,ZIndex,origin_xy,radius_offset,angle_offset,angle_scale); 108 108 DataOut_1.A=A{1}; 109 DataOut_1. AX=AX;110 DataOut_1. AY=AY;109 DataOut_1.Coord_x=Coord_x; 110 DataOut_1.Coord_y=Coord_y; 111 111 return 112 112 end … … 114 114 end 115 115 if iscalar~=0 116 [A, AX,AY]=phys_Ima_polar(A,Calib,ZIndex,origin_xy,radius_offset,angle_offset,angle_scale);%116 [A,Coord_x,Coord_y]=phys_Ima_polar(A,Calib,ZIndex,origin_xy,radius_offset,angle_offset,angle_scale);% 117 117 DataOut.A=A{1}; 118 DataOut. AX=AX;119 DataOut. AY=AY;118 DataOut.Coord_x=Coord_x; 119 DataOut.Coord_y=Coord_y; 120 120 if iscalar==2 121 121 DataOut_1.A=A{2}; 122 DataOut_1. AX=AX;123 DataOut_1. AY=AY;122 DataOut_1.Coord_x=Coord_x; 123 DataOut_1.Coord_y=Coord_y; 124 124 end 125 125 end
Note: See TracChangeset
for help on using the changeset viewer.