Skip to content

Commit 2ce408f

Browse files
committed
Merge branch 'master' of https://github.com/nfsi-canada/OrientPy
2 parents 159763b + ba15599 commit 2ce408f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: 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)