0001 function [X,Y,T]=GetMisalignments(THERING,varargin)
0002
0003
0004
0005 if numel(varargin)==1
0006 indxerrors=varargin{1};
0007 else
0008 indxerrors=1:length(THERING);
0009 end
0010
0011 X=zeros(size(indxerrors));
0012 Y=zeros(size(indxerrors));
0013 t1=findcells(THERING(indxerrors),'T1');
0014 if ~isempty(t1)
0015 X(t1)=-getcellstruct(THERING(indxerrors),'T1',t1,1);
0016 Y(t1)=-getcellstruct(THERING(indxerrors),'T1',t1,3);
0017 end
0018
0019 T=zeros(size(indxerrors));
0020
0021 tiltedelem=[findcells(THERING(indxerrors),'Tilt')];
0022 rotelem=[findcells(THERING(indxerrors),'RotAboutS')];
0023
0024 if ~isempty(tiltedelem) || ~isempty(rotelem)
0025
0026 T(tiltedelem)=getcellstruct(THERING(indxerrors),'Tilt',tiltedelem);
0027 T(rotelem)=getcellstruct(THERING(indxerrors),'RotAboutS',rotelem);
0028 T(T<1e-7 & T>-1e-7)=0;
0029 end