next up previous contents
Next: ``Incorrectly'': using lattice functions Up: Tracking the beam sizes Previous: Tracking the beam sizes   Contents


``Correctly'': Routine extract_beam_sizes

The example tracks the equilibrium beam sizes computed in section 6.2. The routine

 extract_beam_sizes(xs,nf%s_ij0,sizes) \end{verbatim}
 uses  \eq{benv} where
%
%]|Expr|[#b @`b___}(#" Helvetica|: ;bP8&c0!*,D$^"!Symbol^:!&c0  S|
%|_^""*|:"&c0!*0: ,D}]|[
${\Sigma}^{0}$
is {\tt nf\%s\_ij0}, 
%
%]|Expr|[#b @`b___})## b'4" Helvetica|: ;bP8&c0!*,D$^"!Symbol^:!&c0  S|
%|_^""*|:"&c0!*f: ,D}& b!( b"0 b#8 b$@ b%H b&P!WW}]|[
${\Sigma}^{f}$ is {\tt sizes} and the $E$ is contained in the probe\_8 {\tt xs}. 


\begin{verbatim}
!!!!!!!!!!   Tracking a probe_8 to beam sizes around the ring  !!!!!!!!!!
 call kanalnummer(mf,"beam_xx_inf.dat")
 
 state=default0+radiation0+envelope0
 xs0=x     ! closed orbit intializing a probe
 m=1       ! damapspin set to identity
 xs=xs0+m  ! Probe_8 = closed orbit probe + Identity
 
  p=>als%start 

  call extract_beam_sizes(xs,nf%s_ij0,sizes)
  write(mf,*) p%mag%name, sizes(1,1)

do i=1,als%n
 call track_probe(als,xs,state,fibre1=i,fibre2=i+1) 
 call extract_beam_sizes(xs,nf%s_ij0,sizes) 
 p=>p%next
 write(mf,*) p%mag%name, sizes(1,1)
enddo
close(mf)
!!!!!!!!!!   Tracking a probe_8 to beam sizes around the ring using emittances  !!!!!!!!!!



Frank Schmidt 2010-10-15