Skip to content
Snippets Groups Projects
Commit 268bdd7e authored by Alexis GAMELIN's avatar Alexis GAMELIN
Browse files

[Fix] BeamLoadingEquilibrium

Change location of update_rho()
parent f67c4c93
No related branches found
No related tags found
1 merge request!13v0.7.0
...@@ -107,7 +107,6 @@ class BeamLoadingEquilibrium(): ...@@ -107,7 +107,6 @@ class BeamLoadingEquilibrium():
def center_of_mass(self): def center_of_mass(self):
"""Return center of mass position in [s]""" """Return center of mass position in [s]"""
self.update_rho()
CM = np.average(self.z0, weights=self.rho0) CM = np.average(self.z0, weights=self.rho0)
return CM / c return CM / c
...@@ -166,6 +165,7 @@ class BeamLoadingEquilibrium(): ...@@ -166,6 +165,7 @@ class BeamLoadingEquilibrium():
else: else:
self.F = x[::2] self.F = x[::2]
self.PHI = x[1::2] self.PHI = x[1::2]
self.update_rho()
# Compute system # Compute system
if self.auto_set_MC_theta: if self.auto_set_MC_theta:
......
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