Skip to content

Commit

Permalink
GaussDist1D did the wrong logic for cut_off level (PyORBIT-Collaborat…
Browse files Browse the repository at this point in the history
…ion#57)

The previous change made by me was wrong. Austin Hoover correctly pointed out on this. We reverse the previous change.
  • Loading branch information
shishlo authored Oct 8, 2021
1 parent 7916ee3 commit f954e4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/orbit/bunch_generators/distribution_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def getCoordinates(self):
x_norm = random.gauss(0.,1.0)
xp_norm = random.gauss(0.,1.0)
if(self.cut_off > 0.):
while((x_norm**2+xp_norm**2) < self.cut_off2):
while((x_norm**2+xp_norm**2) > self.cut_off2):
x_norm = random.gauss(0.,1.0)
xp_norm = random.gauss(0.,1.0)
return self.twiss.getU_UP(x_norm,xp_norm)
Expand Down

0 comments on commit f954e4f

Please sign in to comment.