Take into account that dip/azimut might be 0 when not available.

This commit is contained in:
Ludger Küperkoch 2018-01-25 11:34:37 +01:00
parent 97de485c99
commit af393d5118
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
98f7-dirty 97de-dirty

View File

@ -977,7 +977,7 @@ def check4rotated(data, metadata=None, verbosity=1):
dip = blockette_.dip dip = blockette_.dip
azimut = blockette_.azimuth azimut = blockette_.azimuth
break break
if dip is None or azimut is None: if (dip is None or azimut is None) or (dip == 0 and azimut == 0):
error_msg = 'Dip and azimuth not available for trace_id {}'.format(trace_id) error_msg = 'Dip and azimuth not available for trace_id {}'.format(trace_id)
raise ValueError(error_msg) raise ValueError(error_msg)
return dip, azimut return dip, azimut