Preparation of flexible local magnitude estimation, renamed module.
This commit is contained in:
parent
5928967e28
commit
cf200e1425
@ -55,7 +55,7 @@ except ImportError:
|
||||
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
|
||||
from matplotlib.figure import Figure
|
||||
|
||||
from pylot.core.analysis.magnitude import RichterMagnitude, MomentMagnitude
|
||||
from pylot.core.analysis.magnitude import LocalMagnitude, MomentMagnitude
|
||||
from pylot.core.io.data import Data
|
||||
from pylot.core.io.inputs import FilterOptions, AutoPickParameter
|
||||
from autoPyLoT import autoPyLoT
|
||||
@ -2150,7 +2150,7 @@ class MainWindow(QMainWindow):
|
||||
# if not rest_flag:
|
||||
# raise ProcessingError('Restitution of waveform data failed!')
|
||||
if type == 'ML':
|
||||
local_mag = RichterMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('sstop'), verbosity = True)
|
||||
local_mag = LocalMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('sstop'), verbosity = True)
|
||||
return local_mag.updated_event()
|
||||
elif type == 'Mw':
|
||||
moment_mag = MomentMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('vp'), self.inputs.get('Qp'), self.inputs.get('rho'), verbosity = True)
|
||||
|
@ -16,7 +16,7 @@ import pylot.core.loc.focmec as focmec
|
||||
import pylot.core.loc.hash as hash
|
||||
import pylot.core.loc.nll as nll
|
||||
#from PySide.QtGui import QWidget, QInputDialog
|
||||
from pylot.core.analysis.magnitude import MomentMagnitude, RichterMagnitude
|
||||
from pylot.core.analysis.magnitude import MomentMagnitude, LocalMagnitude
|
||||
from pylot.core.io.data import Data
|
||||
from pylot.core.io.inputs import AutoPickParameter
|
||||
from pylot.core.pick.autopick import autopickevent, iteratepicker
|
||||
@ -252,7 +252,7 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
||||
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 = LocalMagnitude(corr_dat, evt,
|
||||
parameter.get('sstop'), True,\
|
||||
iplot)
|
||||
for station, amplitude in local_mag.amplitudes.items():
|
||||
@ -310,7 +310,7 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
||||
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 = LocalMagnitude(corr_dat, evt,
|
||||
parameter.get('sstop'), True, \
|
||||
iplot)
|
||||
for station, amplitude in local_mag.amplitudes.items():
|
||||
|
@ -136,7 +136,7 @@ class Magnitude(object):
|
||||
return None
|
||||
|
||||
|
||||
class RichterMagnitude(Magnitude):
|
||||
class LocalMagnitude(Magnitude):
|
||||
"""
|
||||
Method to derive peak-to-peak amplitude as seen on a Wood-Anderson-
|
||||
seismograph. Has to be derived from instrument corrected traces!
|
||||
@ -154,7 +154,7 @@ class RichterMagnitude(Magnitude):
|
||||
_amplitudes = dict()
|
||||
|
||||
def __init__(self, stream, event, calc_win, verbosity=False, iplot=0):
|
||||
super(RichterMagnitude, self).__init__(stream, event, verbosity, iplot)
|
||||
super(LocalMagnitude, self).__init__(stream, event, verbosity, iplot)
|
||||
|
||||
self._calc_win = calc_win
|
||||
self._type = 'ML'
|
||||
|
Loading…
Reference in New Issue
Block a user