[cherry-pick] merged conflicts after cherry-pick of commit [17585f9381
]
This commit is contained in:
parent
1e4b1d691a
commit
420f382051
@ -55,7 +55,7 @@ from pylot.core.util.errors import FormatError, DatastructureError, \
|
||||
OverwriteError
|
||||
from pylot.core.util.connection import checkurl
|
||||
from pylot.core.util.utils import fnConstructor, getLogin, \
|
||||
getGlobalTimes
|
||||
full_range
|
||||
from pylot.core.io.location import create_creation_info, create_event
|
||||
from pylot.core.util.widgets import FilterOptionsDialog, NewEventDlg, \
|
||||
WaveformWidget, PropertiesDlg, HelpForm, createAction, PickDlg, \
|
||||
@ -660,7 +660,7 @@ class MainWindow(QMainWindow):
|
||||
ans = self.data.setWFData(self.getWFFnames())
|
||||
else:
|
||||
ans = False
|
||||
self._stime = getGlobalTimes(self.get_data().getWFData())[0]
|
||||
self._stime = full_range(self.get_data().getWFData())[0]
|
||||
if ans:
|
||||
self.plotWaveformData()
|
||||
return ans
|
||||
|
@ -740,11 +740,11 @@ class SeismicShot(object):
|
||||
self._drawCFs(traceID, folm)
|
||||
|
||||
def _drawStream(self, traceID, refresh=False, ax=None):
|
||||
from pylot.core.util.utils import getGlobalTimes
|
||||
from pylot.core.util.utils import full_range
|
||||
from pylot.core.util.utils import prepTimeAxis
|
||||
|
||||
stream = self.getSingleStream(traceID)
|
||||
stime = getGlobalTimes(stream)[0]
|
||||
stime = full_range(stream)[0]
|
||||
timeaxis = prepTimeAxis(stime, stream[0])
|
||||
timeaxis -= stime
|
||||
|
||||
|
@ -10,7 +10,7 @@ from obspy.core.event import Event
|
||||
from pylot.core.io.phases import readPILOTEvent, picks_from_picksdict, \
|
||||
picksdict_from_pilot, merge_picks
|
||||
from pylot.core.util.errors import FormatError, OverwriteError
|
||||
from pylot.core.util.utils import fnConstructor, getGlobalTimes
|
||||
from pylot.core.util.utils import fnConstructor, full_range
|
||||
|
||||
|
||||
class Data(object):
|
||||
@ -133,7 +133,7 @@ class Data(object):
|
||||
|
||||
|
||||
"""
|
||||
self.cuttimes = getGlobalTimes(self.getWFData())
|
||||
self.cuttimes = full_range(self.getWFData())
|
||||
|
||||
def getEventFileName(self):
|
||||
"""
|
||||
|
@ -12,7 +12,7 @@ from pylot.core.io.inputs import AutoPickParameter
|
||||
from pylot.core.io.location import create_arrival, create_event, \
|
||||
create_magnitude, create_origin, create_pick
|
||||
from pylot.core.pick.utils import select_for_phase
|
||||
from pylot.core.util.utils import getOwner, getGlobalTimes, four_digits
|
||||
from pylot.core.util.utils import getOwner, full_range, four_digits
|
||||
|
||||
|
||||
def readPILOTEvent(phasfn=None, locfn=None, authority_id='RUB', **kwargs):
|
||||
@ -325,7 +325,7 @@ def reassess_pilot_event(root_dir, db_dir, event_id, out_dir=None, fn_param=None
|
||||
msg = 'no waveform data found for station {station}'.format(station=station)
|
||||
warnings.warn(msg, RuntimeWarning)
|
||||
continue
|
||||
stime, etime = getGlobalTimes(sel_st)
|
||||
stime, etime = full_range(sel_st)
|
||||
rel_pick = mpp - stime
|
||||
epp, lpp, spe = earllatepicker(sel_st,
|
||||
default.get('nfac{0}'.format(phase)),
|
||||
|
@ -206,7 +206,7 @@ def four_digits(year):
|
||||
return year
|
||||
|
||||
|
||||
def getGlobalTimes(stream):
|
||||
def full_range(stream):
|
||||
'''
|
||||
takes a stream object and returns the latest end and the earliest start
|
||||
time of all contained trace objects
|
||||
|
@ -32,7 +32,7 @@ from pylot.core.pick.utils import getSNR, earllatepicker, getnoisewin, \
|
||||
from pylot.core.pick.compare import Comparison
|
||||
from pylot.core.util.defaults import OUTPUTFORMATS, FILTERDEFAULTS, LOCTOOLS, \
|
||||
COMPPOSITION_MAP
|
||||
from pylot.core.util.utils import prepTimeAxis, getGlobalTimes, scaleWFData, \
|
||||
from pylot.core.util.utils import prepTimeAxis, full_range, scaleWFData, \
|
||||
demeanTrace, isSorted, findComboBoxIndex, clims, find_horizontals
|
||||
|
||||
|
||||
@ -425,7 +425,7 @@ class WaveformWidget(FigureCanvas):
|
||||
noiselevel=None, scaleddata=False, mapping=True):
|
||||
self.getAxes().cla()
|
||||
self.clearPlotDict()
|
||||
wfstart, wfend = getGlobalTimes(wfdata)
|
||||
wfstart, wfend = full_range(wfdata)
|
||||
nmax = 0
|
||||
for n, trace in enumerate(wfdata):
|
||||
channel = trace.stats.channel
|
||||
@ -539,7 +539,7 @@ class PickDlg(QDialog):
|
||||
else:
|
||||
self.data = data
|
||||
|
||||
self.stime, self.etime = getGlobalTimes(self.getWFData())
|
||||
self.stime, self.etime = full_range(self.getWFData())
|
||||
|
||||
# initialize plotting widget
|
||||
self.multicompfig = WaveformWidget(self)
|
||||
|
Loading…
Reference in New Issue
Block a user