Skip to content

Commit

Permalink
scattering: filter banks savefig boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
zerafachris committed May 27, 2024
1 parent 292bf1d commit 4e453f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scatcluster/processing/scattering.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def network_build_scatcluster(self) -> None:
f'{self.network_name}.pickle', 'wb') as handle:
pickle.dump(self.net, handle, protocol=pickle.HIGHEST_PROTOCOL)

def plot_network_filter_banks(self) -> None:
def plot_network_filter_banks(self, savefig: bool = True) -> None:
"""
Plot the filter banks
"""
Expand Down Expand Up @@ -203,8 +203,9 @@ def plot_network_filter_banks(self) -> None:
plt.suptitle('ScatCluster Parametrization'
f'\nSegment:{self.network_segment}s Step: {self.network_step}\n Banks: {self.network_banks_name}')
plt.subplots_adjust(top=0.9)
plt.savefig(f'{self.data_savepath}figures/{self.data_network}_{self.data_station}_{self.data_location}_'
f'{self.network_name}_filter_banks.png')
if savefig:
plt.savefig(f'{self.data_savepath}figures/{self.data_network}_{self.data_station}_{self.data_location}_'
f'{self.network_name}_filter_banks.png')

def load_sample_data(self) -> Stream:
"""Load sample
Expand Down

0 comments on commit 4e453f5

Please sign in to comment.