[minor] suppress rotation warning in GUI
This commit is contained in:
parent
9d540fdd9b
commit
38a071ac5b
@ -1461,7 +1461,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]
|
||||||
|
@ -702,7 +702,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.
|
||||||
@ -711,13 +711,15 @@ def check4rotated(data, metadata=None):
|
|||||||
# indexing fails if metadata is None
|
# indexing fails if metadata is None
|
||||||
metadata[0]
|
metadata[0]
|
||||||
except:
|
except:
|
||||||
msg = 'Warning: could not rotate traces since no metadata was given\nset Inventory file!'
|
if verbosity:
|
||||||
print(msg)
|
msg = 'Warning: could not rotate traces since no metadata was given\nset Inventory file!'
|
||||||
|
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,))
|
||||||
msg = 'Warning: could not rotate traces since no metadata was given\nCheck inventory directory!'
|
if verbosity:
|
||||||
print(msg)
|
msg = 'Warning: could not rotate traces since no metadata was given\nCheck inventory directory!'
|
||||||
|
print(msg)
|
||||||
return wfstream
|
return wfstream
|
||||||
else:
|
else:
|
||||||
parser = metadata[1]
|
parser = metadata[1]
|
||||||
|
@ -2497,7 +2497,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():
|
||||||
|
Loading…
Reference in New Issue
Block a user