[fixes #172] now also in overview all horizontals are plotted
This commit is contained in:
parent
4409a9c3ce
commit
2d66248cf9
@ -44,7 +44,7 @@ from pylot.core.read.data import Data
|
||||
from pylot.core.read.inputs import FilterOptions, AutoPickParameter
|
||||
from pylot.core.pick.autopick import autopickevent
|
||||
from pylot.core.loc.nll import locate as locateNll
|
||||
from pylot.core.util.defaults import FILTERDEFAULTS
|
||||
from pylot.core.util.defaults import FILTERDEFAULTS, COMPNAME_MAP
|
||||
from pylot.core.util.errors import FormatError, DatastructureError, \
|
||||
OverwriteError
|
||||
from pylot.core.util.connection import checkurl
|
||||
@ -545,7 +545,9 @@ class MainWindow(QMainWindow):
|
||||
zne_text = {'Z': 'vertical', 'N': 'north-south', 'E': 'east-west'}
|
||||
comp = self.getComponent()
|
||||
title = 'section: {0} components'.format(zne_text[comp])
|
||||
alter_comp = COMPNAME_MAP[comp]
|
||||
wfst = self.getData().getWFData().select(component=comp)
|
||||
wfst += self.getData().getWFData().select(component=alter_comp)
|
||||
self.getPlotWidget().plotWFData(wfdata=wfst, title=title, mapping=False)
|
||||
self.draw()
|
||||
plotDict = self.getPlotWidget().getPlotDict()
|
||||
|
@ -47,6 +47,9 @@ OUTPUTFORMATS = {'.xml':'QUAKEML',
|
||||
|
||||
LOCTOOLS = dict(nll = nll, hsat = hsat, velest = velest)
|
||||
|
||||
COMPONENTS_MAPPING = dict(Z = 2, N = 1, E = 0)
|
||||
COMPONENTS_MAPPING['1'] = 1
|
||||
COMPONENTS_MAPPING['2'] = 0
|
||||
COMPPOSITION_MAP = dict(Z = 2, N = 1, E = 0)
|
||||
COMPPOSITION_MAP['1'] = 1
|
||||
COMPPOSITION_MAP['2'] = 0
|
||||
COMPPOSITION_MAP['3'] = 2
|
||||
|
||||
COMPNAME_MAP = dict(Z = '3', N = '1', E = '2')
|
||||
|
@ -26,7 +26,7 @@ from pylot.core.read.inputs import FilterOptions
|
||||
from pylot.core.pick.utils import getSNR, earllatepicker, getnoisewin,\
|
||||
getResolutionWindow
|
||||
from pylot.core.util.defaults import OUTPUTFORMATS, FILTERDEFAULTS, LOCTOOLS,\
|
||||
COMPONENTS_MAPPING
|
||||
COMPPOSITION_MAP
|
||||
from pylot.core.util.utils import prepTimeAxis, getGlobalTimes, scaleWFData, \
|
||||
demeanTrace, isSorted, findComboBoxIndex
|
||||
|
||||
@ -98,7 +98,7 @@ class MPLWidget(FigureCanvas):
|
||||
station = trace.stats.station
|
||||
if mapping:
|
||||
comp = channel[-1]
|
||||
n = COMPONENTS_MAPPING[comp]
|
||||
n = COMPPOSITION_MAP[comp]
|
||||
if n > nmax:
|
||||
nmax = n
|
||||
msg = 'plotting %s channel of station %s' % (channel, station)
|
||||
|
Loading…
Reference in New Issue
Block a user