diff --git a/tracking/monitors/monitors.py b/tracking/monitors/monitors.py index e562d760f2df2e4ee3927f29c2aafab7f56ac13d..f13ed42562c040da9ac7bdb467ffee4ad22d606e 100644 --- a/tracking/monitors/monitors.py +++ b/tracking/monitors/monitors.py @@ -1368,13 +1368,34 @@ class CavityMonitor(Monitor): group_name = cavity_name dict_buffer = {"cavity_phasor_record":(ring.h, buffer_size,), "beam_phasor_record":(ring.h, buffer_size,), - "detune":(buffer_size,)} + "detune":(buffer_size,), + "psi":(buffer_size,), + "Vg":(buffer_size,), + "theta_g":(buffer_size,), + "Pg":(buffer_size,), + "Rs":(buffer_size,), + "Q":(buffer_size,), + "QL":(buffer_size,)} dict_file = {"cavity_phasor_record":(ring.h, total_size,), "beam_phasor_record":(ring.h, total_size,), - "detune":(total_size,)} + "detune":(total_size,), + "psi":(total_size,), + "Vg":(total_size,), + "theta_g":(total_size,), + "Pg":(total_size,), + "Rs":(total_size,), + "Q":(total_size,), + "QL":(total_size,)} dict_dtype = {"cavity_phasor_record":complex, "beam_phasor_record":complex, - "detune":float} + "detune":float, + "psi":float, + "Vg":float, + "theta_g":float, + "Pg":float, + "Rs":float, + "Q":float, + "QL":float} self.monitor_init(group_name, save_every, buffer_size, total_size, dict_buffer, dict_file, file_name, mpi_mode, diff --git a/tracking/rf.py b/tracking/rf.py index 39603ba986ed81f7e8edae2fcdd249b500f7d13a..08d52c6f3da95c26c7de5be511d7f80332387cf1 100644 --- a/tracking/rf.py +++ b/tracking/rf.py @@ -192,6 +192,11 @@ class CavityResonator(): self.beam_phasor = np.zeros(1, dtype=np.complex) self.beam_phasor_record = np.zeros((self.ring.h), dtype=np.complex) self.tracking = False + self.Vg = 0 + self.theta_g = 0 + self.Vgr = 0 + self.theta_gr = 0 + self.Pg = 0 def init_tracking(self, beam): """