Skip to content
Snippets Groups Projects
Commit 49b6ba00 authored by Yngve Levinsen's avatar Yngve Levinsen
Browse files

fixed TraceWin.plt.calc_twiss

parent fd649dd5
No related branches found
No related tags found
No related merge requests found
......@@ -309,8 +309,13 @@ class plt:
if not hasattr(self,'sigma'):
self.calc_sigma()
self.eps = [numpy.sqrt(numpy.det(self.sigma[i:i+2][:,i:i+2])) for i in (0,2,4)]
self.beta = [self.sigma[i][j]]
self.twiss_eps=[]
for j in xrange(len(self.Nelp)):
self.twiss_eps.append([numpy.sqrt(numpy.linalg.det(self.sigma[j][i:i+2][:,i:i+2])) for i in (0,2,4)])
self.twiss_beta = [[self.sigma[j][i][i] for i in (0,2,4)] for j in xrange(len(self.Nelp))]
self.twiss_eps=numpy.array(self.twiss_eps)
self.twiss_beta=numpy.array(self.twiss_beta)
......
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