From 904669f2117dc708062535e268da68afd7efe070 Mon Sep 17 00:00:00 2001 From: zerafachris PERSONAL Date: Wed, 29 May 2024 21:46:16 +0200 Subject: [PATCH] pre-commit changes --- scatcluster/processing/scattering.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scatcluster/processing/scattering.py b/scatcluster/processing/scattering.py index 28e8cb2..c939aa4 100644 --- a/scatcluster/processing/scattering.py +++ b/scatcluster/processing/scattering.py @@ -459,7 +459,7 @@ def normalize(self, dataset): dataset.order_2.data /= dataset.order_2.std(dim=order_2_dim).data return dataset - + def min_max_scaling(self, dataset): """Min-Max scaling the scattering coefficients. @@ -622,11 +622,11 @@ def load_scattering_coefficients_xarray(self): self.scattering_coefficients_xarray = scat_coeff_xr return scat_coeff_xr - def plot_scattering_coefficients_normalisation(self, **kwargs): """ - Plot the normalization of scattering coefficients. - This function loads the scattering coefficients from an xarray dataset file and plots the normalization of the coefficients. The plot is saved as a PNG file in the specified directory. + Plot the normalization of scattering coefficients. + This function loads the scattering coefficients from an xarray dataset file and plots the + normalization of the coefficients. The plot is saved as a PNG file in the specified directory. Parameters: self (object): The instance of the class. @@ -640,14 +640,13 @@ def plot_scattering_coefficients_normalisation(self, **kwargs): for col in range(scat_vec.shape[1]): axs.plot(scat_vec[col], 'b', alpha=0.1) plt.title(f'{self.data_network}_{self.data_station}_{self.data_location}_{self.network_name}\n' - 'Scattering Coefficients Normalization') - - plt.savefig( - f'{self.data_network}_{self.data_station}_{self.data_location}_{self.network_name}_Scattering_Coefficients_Normalization.png') + 'Scattering Coefficients Normalization') + + plt.savefig(f'{self.data_network}_{self.data_station}_{self.data_location}_{self.network_name}_' + + 'Scattering_Coefficients_Normalization.png') plt.show() - - + def preload_times(self): """ Preloads the times data from a numpy file and assigns it to the `data_times` attribute of the class.