[enhancement] make use of the new methods introduced in [900c7af931
]
This commit is contained in:
parent
900c7af931
commit
34c1e80e78
29
autoPyLoT.py
29
autoPyLoT.py
@ -14,7 +14,6 @@ import pylot.core.loc.nll as nll
|
|||||||
from pylot.core.analysis.magnitude import MomentMagnitude, RichterMagnitude
|
from pylot.core.analysis.magnitude import MomentMagnitude, RichterMagnitude
|
||||||
from pylot.core.io.data import Data
|
from pylot.core.io.data import Data
|
||||||
from pylot.core.io.inputs import AutoPickParameter
|
from pylot.core.io.inputs import AutoPickParameter
|
||||||
from pylot.core.io.phases import add_amplitudes
|
|
||||||
from pylot.core.pick.autopick import autopickevent, iteratepicker
|
from pylot.core.pick.autopick import autopickevent, iteratepicker
|
||||||
from pylot.core.util.dataprocessing import restitute_data, read_metadata, \
|
from pylot.core.util.dataprocessing import restitute_data, read_metadata, \
|
||||||
remove_underscores
|
remove_underscores
|
||||||
@ -159,15 +158,15 @@ def autoPyLoT(inputfile):
|
|||||||
moment_mag = MomentMagnitude(corr_dat, evt, parameter.get('vp'),
|
moment_mag = MomentMagnitude(corr_dat, evt, parameter.get('vp'),
|
||||||
parameter.get('Qp'),
|
parameter.get('Qp'),
|
||||||
parameter.get('rho'), True, 0)
|
parameter.get('rho'), True, 0)
|
||||||
|
# update pick with moment property values (w0, fc, Mo)
|
||||||
|
for station, props in moment_mag.moment_props.items():
|
||||||
|
picks[station]['P'].update(props)
|
||||||
|
evt = moment_mag.updated_event()
|
||||||
local_mag = RichterMagnitude(corr_dat, evt,
|
local_mag = RichterMagnitude(corr_dat, evt,
|
||||||
parameter.get('sstop'), True, 0)
|
parameter.get('sstop'), True, 0)
|
||||||
for station, amplitude in local_mag.amplitudes.items():
|
for station, amplitude in local_mag.amplitudes.items():
|
||||||
picks[station]['S']['Ao'] = amplitude
|
picks[station]['S']['Ao'] = amplitude.generic_amplitude
|
||||||
evt = add_amplitudes(evt, local_mag.amplitudes)
|
evt = local_mag.updated_event()
|
||||||
netML = local_mag.net_magnitude()
|
|
||||||
netMw = moment_mag.net_magnitude()
|
|
||||||
mags = [netML, netMw]
|
|
||||||
evt.magnitudes += mags
|
|
||||||
else:
|
else:
|
||||||
print("autoPyLoT: No NLLoc-location file available!")
|
print("autoPyLoT: No NLLoc-location file available!")
|
||||||
print("No source parameter estimation possible!")
|
print("No source parameter estimation possible!")
|
||||||
@ -209,17 +208,17 @@ def autoPyLoT(inputfile):
|
|||||||
moment_mag = MomentMagnitude(corr_dat, evt, parameter.get('vp'),
|
moment_mag = MomentMagnitude(corr_dat, evt, parameter.get('vp'),
|
||||||
parameter.get('Qp'),
|
parameter.get('Qp'),
|
||||||
parameter.get('rho'), True, 0)
|
parameter.get('rho'), True, 0)
|
||||||
|
# update pick with moment property values (w0, fc, Mo)
|
||||||
|
for station, props in moment_mag.moment_props.items():
|
||||||
|
picks[station]['P'].update(props)
|
||||||
|
evt = moment_mag.updated_event()
|
||||||
local_mag = RichterMagnitude(corr_dat, evt,
|
local_mag = RichterMagnitude(corr_dat, evt,
|
||||||
parameter.get('sstop'), True, 0)
|
parameter.get('sstop'), True, 0)
|
||||||
for station, amplitude in local_mag.amplitudes.items():
|
for station, amplitude in local_mag.amplitudes.items():
|
||||||
picks[station]['S']['Ao'] = amplitude
|
picks[station]['S']['Ao'] = amplitude.generic_amplitude
|
||||||
evt = add_amplitudes(evt, local_mag.amplitudes)
|
evt = local_mag.updated_event()
|
||||||
netML = local_mag.net_magnitude()
|
net_mw = moment_mag.net_magnitude()
|
||||||
# get network moment magntiude
|
print("Network moment magnitude: %4.1f" % net_mw.mag)
|
||||||
netMw = moment_mag.net_magnitude()
|
|
||||||
mags = [netML, netMw]
|
|
||||||
evt.magnitudes += mags
|
|
||||||
print("Network moment magnitude: %4.1f" % netMw.mag)
|
|
||||||
else:
|
else:
|
||||||
print("autoPyLoT: No NLLoc-location file available! Stop iteration!")
|
print("autoPyLoT: No NLLoc-location file available! Stop iteration!")
|
||||||
##########################################################
|
##########################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user