Merge branch 'develop' into style_options

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

View File

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