Changeset 161
- Timestamp:
- Dec 23, 2010, 8:53:48 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/transform_field/phys_polar.m
r157 r161 113 113 end 114 114 115 116 117 115 118 %------------------------------------------------ 116 119 function DataOut=phys_1(Data,Calib,origin_xy,radius_offset,angle_offset,angle_scale) 117 120 118 121 DataOut=Data; 119 DataOut.Coord Type='phys'; %put flag for physical coordinates120 if isfield(Calib,' CoordUnit')121 DataOut. CoordUnit=Calib.CoordUnit;122 e lse123 DataOut.CoordUnit='cm'; %default 124 end 125 DataOut.TimeUnit='s'; 126 %perform a geometry transform if Calib contains a field .GeometryCalib 127 if isfield(Data,'CoordType') && isequal(Data.CoordType,'px') && ~isempty(Calib) 128 if isfield(Data,'CoordUnit')129 DataOut=rmfield(DataOut,'CoordUnit');130 end122 DataOut.CoordUnit=Calib.CoordUnit; %put flag for physical coordinates 123 if isfield(Calib,'SliceCoord') 124 DataOut.PlaneCoord=Calib.SliceCoord;%to generalise for any plane 125 end 126 127 if isfield(Data,'CoordUnit')%&& isequal(Data.CoordType,'px')&& ~isempty(Calib) 128 if isfield(Calib,'CoordUnit') 129 DataOut.CoordUnit=Calib.CoordUnit; 130 else 131 DataOut.CoordUnit='cm'; %default 132 end 133 DataOut.TimeUnit='s'; 131 134 %transform of X,Y coordinates for vector fields 132 if isfield(Data,'ZIndex') &~isempty(Data.ZIndex)135 if isfield(Data,'ZIndex') && ~isempty(Data.ZIndex)&&~isnan(Data.ZIndex) 133 136 Z=Data.ZIndex; 134 137 else
Note: See TracChangeset
for help on using the changeset viewer.