Home > atplot > plotfunctions > plot_betabeat.m

plot_betabeat

PURPOSE ^

function plot_betabeat(THERING_ref,THERING_mod)

SYNOPSIS ^

function bbeat=plot_betabeat(THERING_ref,THERING_mod)

DESCRIPTION ^

function plot_betabeat(THERING_ref,THERING_mod)

 returns plot of beta beat of THERING_mod respect to THERING_ref

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function bbeat=plot_betabeat(THERING_ref,THERING_mod)
0002 %function plot_betabeat(THERING_ref,THERING_mod)
0003 %
0004 % returns plot of beta beat of THERING_mod respect to THERING_ref
0005 
0006 % check that it is the same lattice
0007 
0008 indx=1:length(THERING_ref);
0009 
0010 if length(THERING_mod) == length(THERING_ref)
0011     
0012     Tr=twissring(THERING_ref,0,indx);
0013     Tm=twissring(THERING_mod,0,indx);
0014     
0015     br=cat(1,Tr.beta);
0016     bm=cat(1,Tm.beta);
0017     
0018     bbeat(1)=plot(findspos(THERING_ref,indx),(bm(:,1)-br(:,1))./br(:,1),'.-b');
0019 hold on;
0020    bbeat(2)=plot(findspos(THERING_ref,indx),(bm(:,2)-br(:,2))./br(:,2),'.-r');
0021 
0022 else
0023     error('Not the same lattice');
0024 end
0025 
0026 return
0027 
0028

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