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

bug: corrected check if dispersion is 0 or not

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