diff --git a/pylot/core/analysis/magnitude.py b/pylot/core/analysis/magnitude.py index a7a2befa..6c2ab843 100644 --- a/pylot/core/analysis/magnitude.py +++ b/pylot/core/analysis/magnitude.py @@ -306,7 +306,8 @@ def calcMoMw(wfstream, w0, rho, vp, delta, inv): 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 (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() 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: zdat = cordat.select(component="Z") if len(zdat) == 0: