diff --git a/examples/000a_sps_tune_shift.py b/examples/000a_sps_tune_shift.py index e5d381fa..f15d7f50 100644 --- a/examples/000a_sps_tune_shift.py +++ b/examples/000a_sps_tune_shift.py @@ -10,7 +10,6 @@ import xwakes as xw import xtrack as xt -import xfields as xf import xpart as xp import nafflib @@ -64,7 +63,7 @@ ) # initialize a damper with 100 turns gain -transverse_damper = xf.TransverseDamper( +transverse_damper = xw.TransverseDamper( gain_x=2/100, gain_y=2/100, zeta_range=(-0.5*bucket_length, 0.5*bucket_length), num_slices=100, @@ -73,7 +72,7 @@ ) # initialize a monitor for the average transverse positions -monitor = xf.CollectiveMonitor( +monitor = xw.CollectiveMonitor( base_file_name=f'sps_tune_shift', monitor_bunches=True, monitor_slices=False, diff --git a/examples/000b_sps_tune_shift_multibunch.py b/examples/000b_sps_tune_shift_multibunch.py index 27ca9c6f..2b698b81 100644 --- a/examples/000b_sps_tune_shift_multibunch.py +++ b/examples/000b_sps_tune_shift_multibunch.py @@ -3,14 +3,12 @@ # Copyright (c) CERN, 2024. # # ######################################### # -import matplotlib.pyplot as plt import numpy as np import pathlib import h5py import xwakes as xw import xtrack as xt -import xfields as xf import xpart as xp import nafflib @@ -71,7 +69,7 @@ ) # initialize a damper with 100 turns gain -transverse_damper = xf.TransverseDamper( +transverse_damper = xw.TransverseDamper( gain_x=2/100, gain_y=2/100, zeta_range=(-0.5*bucket_length, 0.5*bucket_length), num_slices=100, @@ -81,7 +79,7 @@ ) # initialize a monitor for the average transverse positions -monitor = xf.CollectiveMonitor( +monitor = xw.CollectiveMonitor( base_file_name=f'sps_tune_shift', monitor_bunches=True, monitor_slices=False, diff --git a/examples/000c_sps_tune_shift_multibunch_mpi.py b/examples/000c_sps_tune_shift_multibunch_mpi.py index 3df1c558..7303bf17 100644 --- a/examples/000c_sps_tune_shift_multibunch_mpi.py +++ b/examples/000c_sps_tune_shift_multibunch_mpi.py @@ -11,7 +11,6 @@ import xwakes as xw import xtrack as xt -import xfields as xf import xpart as xp import nafflib @@ -77,7 +76,7 @@ ) # initialize a damper with 100 turns gain -transverse_damper = xf.TransverseDamper( +transverse_damper = xw.TransverseDamper( gain_x=2/100, gain_y=2/100, zeta_range=(-0.5*bucket_length, 0.5*bucket_length), num_slices=100, @@ -88,7 +87,7 @@ # initialize a monitor for the average transverse positions my_rank = MPI.COMM_WORLD.Get_rank() -monitor = xf.CollectiveMonitor( +monitor = xw.CollectiveMonitor( base_file_name=f'sps_tune_shift_rank{my_rank}', monitor_bunches=True, monitor_slices=False, diff --git a/xwakes/beam_elements/collective_monitor.py b/xwakes/beam_elements/collective_monitor.py index b9456744..f136151d 100644 --- a/xwakes/beam_elements/collective_monitor.py +++ b/xwakes/beam_elements/collective_monitor.py @@ -73,6 +73,8 @@ class CollectiveMonitor(ElementWithSlicer): Use flattened wakes """ + iscollective = True + _stats_to_store = [ 'mean_x', 'mean_px', 'mean_y', 'mean_py', 'mean_zeta', 'mean_delta', 'sigma_x', 'sigma_y', 'sigma_zeta',