[bugfix] use filter selected for ini pick not auto, save this filteropt.
This commit is contained in:
parent
0e057af39b
commit
c6cd6b2d69
@ -1 +1 @@
|
|||||||
4735-dirty
|
0e05-dirty
|
||||||
|
@ -1948,6 +1948,14 @@ class PickDlg(QDialog):
|
|||||||
self.setPlotLabels()
|
self.setPlotLabels()
|
||||||
self.draw()
|
self.draw()
|
||||||
|
|
||||||
|
def currentFilterPhase(self):
|
||||||
|
filterphase = None
|
||||||
|
if self.filterActionP.isChecked():
|
||||||
|
filterphase = 'P'
|
||||||
|
elif self.filterActionS.isChecked():
|
||||||
|
filterphase = 'S'
|
||||||
|
return filterphase
|
||||||
|
|
||||||
def setIniPickP(self, gui_event):
|
def setIniPickP(self, gui_event):
|
||||||
self.setIniPickPS(gui_event, phase='P')
|
self.setIniPickPS(gui_event, phase='P')
|
||||||
|
|
||||||
@ -1984,8 +1992,9 @@ class PickDlg(QDialog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# filter data and trace on which is picked prior to determination of SNR
|
# filter data and trace on which is picked prior to determination of SNR
|
||||||
filteroptions = self.getFilterOptions(phase).parseFilterOptions()
|
filterphase = self.currentFilterPhase()
|
||||||
if filteroptions:
|
if filterphase:
|
||||||
|
filteroptions = self.getFilterOptions(filterphase).parseFilterOptions()
|
||||||
try:
|
try:
|
||||||
data.filter(**filteroptions)
|
data.filter(**filteroptions)
|
||||||
#wfdata.filter(**filteroptions)# MP MP removed filtering of original data
|
#wfdata.filter(**filteroptions)# MP MP removed filtering of original data
|
||||||
@ -2049,12 +2058,14 @@ class PickDlg(QDialog):
|
|||||||
# setting pick
|
# setting pick
|
||||||
pick = gui_event.xdata # get pick time relative to the traces timeaxis not to the global
|
pick = gui_event.xdata # get pick time relative to the traces timeaxis not to the global
|
||||||
channel = self.getChannelID(round(gui_event.ydata))
|
channel = self.getChannelID(round(gui_event.ydata))
|
||||||
|
# TODO: channel ID not correct when calcPlotPositions altered positions?
|
||||||
|
|
||||||
# get name of phase actually picked
|
# get name of phase actually picked
|
||||||
phase = self.currentPhase
|
phase = self.currentPhase
|
||||||
|
|
||||||
# get filter parameter for the phase to be picked
|
# get filter parameter for the phase to be picked
|
||||||
filteroptions = self.getFilterOptions(self.getPhaseID(phase)).parseFilterOptions()
|
filterphase = self.currentFilterPhase()
|
||||||
|
filteroptions = self.getFilterOptions(self.getPhaseID(filterphase)).parseFilterOptions()
|
||||||
|
|
||||||
# copy and filter data for earliest and latest possible picks
|
# copy and filter data for earliest and latest possible picks
|
||||||
wfdata = self.getWFData().copy().select(channel=channel)
|
wfdata = self.getWFData().copy().select(channel=channel)
|
||||||
@ -2067,6 +2078,7 @@ class PickDlg(QDialog):
|
|||||||
self.qmb.show()
|
self.qmb.show()
|
||||||
|
|
||||||
# get earliest and latest possible pick and symmetric pick error
|
# get earliest and latest possible pick and symmetric pick error
|
||||||
|
# TODO: Hardcoded channel 3 for Z!
|
||||||
if wfdata[0].stats.channel[2] == 'Z' or wfdata[0].stats.channel[2] == '3':
|
if wfdata[0].stats.channel[2] == 'Z' or wfdata[0].stats.channel[2] == '3':
|
||||||
nfac = parameter.get('nfacP')
|
nfac = parameter.get('nfacP')
|
||||||
TSNR = parameter.get('tsnrz')
|
TSNR = parameter.get('tsnrz')
|
||||||
|
Loading…
Reference in New Issue
Block a user