Skip to content
Snippets Groups Projects
Commit 02a4042b authored by Vadim Gubaidulin's avatar Vadim Gubaidulin
Browse files

- corrected cs_invariant calculation

parent e84462b7
No related branches found
No related tags found
1 merge request!9Emittance calculation
This commit is part of merge request !9. Comments created here will be created in the context of that merge request.
...@@ -318,12 +318,14 @@ class Bunch: ...@@ -318,12 +318,14 @@ class Bunch:
""" """
xb = self['x'] - self['delta'] * self.ring.optics.local_dispersion[0] xb = self['x'] - self['delta'] * self.ring.optics.local_dispersion[0]
yy = self['y'] - self['delta'] * self.ring.optics.local_dispersion[2] yy = self['y'] - self['delta'] * self.ring.optics.local_dispersion[2]
xpb = self['xp'] - self['delta'] * self.ring.optics.local_dispersion[1]
ypb = self['yp'] - self['delta'] * self.ring.optics.local_dispersion[3]
Jx = (self.ring.optics.local_gamma[0] * xb**2) + \ Jx = (self.ring.optics.local_gamma[0] * xb**2) + \
(2*self.ring.optics.local_alpha[0] *xb)*self['xp'] + \ (2*self.ring.optics.local_alpha[0] *xb*xpb) + \
(self.ring.optics.local_beta[0] * self['xp']**2) (self.ring.optics.local_beta[0] * xpb**2)
Jy = (self.ring.optics.local_gamma[1] * yb**2) + \ Jy = (self.ring.optics.local_gamma[1] * yb**2) + \
(2*self.ring.optics.local_alpha[1] * yb*self['yp']) + \ (2*self.ring.optics.local_alpha[1] * yb*ypb) + \
(self.ring.optics.local_beta[1] * self['yp']**2) (self.ring.optics.local_beta[1] * ypb**2)
Js = (self.ring.long_gamma * self['tau']**2) + \ Js = (self.ring.long_gamma * self['tau']**2) + \
(2*self.ring.long_alpha * self['tau']*self['delta']) + \ (2*self.ring.long_alpha * self['tau']*self['delta']) + \
(self.ring.long_beta * self['delta']**2) (self.ring.long_beta * self['delta']**2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment