Skip to content

Commit ba15599

Browse files
authored
Merge pull request #14 from jbrussell/working
DL method: allow flexibility using N,E in place of 1,2 for land stations
2 parents bc4d464 + 0ca7aae commit ba15599

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

orientpy/utils.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,12 @@ def DLcalc(stream, Rf, LPF, HPF, epi, baz, A, winlen=10., ptype=0):
481481
st = stream.slice(starttime=dt+r1, endtime=dt+r2)
482482

483483
# Extract waveform data for each component
484-
tr1 = st.select(component='1')[0].data
485-
tr2 = st.select(component='2')[0].data
484+
try:
485+
tr1 = st.select(component='1')[0].data
486+
tr2 = st.select(component='2')[0].data
487+
except:
488+
tr1 = st.select(component='N')[0].data
489+
tr2 = st.select(component='E')[0].data
486490
trZ = st.select(component='Z')[0].data
487491

488492
# Calculate Hilbert transform of vertical trace data

0 commit comments

Comments
 (0)