Bugfix in calcsourcespec: take into account special case of components 1, 2, and Z.
This commit is contained in:
parent
9e5b3f6916
commit
0318fe7c32
@ -459,12 +459,14 @@ def calcsourcespec(wfstream, onset, vp, delta, azimuth, incidence,
|
|||||||
"no rotation of components possible!")
|
"no rotation of components possible!")
|
||||||
# instead, use component 3
|
# instead, use component 3
|
||||||
ldat = LQT.select(component="3")
|
ldat = LQT.select(component="3")
|
||||||
|
if len(ldat == 0:
|
||||||
|
# maybe component z available
|
||||||
|
ldat = LQT.select(component="Z")
|
||||||
|
|
||||||
# integrate to displacement
|
# integrate to displacement
|
||||||
# unrotated vertical component (for comparison)
|
# unrotated vertical component (for comparison)
|
||||||
inttrz = signal.detrend(integrate.cumtrapz(zdat[0].data, None, dt))
|
inttrz = signal.detrend(integrate.cumtrapz(zdat[0].data, None, dt))
|
||||||
# rotated component Z => L
|
# rotated component Z => L
|
||||||
print ldat
|
|
||||||
Ldat = signal.detrend(integrate.cumtrapz(ldat[0].data, None, dt))
|
Ldat = signal.detrend(integrate.cumtrapz(ldat[0].data, None, dt))
|
||||||
|
|
||||||
# get window after P pulse for
|
# get window after P pulse for
|
||||||
|
Loading…
Reference in New Issue
Block a user