From bab1f12f8412884829c43686c1dc9e22e28c806e Mon Sep 17 00:00:00 2001 From: Rakib Hassan Date: Thu, 7 Nov 2024 11:00:24 +1100 Subject: [PATCH] Minor cosmetic changes --- seismic/ASDFdatabase/waveform_analytics.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/seismic/ASDFdatabase/waveform_analytics.py b/seismic/ASDFdatabase/waveform_analytics.py index 82bb2b31..3d7b9541 100644 --- a/seismic/ASDFdatabase/waveform_analytics.py +++ b/seismic/ASDFdatabase/waveform_analytics.py @@ -14,6 +14,14 @@ """ import os, sys + +is_windows = sys.platform.startswith('win') +if(is_windows): # suppress warnings on windows + import warnings + warnings.filterwarnings('ignore', \ + message='Valid PROJ data directory not found') +# end if + import numpy as np from obspy import UTCDateTime import click @@ -42,8 +50,6 @@ matplotlib.use('TKAgg') -is_windows = sys.platform.startswith('win') - class ProgressTracker(object): def __init__(self, manager: Manager): self.max = manager.Value('max', 0) @@ -365,7 +371,7 @@ def fft_taper(data): self.progress_tracker.increment() cv, mv = self.progress_tracker.now() - print('Progress: [{}/{}] {:2.1f}%'.format(cv, mv, cv / mv * 100), end='\r') + print('Processing data: [{}/{} days] {:2.1f}%'.format(cv, mv, cv / mv * 100), end='\r') sys.stdout.flush() # end for