Home > at > atphysics > mcf2.m

mcf2

PURPOSE ^

MCF2(RING) calculates momentum compaction factor of RING versus energy

SYNOPSIS ^

function a = mcf2(RING,delta)

DESCRIPTION ^

MCF2(RING) calculates momentum compaction factor of RING versus energy
shift

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function a = mcf2(RING,delta)
0002 %MCF2(RING) calculates momentum compaction factor of RING versus energy
0003 %shift
0004 %
0005 %
0006 
0007 %
0008 % Modified by Laurent S. Nadolski
0009 
0010 if nargin < 1 
0011     error('Syntax is mcf2(RING)');
0012 elseif ~iscell(RING)
0013     error('argument is not a AT RING')
0014 end
0015 
0016 dP = 0.000001;
0017 fp0 = findorbit4(RING,0+delta);
0018 fp = findorbit4(RING,dP+delta);
0019 % Build initial condition vector that starts
0020 % on the fixed point
0021 X0dP = fp;
0022 X0dP(5) = dP+delta;
0023 X0dP(6) = 0;
0024 
0025 X0 = [fp0;delta;0];
0026 
0027 % Track X0 for 1 turn
0028 T = ringpass(RING,[X0 X0dP]);
0029 % Calculate alpha
0030 RingLength = findspos(RING,length(RING)+1);
0031 a = (T(6,2)-T(6,1))/(dP*RingLength);
0032

Generated on Mon 21-May-2007 15:26:45 by m2html © 2003