Skip to content
Snippets Groups Projects
Commit da84369c authored by Philipp Niedermayer's avatar Philipp Niedermayer
Browse files

Restore backwards compatibility

parent 87b10485
No related branches found
No related tags found
No related merge requests found
......@@ -235,7 +235,8 @@ def plot_tune_spectrum(ax, libera_data, xy, turn_range=None, time_range=None, tu
if fit:
q = None
try:
fitr = (fit if callable(fit) else fit_lorenzian)(freq, mag)
if fit is True: fit = fit_lorenzian
fitr = fit(freq, mag)
if fit in (fit_lorenzian, fit_gaussian):
q, w = fitr[0][2], fitr[0][3]
if q<np.min(freq) or q>np.max(freq) or w > 0.1:
......
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