Skip to content
Snippets Groups Projects
Commit a14f9f81 authored by Alexis GAMELIN's avatar Alexis GAMELIN
Browse files

Merge branch 'cavity_resonator2'

parents 1694aa59 fef74fc7
No related branches found
No related tags found
No related merge requests found
...@@ -215,11 +215,13 @@ class CavityResonator(): ...@@ -215,11 +215,13 @@ class CavityResonator():
if beam.filling_pattern[index]: if beam.filling_pattern[index]:
if beam.mpi_switch: if beam.mpi_switch:
# get rank of bunch n° index
rank = beam.mpi.bunch_to_rank(index)
# mpi -> get shared bunch profile for current bunch # mpi -> get shared bunch profile for current bunch
center = beam.mpi.tau_center[index] center = beam.mpi.tau_center[rank]
profile = beam.mpi.tau_profile[index] profile = beam.mpi.tau_profile[rank]
bin_length = center[1]-center[0] bin_length = center[1]-center[0]
charge_per_mp = beam.mpi.charge_per_mp_all[index] charge_per_mp = beam.mpi.charge_per_mp_all[rank]
if index == self.bunch_index: if index == self.bunch_index:
sorted_index = beam.mpi.tau_sorted_index sorted_index = beam.mpi.tau_sorted_index
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment