henon.py 618 B

1234567891011121314151617181920212223
  1. from pytpsa import *
  2. setorder(4)
  3. drift=polmap(x='x+l*px',px='px')
  4. quad1=polmap(x='x',px='px+k1*x')
  5. quad2=polmap(x='x',px='px+k2*x')
  6. sext=polmap(x='x',px='px+k3*x**2')
  7. oneturn=drift*quad1*drift*quad2
  8. oneturn.trace()
  9. drift=polmap(x='x+l*px',px='px',y='y+l*py',py='py')
  10. quad1=polmap(x='x',px='px+k1*x',y='y',py='py-k1*y')
  11. quad2=polmap(x='x',px='px+k2*x',y='y',py='py-k2*y')
  12. sext=polmap( x='x',px='px+k3*(x**2-y**2)',y='y',py='py-k3*y*x')
  13. oneturn=drift*quad1*drift*quad2
  14. oneturn.trace()
  15. [ sum([oneturn[i].divterm(i) for i in 'x px'.split()]) for j in ['x px','y py'] ]
  16. oneturn=oneturn(l=1,k1=0.1,k2=-0.12,k3=0.001)