Home > atplot > plotfunctions > plEmitContrib.m

plEmitContrib

PURPOSE ^

plots H/rho³ at every dipole

SYNOPSIS ^

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

DESCRIPTION ^

 plots H/rho³ at every dipole

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function plotdata=plEmitContrib(lindata,ring,dpp,varargin)
0002 % plots H/rho³ at every dipole
0003 
0004 idx=cat(1,lindata.ElemIndex);
0005 H=CurlyH(ring,dpp,idx(:)');
0006 
0007 r=zeros(size(H));
0008 bend=findcells(ring,'BendingAngle');
0009 r(bend)=getcellstruct(ring,'Length',bend)./getcellstruct(ring,'BendingAngle',bend);
0010 emitcontr=H./(r.^3)*1e9;
0011 emitcontr(isinf(emitcontr))=0;
0012 
0013 beta=cat(1,lindata.beta);                     % left axis
0014 plotdata(1).values=beta;
0015 plotdata(1).labels={'\beta_x','\beta_z'};
0016 plotdata(1).axislabel='\beta [m]';
0017 
0018 dispersion=cat(2,lindata.Dispersion)'; % right axis
0019 plotdata(2).values=[dispersion(:,1)*100 emitcontr H*10000];
0020 plotdata(2).labels={'\eta_x cm','H/r^{3}*1e9','H 10-4'};
0021 plotdata(2).axislabel='dispersion [cm]';
0022 
0023 end

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