Home > atphysics > LinearOptics > beam44.m

beam44

PURPOSE ^

BEAM44 computes the coupled beam matrices

SYNOPSIS ^

function [beam1,beam2,tune1,tune2] = beam44(A,B,C,gamma)

DESCRIPTION ^

BEAM44 computes the coupled beam matrices

[BEAM1,BEAM2]=BEAM44(A,B,C,GAMMA)
 A,B,C,gamma: Coupling parameters, see [1]
 BEAM1,BEAM2: Eigen modes

[BEAM1,BEAM2]=BEAM44(LINDATA)
 LINDATA: structure with fields A,B,C,gamma

[BEAM1,BEAM2,TUNE1,TUNE1]=BEAM44(...)
 also returns the tunes

[1] Sagan, Rubin, "Linear Analysis of Coupled Lattices"
    Phys.Rev.Spec.Top. - Accelerators and Beams, vol2, 1999

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [beam1,beam2,tune1,tune2] = beam44(A,B,C,gamma)
0002 %BEAM44 computes the coupled beam matrices
0003 %
0004 %[BEAM1,BEAM2]=BEAM44(A,B,C,GAMMA)
0005 % A,B,C,gamma: Coupling parameters, see [1]
0006 % BEAM1,BEAM2: Eigen modes
0007 %
0008 %[BEAM1,BEAM2]=BEAM44(LINDATA)
0009 % LINDATA: structure with fields A,B,C,gamma
0010 %
0011 %[BEAM1,BEAM2,TUNE1,TUNE1]=BEAM44(...)
0012 % also returns the tunes
0013 %
0014 %[1] Sagan, Rubin, "Linear Analysis of Coupled Lattices"
0015 %    Phys.Rev.Spec.Top. - Accelerators and Beams, vol2, 1999
0016 
0017 if isstruct(A)
0018    [beam1,beam2,tune1,tune2]=beam44(A.A,A.B,A.C,A.gamma);
0019 else
0020    S2=[0 1;-1 0];
0021    g=[gamma 0;0 gamma];
0022    v=[g C;-S2*C'*S2' g];
0023    [beama,tune1]=beam22(A);
0024    [beamb,tune2]=beam22(B);
0025    beam1=v*[beama zeros(2,2);zeros(2,4)]*v';
0026    beam2=v*[zeros(2,4);zeros(2,2) beamb]*v';
0027 end
0028 end
0029

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