Skip to content

Commit

Permalink
Put Tao curve legend parameters in tao_legend_struct. (#1293)
Browse files Browse the repository at this point in the history
* Put Tao curve legend parameters in tao_legend_struct.
  • Loading branch information
DavidSagan authored Nov 15, 2024
1 parent 5dde5a4 commit 8aaaef1
Show file tree
Hide file tree
Showing 52 changed files with 689 additions and 695 deletions.
Empty file modified bmad-doc/tao_examples/cbeta_cell/SetMultiOrbit.tao
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/cell.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/cell.lat.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/cell1.lat
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/cell2.lat
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/cell3.lat
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/cell4.lat
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/energy0.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/energy1.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/energy2.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/energy3.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/energy4.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/energy5.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/energy_patches.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/solution_4.5deg.bmad
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/tao.init
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/tao.startup
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_cell/tao_plot.init
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_ffag/CorrectOrbit.tao
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_ffag/OrbitCorrectionSetup4.tao
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_ffag/SetMultiOrbit.tao
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_ffag/tao.init
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_ffag/tao.startup
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/cbeta_ffag/tao_plot.init
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/erl/line.beam
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/erl/tao.init
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/erl/tao.startup
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/erl/tao_plot.init
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/optics_matching/tao.init
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/optics_matching/tao.startup
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/optics_matching/tao_plot.init
100755 → 100644
Empty file.
Empty file modified bmad-doc/tao_examples/space_charge/tao_plot.init
100755 → 100644
Empty file.
7 changes: 4 additions & 3 deletions bmad/multiparticle/wake_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ subroutine sr_z_long_wake (ele, bunch, z_ave)
srz => sr%z_long
if (srz%dz == 0) return

f0 = sr%amp_scale * bunch%charge_live
f0 = sr%amp_scale * bunch%charge_live / sum(bunch%particle%charge, bunch%particle%state == alive$)
if (sr%scale_with_length) f0 = f0 * ele%value(l$)

! Compute binned bunch distribution and wake
Expand All @@ -544,8 +544,8 @@ subroutine sr_z_long_wake (ele, bunch, z_ave)
cycle
endif

r1 = ix2 - rz_rel
r2 = rz_rel - ix1
r1 = (ix2 - rz_rel) * p%charge
r2 = (rz_rel - ix1) * p%charge

select case (srz%position_dependence)
case (none$, x_trailing$, y_trailing$)
Expand All @@ -572,6 +572,7 @@ subroutine sr_z_long_wake (ele, bunch, z_ave)
call fft_1d(srz%w_out, 1)

! Apply wake
! Notice that p%charge does not appear here.

do i = 1, size(bunch%particle)
p => bunch%particle(i)
Expand Down
Loading

0 comments on commit 8aaaef1

Please sign in to comment.