Merge branch 'develop' into style_options

This commit is contained in:
Marcel Paffrath 2017-09-08 09:39:47 +02:00
commit e310e1b6a6
4 changed files with 13 additions and 8 deletions

View File

@ -1546,7 +1546,7 @@ class MainWindow(QMainWindow):
check4gaps(wfdat) check4gaps(wfdat)
check4doubled(wfdat) check4doubled(wfdat)
# check for stations with rotated components # check for stations with rotated components
wfdat = check4rotated(wfdat, self.metadata) wfdat = check4rotated(wfdat, self.metadata, verbosity=0)
# trim station components to same start value # trim station components to same start value
trim_station_components(wfdat, trim_start=True, trim_end=False) trim_station_components(wfdat, trim_start=True, trim_end=False)
self._stime = full_range(self.get_data().getWFData())[0] self._stime = full_range(self.get_data().getWFData())[0]

View File

@ -652,8 +652,10 @@ def wadaticheck(pickdic, dttolerance, iplot=0, fig_dict=None):
print("wadatacheck: Skipped %d S pick(s)" % ibad) print("wadatacheck: Skipped %d S pick(s)" % ibad)
else: else:
print("###############################################") print("###############################################")
print("wadatacheck: Not enough checked S-P times available!") print("wadaticheck: Not enough checked S-P times available!")
print("Skip Wadati check!") print("Skip Wadati check!")
wfitflag = 1
wdfit2 = None
checkedonsets = pickdic checkedonsets = pickdic

View File

@ -689,7 +689,7 @@ def get_stations(data):
return stations return stations
def check4rotated(data, metadata=None): def check4rotated(data, metadata=None, verbosity=1):
def rotate_components(wfstream, metadata=None): def rotate_components(wfstream, metadata=None):
"""rotates components if orientation code is numeric. """rotates components if orientation code is numeric.
@ -698,11 +698,13 @@ def check4rotated(data, metadata=None):
# indexing fails if metadata is None # indexing fails if metadata is None
metadata[0] metadata[0]
except: except:
if verbosity:
msg = 'Warning: could not rotate traces since no metadata was given\nset Inventory file!' msg = 'Warning: could not rotate traces since no metadata was given\nset Inventory file!'
print(msg) print(msg)
return wfstream return wfstream
if metadata[0] is None: if metadata[0] is None:
# sometimes metadata is (None, (None,)) # sometimes metadata is (None, (None,))
if verbosity:
msg = 'Warning: could not rotate traces since no metadata was given\nCheck inventory directory!' msg = 'Warning: could not rotate traces since no metadata was given\nCheck inventory directory!'
print(msg) print(msg)
return wfstream return wfstream

View File

@ -1195,6 +1195,7 @@ class PickDlg(QDialog):
# init pick delete (with right click) # init pick delete (with right click)
self.connect_pick_delete() self.connect_pick_delete()
self.setWindowTitle('Pickwindow on station: {}'.format(self.getStation()))
def setupUi(self): def setupUi(self):
menuBar = QtGui.QMenuBar(self) menuBar = QtGui.QMenuBar(self)
@ -2492,7 +2493,7 @@ class TuneAutopicker(QWidget):
# trim station components to same start value # trim station components to same start value
trim_station_components(wfdat, trim_start=True, trim_end=False) trim_station_components(wfdat, trim_start=True, trim_end=False)
# rotate misaligned stations to ZNE # rotate misaligned stations to ZNE
wfdat = check4rotated(wfdat, self.parent().metadata) wfdat = check4rotated(wfdat, self.parent().metadata, verbosity=0)
self.stationBox.clear() self.stationBox.clear()
stations = [] stations = []
for trace in self.data.getWFData(): for trace in self.data.getWFData():