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

Fixed damping time fit

parent baf3f141
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,8 @@ class BBDataViewer():
def read_data_growthdamp(self, folder, filename, N = 0):
with hp.File(folder + filename + '.hdf5') as f:
# BPM_data = f[f'raw_{N:}'][:]
self.data_bunch_x = f[f'raw_{N:}'][:]
self.data_bunch_y = f[f'raw_{N:}'][:]
self.data_bunch_x = f[f'raw'][:]
self.data_bunch_y = f[f'raw'][:]
# self.emitYC02before = np.array(f['emitZ_C02_before'])
# self.emitYC02after = np.array(f['emitZ_C02_after'])
# self.emitXC02before = np.array(f['emitX_C02_before'])
......@@ -178,11 +178,11 @@ class BBDataViewer():
_, ax = plt.subplots(1, 1)
if plane == 'y':
# ax.plot(self.data_bunch_y[bunch_number, :])
signal = np.abs(hilbert(self.data_bunch_y[bunch_number, :]))[::]
signal = np.abs(hilbert(self.data_bunch_y[bunch_number, :]))[::-1]
elif plane == 'x':
# ax.plot(self.data_bunch_x[bunch_number, :])
signal = np.abs(hilbert(self.data_bunch_x[bunch_number, :]))[::]
signal = np.abs(hilbert(self.data_bunch_x[bunch_number, :]))[::-1]
else:
raise ValueError('Plane must be defined as x or y.')
......@@ -223,9 +223,9 @@ class BBDataViewer():
damptimes = np.zeros(shape=(self.h_rf))
for i in range(self.h_rf):
if plane == 'y':
signal = np.abs(hilbert(self.data_bunch_y[i, :]))
signal = np.abs(hilbert(self.data_bunch_y[i, :]))[::-1]
elif plane == 'x':
signal = np.abs(hilbert(self.data_bunch_x[i, :]))
signal = np.abs(hilbert(self.data_bunch_x[i, :]))[::-1]
else:
raise ValueError('Plane must be defined as x or y.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment