Home > atplot > plotfunctions > plSigmaSigmap.m

plSigmaSigmap

PURPOSE ^

SYNOPSIS ^

function plotdata=plSigmaSigmap(lindata,ring,dpp,varargin)

DESCRIPTION ^

 Plots sigmax and sigmay on left axis and 
       sigmax' and sigmay' on right axis

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function plotdata=plSigmaSigmap(lindata,ring,dpp,varargin) 
0002 %
0003 % Plots sigmax and sigmay on left axis and
0004 %       sigmax' and sigmay' on right axis
0005 
0006 pos=1:length(lindata);
0007 
0008 [lin,pm]=atx(ring,dpp,pos); % @ ID (element 1)
0009 
0010 ex=arrayfun(@(x)x.emit44(1),lin);
0011 ey=arrayfun(@(x)x.emit44(2),lin);
0012 
0013 % dx@id
0014 dx=arrayfun(@(x)x.Dispersion(1),lindata);
0015 dxp=arrayfun(@(x)x.Dispersion(2),lindata);
0016 dy=arrayfun(@(x)x.Dispersion(3),lindata);
0017 dyp=arrayfun(@(x)x.Dispersion(4),lindata);
0018 bx=arrayfun(@(x)x.beta(1),lindata);
0019 ax=arrayfun(@(x)x.alpha(1),lindata);
0020 by=arrayfun(@(x)x.beta(2),lindata);
0021 ay=arrayfun(@(x)x.alpha(2),lindata);
0022 
0023 % sigmaX*sigmaXp @ id
0024 
0025 sx=sqrt(bx.*ex+(pm.espread.*dx).^2);
0026 sxp=sqrt((1+ax.^2)./bx.*ex+(pm.espread.*dxp).^2);
0027 sxsxp=sx.*sxp;
0028 
0029 sy=sqrt(by.*ey+(pm.espread.*dy).^2);
0030 syp=sqrt((1+ay.^2)./by.*ey+(pm.espread.*dyp).^2);
0031 sysxp=sy.*syp;
0032 
0033 plotdata(1).values=[sx; sy]';
0034 plotdata(1).labels={'\sigma_{x}','\sigma_{y}'};
0035 plotdata(1).axislabel=' and  [m]';
0036 
0037 plotdata(2).values=[sxp; syp]';
0038 plotdata(2).labels={'\sigma_{x}''','\sigma_{y}'''};
0039 plotdata(2).axislabel=' [m]';
0040 
0041 end

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005