Skip to content

Commit

Permalink
Sign mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
freddieknets committed Nov 27, 2024
1 parent 966218e commit 4a8832c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xcoll/initial_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def generate_pencil_on_collimator(line, name, num_particles, *, side='+-', penci
# TODO: this should be checked jaw by jaw (we are currently checking the left jaw - watch out for sign of tilt of right jaw)
# TODO: skew collimators
tilt = coll.tilt[0] if isinstance(coll.tilt, list) else coll.tilt
gemitts = {'x': coll.gemitt_x, 'y': coll.gemitt_y}
betatron_angle = -coll.gap * coll.divergence
betatron_angle = coll.gap * coll.divergence
tolerance_tilt = 1e-12 # 0.1 urad tolerance on jaw tilt => we prioritise converging
is_converging = tilt + tolerance_tilt >= betatron_angle
print(f"Collimator {name} is {'con' if is_converging else 'di'}verging.")
Expand Down

0 comments on commit 4a8832c

Please sign in to comment.