Skip to content

Commit

Permalink
Merge branch 'release/v0.2.1' of github.com:xsuite/xmask into release…
Browse files Browse the repository at this point in the history
…/v0.2.1
  • Loading branch information
giadarol committed Mar 30, 2023
2 parents 8b5d539 + b9044cf commit 7b436e5
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions examples/hllhc15_collision/004_footprint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import numpy as np
import matplotlib.pyplot as plt

import xtrack as xt


collider = xt.Multiline.from_json('./collider_03_tuned_bb_on.json')
collider.build_trackers()

fp0 = collider['lhcb1'].get_footprint(nemitt_x=2.5e-6, nemitt_y=2.5e-6)

fp_polar = collider['lhcb1'].get_footprint(
nemitt_x=2.5e-6, nemitt_y=2.5e-6,
linear_rescale_on_knobs=[
xt.LinearRescale(knob_name='beambeam_scale', v0=0.0, dv=0.1)]
)


fp_ua = collider['lhcb1'].get_footprint(
nemitt_x=2.5e-6, nemitt_y=2.5e-6,
mode='uniform_action_grid',
linear_rescale_on_knobs=[
xt.LinearRescale(knob_name='beambeam_scale', v0=0.0, dv=0.1)]
)


plt.close('all')

fig1 = plt.figure(1)
ax1 = fig1.add_subplot(111)
fp0.plot(ax=ax1, label='no rescale bb')
plt.suptitle('Polar mode (default) - no rescale on beambeam')

fig2 = plt.figure(2)
ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1)
fp_polar.plot(ax=ax2, label='rescale bb')
plt.suptitle('Polar mode (default) - linear rescale on beambeam')

fig3 = plt.figure(3)
ax3 = fig3.add_subplot(111, sharex=ax1, sharey=ax1)
fp_ua.plot()
plt.suptitle('Uniform action grid mode - linear rescale on beambeam')

plt.show()

0 comments on commit 7b436e5

Please sign in to comment.