changes in resolution window (added parameter for extent), TRIAL: changes in YLims of pickwindow after init Pick
This commit is contained in:
parent
f493359c26
commit
396555b4b4
@ -1 +1 @@
|
|||||||
ceed1-dirty
|
f493-dirty
|
||||||
|
@ -436,7 +436,7 @@ def getsignalwin(t, t1, tsignal):
|
|||||||
return isignal
|
return isignal
|
||||||
|
|
||||||
|
|
||||||
def getResolutionWindow(snr, aperture):
|
def getResolutionWindow(snr, extent):
|
||||||
"""
|
"""
|
||||||
Number -> Float
|
Number -> Float
|
||||||
produce the half of the time resolution window width from given SNR
|
produce the half of the time resolution window width from given SNR
|
||||||
@ -447,6 +447,8 @@ def getResolutionWindow(snr, aperture):
|
|||||||
1.5 > SNR -> 15 sec VLRW
|
1.5 > SNR -> 15 sec VLRW
|
||||||
see also Diehl et al. 2009
|
see also Diehl et al. 2009
|
||||||
|
|
||||||
|
:parameter: extent, can be 'local', 'regional', 'global'
|
||||||
|
|
||||||
>>> getResolutionWindow(0.5)
|
>>> getResolutionWindow(0.5)
|
||||||
7.5
|
7.5
|
||||||
>>> getResolutionWindow(1.8)
|
>>> getResolutionWindow(1.8)
|
||||||
@ -466,15 +468,15 @@ def getResolutionWindow(snr, aperture):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if snr < 1.5:
|
if snr < 1.5:
|
||||||
time_resolution = res_wins[aperture]['VLRW']
|
time_resolution = res_wins[extent]['VLRW']
|
||||||
elif snr < 2.:
|
elif snr < 2.:
|
||||||
time_resolution = res_wins[aperture]['LRW']
|
time_resolution = res_wins[extent]['LRW']
|
||||||
elif snr < 3.:
|
elif snr < 3.:
|
||||||
time_resolution = res_wins[aperture]['MRW']
|
time_resolution = res_wins[extent]['MRW']
|
||||||
elif snr >3.:
|
elif snr >3.:
|
||||||
time_resolution = res_wins[aperture]['HRW']
|
time_resolution = res_wins[extent]['HRW']
|
||||||
else:
|
else:
|
||||||
time_resolution = res_wins[aperture]['VLRW']
|
time_resolution = res_wins[extent]['VLRW']
|
||||||
|
|
||||||
return time_resolution / 2
|
return time_resolution / 2
|
||||||
|
|
||||||
|
@ -438,6 +438,8 @@ class WaveformWidget(FigureCanvas):
|
|||||||
nmax = 0
|
nmax = 0
|
||||||
|
|
||||||
compclass = SetChannelComponents()
|
compclass = SetChannelComponents()
|
||||||
|
|
||||||
|
if not component == '*':
|
||||||
alter_comp = compclass.getCompPosition(component)
|
alter_comp = compclass.getCompPosition(component)
|
||||||
alter_comp = str(alter_comp[0])
|
alter_comp = str(alter_comp[0])
|
||||||
|
|
||||||
@ -982,7 +984,7 @@ class PickDlg(QDialog):
|
|||||||
else:
|
else:
|
||||||
noiselevel = nfac
|
noiselevel = nfac
|
||||||
|
|
||||||
x_res = getResolutionWindow(snr, 'regional')
|
x_res = getResolutionWindow(snr, parameter.get('extent'))
|
||||||
|
|
||||||
# remove mean noise level from waveforms
|
# remove mean noise level from waveforms
|
||||||
for trace in data:
|
for trace in data:
|
||||||
@ -991,7 +993,7 @@ class PickDlg(QDialog):
|
|||||||
trace = demeanTrace(trace=trace, window=inoise)
|
trace = demeanTrace(trace=trace, window=inoise)
|
||||||
|
|
||||||
self.setXLims([ini_pick - x_res, ini_pick + x_res])
|
self.setXLims([ini_pick - x_res, ini_pick + x_res])
|
||||||
self.setYLims(np.array([-noiselevel * 2.5, noiselevel * 2.5]) +
|
self.setYLims(np.array([-noiselevel * 3.5, noiselevel * 3.5]) +
|
||||||
trace_number)
|
trace_number)
|
||||||
self.getPlotWidget().plotWFData(wfdata=data,
|
self.getPlotWidget().plotWFData(wfdata=data,
|
||||||
title=self.getStation() +
|
title=self.getStation() +
|
||||||
@ -1042,12 +1044,12 @@ class PickDlg(QDialog):
|
|||||||
horiz_comp = find_horizontals(data)
|
horiz_comp = find_horizontals(data)
|
||||||
data = scaleWFData(data, noiselevel * 2.5, horiz_comp)
|
data = scaleWFData(data, noiselevel * 2.5, horiz_comp)
|
||||||
|
|
||||||
x_res = getResolutionWindow(snr, 'regional')
|
x_res = getResolutionWindow(snr, parameter.get('extent'))
|
||||||
|
|
||||||
self.setXLims(tuple([ini_pick - x_res, ini_pick + x_res]))
|
self.setXLims(tuple([ini_pick - x_res, ini_pick + x_res]))
|
||||||
traces = self.getTraceID(horiz_comp)
|
traces = self.getTraceID(horiz_comp)
|
||||||
traces.sort()
|
traces.sort()
|
||||||
self.setYLims(tuple(np.array([-0.5, +0.5]) +
|
self.setYLims(tuple(np.array([-1.0, +1.0]) +
|
||||||
np.array(traces)))
|
np.array(traces)))
|
||||||
noiselevels = [trace + 1 / (2.5 * 2) for trace in traces] + \
|
noiselevels = [trace + 1 / (2.5 * 2) for trace in traces] + \
|
||||||
[trace - 1 / (2.5 * 2) for trace in traces]
|
[trace - 1 / (2.5 * 2) for trace in traces]
|
||||||
|
Loading…
Reference in New Issue
Block a user