[cleanup] removed some parentheses
This commit is contained in:
parent
7a0d3486a6
commit
663d244f70
@ -966,7 +966,7 @@ def getQualitiesfromxml(xmlnames, ErrorsP, ErrorsS, plotflag=1):
|
||||
arrivals_copy = cat_copy.events[0].picks
|
||||
# Prefere manual picks if qualities are sufficient!
|
||||
for Pick in arrivals:
|
||||
if (Pick.method_id.id).split('/')[1] == 'manual':
|
||||
if Pick.method_id.id.split('/')[1] == 'manual':
|
||||
mstation = Pick.waveform_id.station_code
|
||||
mstation_ext = mstation + '_'
|
||||
for mpick in arrivals_copy:
|
||||
@ -974,14 +974,14 @@ def getQualitiesfromxml(xmlnames, ErrorsP, ErrorsS, plotflag=1):
|
||||
if phase == 'P':
|
||||
if ((mpick.waveform_id.station_code == mstation) or
|
||||
(mpick.waveform_id.station_code == mstation_ext)) and \
|
||||
((mpick.method_id).split('/')[1] == 'auto') and \
|
||||
(mpick.method_id.split('/')[1] == 'auto') and \
|
||||
(mpick.time_errors['uncertainty'] <= ErrorsP[3]):
|
||||
del mpick
|
||||
break
|
||||
elif phase == 'S':
|
||||
if ((mpick.waveform_id.station_code == mstation) or
|
||||
(mpick.waveform_id.station_code == mstation_ext)) and \
|
||||
((mpick.method_id).split('/')[1] == 'auto') and \
|
||||
(mpick.method_id.split('/')[1] == 'auto') and \
|
||||
(mpick.time_errors['uncertainty'] <= ErrorsS[3]):
|
||||
del mpick
|
||||
break
|
||||
|
@ -396,16 +396,16 @@ class Array_map(QtGui.QWidget):
|
||||
del (self.cbar, self.cbax_bg)
|
||||
if hasattr(self, 'sc_picked'):
|
||||
self.sc_picked.remove()
|
||||
del (self.sc_picked)
|
||||
del self.sc_picked
|
||||
if hasattr(self, 'sc_event'):
|
||||
self.sc_event.remove()
|
||||
del (self.sc_event)
|
||||
del self.sc_event
|
||||
if hasattr(self, 'contourf'):
|
||||
self.remove_contourf()
|
||||
del (self.contourf)
|
||||
del self.contourf
|
||||
if hasattr(self, 'cid'):
|
||||
self.canvas.mpl_disconnect(self.cid)
|
||||
del (self.cid)
|
||||
del self.cid
|
||||
try:
|
||||
self.sc.remove()
|
||||
except Exception as e:
|
||||
|
@ -639,7 +639,7 @@ def get_prefilt(trace, tlow=(0.5, 0.9), thi=(5., 2.), verbosity=0):
|
||||
fny = trace.stats.sampling_rate / 2
|
||||
fc21 = fny - (fny * thi[0] / 100.)
|
||||
fc22 = fny - (fny * thi[1] / 100.)
|
||||
return (tlow[0], tlow[1], fc21, fc22)
|
||||
return tlow[0], tlow[1], fc21, fc22
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -2882,13 +2882,13 @@ class MultiEventWidget(QWidget):
|
||||
for rb in self.rb_dict.values():
|
||||
if rb.isChecked():
|
||||
check_events = (rb.toolTip() == 'No events for this selection')
|
||||
self.start_button.setEnabled(not (check_events))
|
||||
self.start_button.setEnabled(not check_events)
|
||||
|
||||
def enable(self, bool):
|
||||
for rb in self.rb_dict.values():
|
||||
rb.setEnabled(bool)
|
||||
self.start_button.setEnabled(bool)
|
||||
self.pb.setVisible(not (bool))
|
||||
self.pb.setVisible(not bool)
|
||||
self._pb_space.setVisible(bool)
|
||||
self.eventbox.setEnabled(bool)
|
||||
self.button_clear.setEnabled(bool)
|
||||
@ -2970,7 +2970,7 @@ class AutoPickWidget(MultiEventWidget):
|
||||
def reinitEvents2plot(self):
|
||||
for eventID, eventDict in self.events2plot.items():
|
||||
for widget_key, widget in eventDict.items():
|
||||
del (widget)
|
||||
del widget
|
||||
self.events2plot = {}
|
||||
self.eventbox.clear()
|
||||
self.refresh_plot_tabs()
|
||||
@ -3504,7 +3504,7 @@ class TuneAutopicker(QWidget):
|
||||
if hasattr(self, 'pdlg_widget'):
|
||||
if self.pdlg_widget:
|
||||
self.pdlg_widget.setParent(None)
|
||||
del (self.pdlg_widget)
|
||||
del self.pdlg_widget
|
||||
if hasattr(self, 'overview'):
|
||||
self.overview.setParent(None)
|
||||
if hasattr(self, 'p_tabs'):
|
||||
|
Loading…
Reference in New Issue
Block a user