From 2e8926ea5ba4fab4f3a736d77fbc8feaaf9adf31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Mon, 30 Nov 2015 16:37:28 +0100 Subject: [PATCH] Implemented new class M0Mw of object magnitude. --- autoPyLoT.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/autoPyLoT.py b/autoPyLoT.py index 4bf71c22..54003edb 100755 --- a/autoPyLoT.py +++ b/autoPyLoT.py @@ -13,6 +13,7 @@ from pylot.core.util.structure import DATASTRUCTURE from pylot.core.pick.autopick import autopickevent, iteratepicker from pylot.core.loc.nll import * from pylot.core.util.version import get_git_version as _getVersionString +from pylot.core.analysis.magnitude import M0Mw __version__ = _getVersionString() @@ -159,6 +160,15 @@ def autoPyLoT(inputfile): if len(badpicks) == 0: print("autoPyLoT: No more bad onsets found, stop iterative picking!") break + # calculating seismic moment Mo and corresponding moment + # magnitude Mw after Hanks and Kanamori (1979) from reliable + # picks/waveforms + for key in picks: + if picks[key]['P']['weight'] < 4 and picks[key]['P']['w0'] is not None: + selwf = wfdat.select(station=key) + w0 = picks[key]['P']['w0'] + sourcepara = M0Mw(selwf, None, None, None, w0, 5, \ + parameter.getParam('rho'), parameter.getParam('vp')) else: print("autoPyLoT: No NLLoc-location file available! Stop iteration!") ########################################################## @@ -238,6 +248,17 @@ def autoPyLoT(inputfile): if len(badpicks) == 0: print("autoPyLoT: No more bad onsets found, stop iterative picking!") break + + # calculating seismic moment Mo and corresponding moment + # magnitude Mw after Hanks and Kanamori (1979) from reliable + # picks/waveforms + for key in picks: + if picks[key]['P']['weight'] < 4 and picks[key]['P']['w0'] is not None: + selwf = wfdat.select(station=key) + w0 = picks[key]['P']['w0'] + sourcepara = M0Mw(selwf, None, None, None, w0, 5, \ + parameter.getParam('rho'), parameter.getParam('vp')) + else: print("autoPyLoT: No NLLoc-location file available! Stop iteration!") ##########################################################