From ae09ed5422a8d590d6739ed68a9f931ed927ac42 Mon Sep 17 00:00:00 2001 From: Rakib Hassan Date: Thu, 7 Nov 2024 19:37:20 +1100 Subject: [PATCH] Fixing a minor bug --- seismic/extract_event_traces.py | 2 +- seismic/swp_station_orientations.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/seismic/extract_event_traces.py b/seismic/extract_event_traces.py index b29254eb..ba1e780a 100644 --- a/seismic/extract_event_traces.py +++ b/seismic/extract_event_traces.py @@ -414,7 +414,7 @@ def extract_data(catalog, inventory, waveform_getter, event_trace_datafile, # initialize trace-data organization scheme # P-waveforms are stored under root group 'waveforms' for backward compatibility - tf = '.datetime:%Y-%m-%dT%H:%M:%S' + tf = '.datetime:%Y-%m-%dT%H:%M:%S.%f' h5_index = 'waveforms/{wave_type}/{network}.{station}.{location}/{event_time%s}/' % tf + \ '{channel}_{starttime%s}_{endtime%s}' % (tf, tf) diff --git a/seismic/swp_station_orientations.py b/seismic/swp_station_orientations.py index 61fa45d4..21ee5883 100644 --- a/seismic/swp_station_orientations.py +++ b/seismic/swp_station_orientations.py @@ -49,6 +49,9 @@ def checklen(st, hrs): # checks to see if there is enough downloaded data to run program L=len(st) + + if(L != 3): return True + for i in np.arange((L)): if (UTCDateTime(st[i].stats.endtime)-UTCDateTime(st[i].stats.starttime))+100 < hrs: return True