Skip to content
Snippets Groups Projects
Commit f980290c authored by Gamelin Alexis's avatar Gamelin Alexis
Browse files

Bugfix

Correct scale in plot_wakedata
Avoid circular import by moving import in function
parent d73a013a
No related branches found
No related tags found
No related merge requests found
......@@ -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"):
......
......@@ -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',
......
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