[change] use read in metadata information instead of reading metadata each time invoked
This commit is contained in:
parent
7e76bf7577
commit
df002ce9ac
@ -306,7 +306,8 @@ def calcMoMw(wfstream, w0, rho, vp, delta, inv):
|
|||||||
return Mo, Mw
|
return Mo, Mw
|
||||||
|
|
||||||
|
|
||||||
def calcsourcespec(wfstream, onset, inventory, vp, delta, azimuth, incidence, qp, iplot):
|
def calcsourcespec(wfstream, onset, metadata, vp, delta, azimuth, incidence,
|
||||||
|
qp, iplot):
|
||||||
'''
|
'''
|
||||||
Subfunction to calculate the source spectrum and to derive from that the plateau
|
Subfunction to calculate the source spectrum and to derive from that the plateau
|
||||||
(usually called omega0) and the corner frequency assuming Aki's omega-square
|
(usually called omega0) and the corner frequency assuming Aki's omega-square
|
||||||
@ -353,7 +354,9 @@ def calcsourcespec(wfstream, onset, inventory, vp, delta, azimuth, incidence, qp
|
|||||||
data = Data()
|
data = Data()
|
||||||
wf_copy = wfstream.copy()
|
wf_copy = wfstream.copy()
|
||||||
|
|
||||||
[cordat, restflag] = restitute_data(wf_copy, inventory)
|
invtype, inventory = metadata
|
||||||
|
|
||||||
|
[cordat, restflag] = restitute_data(wf_copy, invtype, inventory)
|
||||||
if restflag is True:
|
if restflag is True:
|
||||||
zdat = cordat.select(component="Z")
|
zdat = cordat.select(component="Z")
|
||||||
if len(zdat) == 0:
|
if len(zdat) == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user