Skip to content

Commit

Permalink
Rewrite formula for time in exact drift for better numerical precision
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Scott Berg committed Jun 17, 2022
1 parent 8bd441f commit b3570fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/twiss.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7228,7 +7228,7 @@ SUBROUTINE tmdrf(fsec,ftrk,orbit,fmap,dl,ek,re,te)

orbit(1) = orbit(1) + px*l_pz
orbit(3) = orbit(3) + py*l_pz
orbit(5) = orbit(5) + (dl/beta - (1d0/beta + pt) * l_pz)
orbit(5) = orbit(5) + l_pz*(pt*(2*beti+pt)/(gamma*gamma) - px2 - py2)/(beta*beta*(ptb + beti*pz))
else

re(1,2) = dl
Expand Down

0 comments on commit b3570fa

Please sign in to comment.