Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
fce0c98a89
24
QtPyLoT.py
24
QtPyLoT.py
@ -15,7 +15,7 @@ Some icons are out of a free of charge icon set, which can be found here:
|
||||
https://www.iconfinder.com/iconsets/flavour
|
||||
|
||||
:authors:
|
||||
Sebastian Wehling-Benatelli / Ludger Küperkoch
|
||||
Sebastian Wehling-Benatelli / Ludger Küperkoch / Marcel Paffrath
|
||||
:copyright:
|
||||
The PyLoT Development Team (https://ariadne.geophysik.rub.de/trac/PyLoT)
|
||||
:license:
|
||||
@ -215,13 +215,11 @@ class MainWindow(QMainWindow):
|
||||
autopicksicon = QIcon()
|
||||
autopicksicon.addPixmap(QPixmap(':/icons/autopicsicon.png'))
|
||||
self.autopicksicon_small = QIcon()
|
||||
self.autopicksicon_small.addPixmap(QPixmap(':/icons/autopicsicon.png'))
|
||||
self.autopicksicon_small.addPixmap(QPixmap(':/icons/autopicksicon_small.png'))
|
||||
self.manupicksicon_small = QIcon()
|
||||
self.manupicksicon_small.addPixmap(QPixmap(':/icons/manupicsicon.png'))
|
||||
# self.autopicksicon_small = QIcon()
|
||||
# self.autopicksicon_small.addPixmap(QPixmap(':/icons/autopicksicon_small.png'))
|
||||
# self.manupicksicon_small = QIcon()
|
||||
# self.manupicksicon_small.addPixmap(QPixmap(':/icons/manupicksicon_small.png'))
|
||||
self.manupicksicon_small.addPixmap(QPixmap(':/icons/manupicksicon_small.png'))
|
||||
saveProjectIcon = QIcon()
|
||||
saveProjectIcon.addPixmap(QPixmap(':/icons/Library-icon.png'))
|
||||
loadpiloticon = QIcon()
|
||||
loadpiloticon.addPixmap(QPixmap(':/icons/Matlab_PILOT_icon.png'))
|
||||
p_icon = QIcon()
|
||||
@ -256,8 +254,9 @@ class MainWindow(QMainWindow):
|
||||
self.saveProjectAction = self.createAction(self, "Save project ...",
|
||||
self.saveProject,
|
||||
QKeySequence.Save,
|
||||
saveIcon,
|
||||
saveProjectIcon,
|
||||
"Save project file")
|
||||
self.saveProjectAction.setEnabled(False)
|
||||
# newEventAction = self.createAction(self, "&New event ...",
|
||||
# self.createNewEvent,
|
||||
# QKeySequence.New, newIcon,
|
||||
@ -281,11 +280,12 @@ class MainWindow(QMainWindow):
|
||||
self.openautopicksaction.setEnabled(False)
|
||||
self.openautopicksaction.setData(None)
|
||||
|
||||
loadlocationaction = self.createAction(self, "Load &location ...",
|
||||
self.loadlocationaction = self.createAction(self, "Load &location ...",
|
||||
self.load_loc, "Ctrl+L",
|
||||
locactionicon,
|
||||
"Load location information on "
|
||||
"the displayed event.")
|
||||
self.loadlocationaction.setEnabled(False)
|
||||
self.loadpilotevent = self.createAction(self, "Load PILOT &event ...",
|
||||
self.load_pilotevent, "Ctrl+E",
|
||||
loadpiloticon,
|
||||
@ -369,7 +369,7 @@ class MainWindow(QMainWindow):
|
||||
fileToolActions = (self.newProjectAction, self.addEventDataAction,
|
||||
self.openProjectAction, self.saveProjectAction,
|
||||
self.openmanualpicksaction,
|
||||
self.openautopicksaction, loadlocationaction,
|
||||
self.openautopicksaction, self.loadlocationaction,
|
||||
self.loadpilotevent, self.saveEventAction)
|
||||
fileToolBar.setObjectName("FileTools")
|
||||
self.addActions(fileToolBar, fileToolActions)
|
||||
@ -941,6 +941,8 @@ class MainWindow(QMainWindow):
|
||||
|
||||
def finishWaveformDataPlot(self):
|
||||
self.connectWFplotEvents()
|
||||
self.loadlocationaction.setEnabled(True)
|
||||
self.saveProjectAction.setEnabled(True)
|
||||
self.auto_pick.setEnabled(True)
|
||||
self.z_action.setEnabled(True)
|
||||
self.e_action.setEnabled(True)
|
||||
@ -961,6 +963,8 @@ class MainWindow(QMainWindow):
|
||||
def clearWaveformDataPlot(self):
|
||||
self.disconnectWFplotEvents()
|
||||
self.dataPlot.getAxes().cla()
|
||||
self.loadlocationaction.setEnabled(False)
|
||||
self.saveProjectAction.setEnabled(False)
|
||||
self.auto_pick.setEnabled(False)
|
||||
self.z_action.setEnabled(False)
|
||||
self.e_action.setEnabled(False)
|
||||
|
@ -1,5 +1,6 @@
|
||||
<RCC>
|
||||
<qresource>
|
||||
<file>icons/Library-icon.png</file>
|
||||
<file>icons/pylot.ico</file>
|
||||
<file>icons/pylot.png</file>
|
||||
<file>icons/manupicsicon.png</file>
|
||||
|
5046
icons_rc.py
5046
icons_rc.py
File diff suppressed because it is too large
Load Diff
@ -294,7 +294,6 @@ class Data(object):
|
||||
:raise OverwriteError: raises an OverwriteError if the picks list is
|
||||
not empty. The GUI will then ask for a decision.
|
||||
"""
|
||||
|
||||
#firstonset = find_firstonset(picks)
|
||||
# check for automatic picks
|
||||
print("Writing phases to ObsPy-quakeml file")
|
||||
|
@ -194,6 +194,7 @@ def picksdict_from_picks(evt):
|
||||
for pick in evt.picks:
|
||||
phase = {}
|
||||
station = pick.waveform_id.station_code
|
||||
channel = pick.waveform_id.channel_code
|
||||
try:
|
||||
onsets = picks[station]
|
||||
except KeyError as e:
|
||||
@ -213,6 +214,7 @@ def picksdict_from_picks(evt):
|
||||
phase['epp'] = epp
|
||||
phase['lpp'] = lpp
|
||||
phase['spe'] = spe
|
||||
phase['channel'] = channel
|
||||
try:
|
||||
picker = str(pick.method_id)
|
||||
if picker.startswith('smi:local/'):
|
||||
@ -232,8 +234,11 @@ def picks_from_picksdict(picks, creation_info=None):
|
||||
if not isinstance(phase, dict):
|
||||
continue
|
||||
onset = phase['mpp']
|
||||
ccode = phase['channel']
|
||||
ncode = phase['network']
|
||||
try:
|
||||
ccode = phase['channel']
|
||||
ncode = phase['network']
|
||||
except:
|
||||
continue
|
||||
pick = ope.Pick()
|
||||
if creation_info:
|
||||
pick.creation_info = creation_info
|
||||
@ -830,8 +835,9 @@ def merge_picks(event, picks):
|
||||
err = pick.time_errors
|
||||
phase = pick.phase_hint
|
||||
station = pick.waveform_id.station_code
|
||||
method = pick.method_id
|
||||
for p in event.picks:
|
||||
if p.waveform_id.station_code == station and p.phase_hint == phase:
|
||||
p.time, p.time_errors = time, err
|
||||
del time, err, phase, station
|
||||
p.time, p.time_errors, p.method_id = time, err, method
|
||||
del time, err, phase, station, method
|
||||
return event
|
||||
|
@ -446,6 +446,7 @@ class WaveformWidget(FigureCanvas):
|
||||
stime = trace.stats.starttime - wfstart
|
||||
time_ax = prepTimeAxis(stime, trace)
|
||||
if not scaleddata:
|
||||
trace.detrend('constant')
|
||||
trace.normalize(np.max(np.abs(trace.data)) * 2)
|
||||
self.getAxes().plot(time_ax, trace.data + n, 'k')
|
||||
if noiselevel is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user