diff --git a/mbtrack2/tracking/monitors/monitors.py b/mbtrack2/tracking/monitors/monitors.py index 69c62ae91f832551be3a31c8dacdebea076151be..01794ebea901beaf33c956b94d084616e26d55f4 100644 --- a/mbtrack2/tracking/monitors/monitors.py +++ b/mbtrack2/tracking/monitors/monitors.py @@ -1567,6 +1567,10 @@ class CavityMonitor(Monitor): ring.h, buffer_size, ), + "DFB_ig_phasor":( + ring.h, + buffer_size, + ), "detune": (buffer_size, ), "psi": (buffer_size, ), "Vg": (buffer_size, ), @@ -1595,6 +1599,10 @@ class CavityMonitor(Monitor): ring.h, total_size, ), + "DFB_ig_phasor":( + ring.h, + total_size, + ), "detune": (total_size, ), "psi": (total_size, ), "Vg": (total_size, ), @@ -1611,6 +1619,7 @@ class CavityMonitor(Monitor): "beam_phasor_record": complex, "generator_phasor_record": complex, "ig_phasor_record": complex, + "DFB_ig_phasor":complex, "detune": float, "psi": float, "Vg": float, diff --git a/mbtrack2/tracking/rf.py b/mbtrack2/tracking/rf.py index fedc7ab0e548c91f444b216be95b3cb1d7149ae7..2dba4ded9532d3710ff42dff060af46b259d3fa4 100644 --- a/mbtrack2/tracking/rf.py +++ b/mbtrack2/tracking/rf.py @@ -579,6 +579,14 @@ class CavityResonator(): if isinstance(FB, (ProportionalIntegralLoop, DirectFeedback)): return FB.ig_phasor_record return np.zeros(self.ring.h) + + @property + def DFB_ig_phasor(self): + """Last current generator phasor of each bunch in [A]""" + for FB in self.feedback: + if isinstance(FB, (ProportionalIntegralLoop, DirectFeedback)): + return FB.DFB_ig_phasor + return np.zeros(self.ring.h) @property def cavity_voltage(self):