A class to analyze growth and damping data .It processes data from an HDF5 file, containing raw signal data, emittance , tune etc parameters for a beam in the X and Z (vertical) planes.
"""
def__init__(self,filename):
"""
Parameters:
- filename (str): The path to the HDF5 file containing the beam data.
"""
self.filename=filename
withhp.File(filename,"r")asf:
self.mean_y_data=f[f'raw'][:]# Extract raw mean data
self.y_means=np.mean(self.mean_y_data,axis=1)# Compute the mean of the data along axis=1
self.n_turns=self.mean_y_data.shape[1]# Determine the number of turns (columns) and the number of bunches (rows)
self.n_bunches=self.mean_y_data.shape[0]
self.mean_y_data-=self.y_means[:,np.newaxis]# Center the data by subtracting the mean offset for each bunch