diff --git a/collective_effects/wakefield.py b/collective_effects/wakefield.py index 645a9f2958a6ecbfd80321928ebb96c4a73feb77..01fa913dfcaa94a85d881bfb0557f464764782fa 100644 --- a/collective_effects/wakefield.py +++ b/collective_effects/wakefield.py @@ -488,6 +488,9 @@ class Impedance(ComplexData): positive_index = self.data.index > 0 frequency = self.data.index[positive_index] + + # Import here to avoid circular import + from mbtrack2.collective_effects.utilities import spectral_density sd = spectral_density(frequency, sigma, m=0) if(self.impedance_type == "long"): diff --git a/tracking/monitors/plotting.py b/tracking/monitors/plotting.py index 7f74c638a4fb83f01b989b152acd562afae49cc1..de90791b3d3b595a973b8398cfc691c24f909bcc 100644 --- a/tracking/monitors/plotting.py +++ b/tracking/monitors/plotting.py @@ -462,7 +462,7 @@ def plot_wakedata(filename, bunch_number, wake_type="Wlong", start=0, if streak_plot is True: turn = np.reshape(path['time'][turn_index_array], (num+1,1)) y_var = np.ones((num+1,n_bin)) * turn - z_var = np.transpose(path[wake_type][:,turn_index_array]) + z_var = np.transpose(path[wake_type][:,turn_index_array]*scale[dimension_dict[wake_type]]) fig2, ax2 = plt.subplots() cmap = mpl.cm.cool c = ax2.imshow(z_var, cmap=cmap, origin='lower' , aspect='auto',