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

forced local_dispersion to be a numpy array for comparisons

parent 6734035a
No related branches found
No related tags found
1 merge request!9Emittance calculation
...@@ -287,7 +287,7 @@ class Bunch: ...@@ -287,7 +287,7 @@ class Bunch:
cov_y = np.cov(self['y'], self['yp']) cov_y = np.cov(self['y'], self['yp'])
cov_z = np.cov(self['tau'], self['delta']) cov_z = np.cov(self['tau'], self['delta'])
if (self.ring.optics.local_dispersion != [0, 0, 0, 0]): if (np.array(self.ring.optics.local_dispersion) != np.array([0, 0, 0, 0])).all():
cov_xdelta = np.cov(self['x'], self['delta']) cov_xdelta = np.cov(self['x'], self['delta'])
cov_xpdelta = np.cov(self['xp'], self['delta']) cov_xpdelta = np.cov(self['xp'], self['delta'])
cov_ydelta = np.cov(self['y'], self['delta']) cov_ydelta = np.cov(self['y'], self['delta'])
......
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