From 0f0ae6b8fe00438f13a99953ef64a946ffb90f16 Mon Sep 17 00:00:00 2001 From: Gamelin Alexis <alexis.gamelin@synchrotron-soleil.fr> Date: Wed, 30 Mar 2022 16:56:23 +0200 Subject: [PATCH] Solve circular import --- impedance/impedance_model.py | 8 +++++--- utilities/misc.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/impedance/impedance_model.py b/impedance/impedance_model.py index f174cae..2bf0f9d 100644 --- a/impedance/impedance_model.py +++ b/impedance/impedance_model.py @@ -8,9 +8,11 @@ import matplotlib.pyplot as plt from scipy.integrate import trapz from scipy.interpolate import interp1d from mpl_toolkits.axes_grid1.inset_locator import inset_axes -from mbtrack2.utilities import (beam_spectrum, gaussian_bunch_spectrum, - beam_loss_factor, spectral_density, - effective_impedance, double_sided_impedance) +from mbtrack2.utilities.misc import (beam_loss_factor, effective_impedance, + double_sided_impedance) +from mbtrack2.utilities.spectrum import (beam_spectrum, + gaussian_bunch_spectrum, + spectral_density) from mbtrack2.impedance.wakefield import WakeField from mbtrack2.tracking.element import Element diff --git a/utilities/misc.py b/utilities/misc.py index b2afeaf..a099c2a 100644 --- a/utilities/misc.py +++ b/utilities/misc.py @@ -8,7 +8,7 @@ import numpy as np from pathlib import Path from scipy.interpolate import interp1d from mbtrack2.impedance.wakefield import Impedance -from mbtrack.utilities import spectral_density +from mbtrack2.utilities.spectrum import spectral_density def effective_impedance(ring, imp, m, mu, sigma, M, tuneS, xi=None, mode="Hermite"): -- GitLab