Skip to content
Snippets Groups Projects
Commit e533a95f authored by Vadim Gubaidulin's avatar Vadim Gubaidulin
Browse files

Added min_level parameter of the signal to the beam offset exponential fit

parent 3cfd7c77
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,7 @@ class BBDataViewer(): ...@@ -121,7 +121,7 @@ class BBDataViewer():
fig.legend() fig.legend()
def plot_beam_risetime_fit(self, ax=None, plane='y', def plot_beam_risetime_fit(self, ax=None, plane='y',
smoothing_window_size=256): smoothing_window_size=256, min_level=30):
if ax == None: if ax == None:
_, ax = plt.subplots(1, 1) _, ax = plt.subplots(1, 1)
if plane == 'y': if plane == 'y':
...@@ -134,7 +134,6 @@ class BBDataViewer(): ...@@ -134,7 +134,6 @@ class BBDataViewer():
raise ValueError('Plane must be x or y.') raise ValueError('Plane must be x or y.')
ax.plot(signal) ax.plot(signal)
min_level = np.min((10.*np.mean(signal[:200]), 10.*np.mean(signal[-200:])))
risetime = fit_risetime(signal, risetime = fit_risetime(signal,
min_level=min_level, min_level=min_level,
smoothing_window_size=smoothing_window_size, smoothing_window_size=smoothing_window_size,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment