diff --git a/util_programs/wake_plot/README b/util_programs/wake_plot/README index cdfc8921e9..d6f37e7de3 100644 --- a/util_programs/wake_plot/README +++ b/util_programs/wake_plot/README @@ -20,9 +20,9 @@ SR --> Short range wake Simulation ---------- -The wake is simulated with a leading particle that excites a wake and a trailing particle that gets -a kick. The charge on the trailing particle is negligible compared with the charge on the leading -particle so the longitudinal self-wake of the trailing particle is negligible. +The wake is simulated with a leading particle that excites a wake and a trailing "witness" particle +that gets a kick. The charge on the trailing particle is negligible compared with the charge on the +leading particle so the longitudinal self-wake of the trailing particle is negligible. The wake kicks are the change in phase space px, py, and pz due to the wake. The only difference between plotting the wakes versus the kicks is an overall scale factor. @@ -66,7 +66,7 @@ lat_file: Bmad lattice file containing the element with the wakes. wake_ele_name: Wake element identifier. Can be name or element index. Must match to a unique element. -who: What to plot. Possibilities are: +who: What wake type to use. Possibilities are: "lr" -- Long range wakes. "sr" -- Short range wakes. "sr-mode" -- Short range pseudo-mode wakes. Z-position wakes are ignored. @@ -83,9 +83,9 @@ there is a single list of wakes. plot only the wake with the index correspondin (ix_wake = 1 --> Only use first wake in list, etc). Default is zero which means ignore ix_order. If non-zero, overrides any setting of m_order. -xy_leading: (x, y) transverse position of the leading particle. +xy_leading: (x, y) transverse position of the leading particle that produces the wake. -xy_trailing: (x, y) transverse position of the trailing particle. +xy_trailing: (x, y) transverse position of the trailing witness particle that samples the wake. leading_charge: Charge of the leading bunch. Only used when plotting kicks. @@ -109,10 +109,9 @@ corresponding to the spline knot points of the Z-position wakes. text_scale: Scale for drawing text. Default is 1.2 +plot_size: (width, height) of plot page in pixels (72 pixels = 1 inch). + x_axis_label: y_axis_label: -text_scale - -plot_size: (width, height) of plot page diff --git a/util_programs/wake_plot/example/long_range.wake b/util_programs/wake_plot/example/long_range.wake new file mode 100644 index 0000000000..fafebd2935 --- /dev/null +++ b/util_programs/wake_plot/example/long_range.wake @@ -0,0 +1,17 @@ +! Freq R/Q Q m Polar +! [Ohm/ Angle +! [Hz] m^(2m)] [1/m] [Rad/2pi] +&long_range_modes + lr(1) = 2.01e+05 -1.78e-01 4.70e-02 0 "unpol" + lr(2) = 3.00e+06 8.28e-01 5.17e+01 0 "0.25" + lr(3) = 2.66e+06 -2.49e-01 9.90e-01 0 "0.1" + + lr(4) = 7.82e+05 -9.90e-01 3.90e-02 1 "unpol" + lr(5) = 1.21e+03 -1.02e+05 6.27e-04 1 "0.25" + lr(6) = 1.50e+05 -2.74e+05 6.49e-03 1 "0.0" + + lr(7) = 7.80e+05 -5.13e-01 4.29e-01 2 "unpol" + lr(8) = 3.37e+07 -1.30e+03 1.08e-01 2 "0.25" + lr(9) = 9.14e+06 2.68e+02 1.45e-01 2 "0" +/ + diff --git a/util_programs/wake_plot/example/wake.bmad b/util_programs/wake_plot/example/wake.bmad new file mode 100644 index 0000000000..7d512db8d1 --- /dev/null +++ b/util_programs/wake_plot/example/wake.bmad @@ -0,0 +1,31 @@ +no_digested +parameter[e_tot] = 1e9 +parameter[particle] = ELECTRON +parameter[geometry] = open + +beginning[beta_a] = 10 +beginning[beta_b] = 10 +beginning[alpha_a] = 1 +beginning[alpha_b] = -1 + +particle_start[z] = -0.001 + +p1: pipe, L = 1, sr_wake = {amp_scale = 1.2, z_scale = 0.9, scale_with_length = T, z_max = 1.2, + longitudinal = {-8266.6e2, 26.6, 46089.2, 1.578966/twopi, x_trailing}, + longitudinal = { 1764.0e2, 19.7, -9746.59, 3.661213/twopi, y_leading}, + longitudinal = {-4155.1e2, 16.8, -73.1528, 3.66933/twopi, none}, + longitudinal = { 7248.9e2, 11.2, -1672.137, 3.071617/twopi, none}, + transverse = {-8266.6e10, 26.6, 46089.2, 1.578966/twopi, none, leading}, + transverse = { 1764.0e11, 19.7, -9746.59, 3.661213/twopi, y_axis, trailing}, + transverse = {-4155.1e12, 16.8, -73.1528, 3.66933/twopi, none, leading} } + +p1[sr_wake%scale_with_length] = T + +p2: pipe, L = 1 +p2[lr_wake_file] = 'long_range.wake' + + +l1: line = (p1, p2) + +use, l1 + diff --git a/util_programs/wake_plot/example/wake_plot.init b/util_programs/wake_plot/example/wake_plot.init index 85810c11a9..7295702dfe 100644 --- a/util_programs/wake_plot/example/wake_plot.init +++ b/util_programs/wake_plot/example/wake_plot.init @@ -1,3 +1,19 @@ ¶ms - - lat_file + lat_file = "wake.bmad" ! Bmad lattice file. + wake_ele_name = "p1" ! Lattice element with wakes. + who = "sr" ! What wake type to use. + m_order = 0 ! Order of LR wake to use. 0 => all orders. + ix_wake = 0 ! Index of wake to use. 0 => Ignore this parameter. + xy_leading = 1, 0 ! (x, y) position of leading particle that produces a wake. + xy_trailing = 1, 0 ! (x, y) position of trailing witness particle that samples the bunch. + leading_charge = 1 ! Leading particle charge. Only used when plotting the wake kicks. + + plot_type = "wake" ! "wake" or "kick" + make_plot = True ! Open a plotting window. + postscript_file = "" ! If not blank, write wake to a file. + plot_limit = -1e-2 ! Limit of plot range. + n_points = 1001 ! Number of plot points + draw_knot_points = False ! Draw symbols at SR z-dependent wake knot points? + text_scale = 1.2 ! Scale for drawing text. + plot_size = 500, 400 ! (width, height) plot size in pixels. +/